Stealing Reasoning Traces from Proprietary LLM APIs: A Critical Security Vulnerability Exposed
Major security flaw discovered in leading AI models

A groundbreaking research paper has uncovered a significant security vulnerability affecting major AI providers including Anthropic, OpenAI, and Google. The study reveals how attackers can extract hidden reasoning traces from proprietary Large Language Model (LLM) APIs—information that was never meant to be publicly accessible.
What Are Reasoning Traces?
Reasoning traces are the internal "thought processes" that advanced AI models use to solve complex problems. Think of them as the rough draft or working notes that the AI creates before delivering its final answer. Companies like Anthropic, OpenAI, and Google deliberately hide these traces to protect competitive advantage and security.
Protect proprietary tech
Guard proprietary technology and competitive advantages from outsiders.
Prevent reverse engineering
Block reverse engineering of models through leaked internal reasoning.
Secure training methods
Maintain security of training methods and internal system design.
Quality control
Show only polished outputs—not the messy intermediate draft.
The Vulnerability: How the Attack Works
The research demonstrates a surprisingly simple yet effective attack method:
Step 1: Extract the signature
Send a request to models like Claude Opus 4.8 and receive a hidden "thinking block" signature—a fingerprint of the AI's internal reasoning process.
Step 2: Reconstruct reasoning
Send that signature back to the same or related models (e.g. Claude Haiku) to trick the system into revealing the full hidden reasoning trace.
Step 3: Validate extraction
On 120 Codeforces programming problems, extracted traces closely matched the actual number of thinking tokens from the source model.

Shocking Results Across Major AI Providers
The research tested three major AI platforms. Results showed a near-perfect correlation between actual thinking tokens and reconstructed reasoning—strong evidence the attack works.
| Provider | Finding |
|---|---|
| Anthropic (Claude) | Successfully extracted reasoning traces showing factorization and mathematical thinking |
| OpenAI (GPT-4 series) | Vulnerable to the same extraction technique |
| Google APIs | Also susceptible to reasoning trace theft |

Why This Matters
For AI companies
Serious intellectual property risk. Competitors could:
- Reverse engineer proprietary reasoning methods
- Understand training approaches and architectures
- Replicate advantages without the R&D investment
For users & enterprises
- Privacy: sensitive reasoning about confidential data could be exposed
- Security: attack vectors may surface through reasoning analysis
- Trust: questions about what else might be extractable
For the AI industry
- Balancing transparency with security
- Protecting proprietary info in API-based services
- Ensuring robust security in AI systems
Beyond IP theft, decoded traces from publicly shared session logs can expose secrets users never meant to publish—credentials and personal data that live only inside encrypted reasoning blocks.

Real-World Example: Factorization Attack
The paper demonstrates a concrete example where the AI attempts to factor the number 8139881:
Factoring divisors, 8139881 = 1627 × 5003, both of which are prime, so the largest prime divisor is 5003.
The hidden reasoning shows the AI's trial-and-error process, checking divisibility rules and testing small primes—valuable information about the model's problem-solving approach.
Implications for AI Security
This research raises critical questions for the industry:
How much hidden information exists in API responses?
Can other types of proprietary data be extracted similarly?
What security measures should AI providers implement?
Should reasoning traces be encrypted or better protected?
What AI Providers Should Do
| Immediate actions | Long-term solutions |
|---|---|
| Audit API responses for information leakage | Redesign API architecture with security-first principles |
| Implement stronger signature protection | Implement zero-knowledge proof systems |
| Review token counting mechanisms | Create isolated reasoning environments |
| Add encryption to reasoning traces | Develop better access control mechanisms |
What Users Should Know
If you're using these AI APIs in production:
Assume exposure risk
Assume reasoning traces could be exposed—avoid processing highly sensitive information.
Review data policies
Review your data handling policies for AI interactions.
Monitor API usage
Watch for unusual API usage patterns that might indicate exploitation.
Stay patched
Stay updated on security patches from your AI provider.
The Future of AI Security
This research is a wake-up call for the AI industry. As models become more sophisticated and valuable, security measures must evolve accordingly. The tension between transparency (users want to understand AI reasoning), security (companies need to protect IP), and functionality (models need to think effectively) will define the next generation of AI systems.
Conclusion
The discovery that reasoning traces can be stolen from major AI APIs is a significant security revelation. While the research demonstrates the vulnerability across Anthropic, OpenAI, and Google platforms, it also provides an opportunity for the industry to strengthen security measures before malicious actors exploit these weaknesses.
As AI becomes increasingly integrated into critical systems and business operations, ensuring the security of these models isn't just about protecting corporate secrets—it's about maintaining trust in AI technology itself.

