Stealing Reasoning Traces from Proprietary LLM APIs
Even when AI companies hide a model's internal reasoning behind encryption, a weaker sibling model can be tricked into reading it out loud
Providers like Anthropic, OpenAI, and Google now hide a reasoning model's step-by-step internal thoughts by returning them to users as encrypted blocks instead of plaintext. This paper found that these encrypted blocks can be replayed across sessions, users, and even different models within the same provider, and used this to feed a strong model's encrypted reasoning into a weaker, less-guarded sibling model that then transcribes it verbatim in plaintext. Applying this to 315,320 reasoning blocks scraped from public repositories recovered 367 personal-data artifacts and 182 credentials.
METAL MEDIA explanatory visual
How the weak-model decoding attack works
Evidence statusMeasured results reported
- Query the strong modelAsk a heavily-guarded model like Opus 4.8 a question and capture the encrypted reasoning block (signature) it returns.
- Move the encrypted blockTake that encrypted block, originally tied to a different session, user, or model, and insert it into a request to another model in the same provider's family.
- Hand it to a weaker modelFeed the block to a less-guarded sibling model like Haiku 4.5 and ask it to transcribe its own thinking.
- Plaintext comes outThe weaker model decrypts and outputs the strong model's hidden reasoning verbatim in plaintext.
- Four abuse pathsThis enables distillation of proprietary reasoning, extraction of leaked PII/credentials, exposure of hidden harmful content, and invisible prompt injection.
What they did
- Modern reasoning models think through problems step by step before answering, and providers encrypt this internal chain-of-thought before sending it back to the client to protect IP and limit information leakage.
- The researchers discovered that these encrypted reasoning blocks are portable: they can be replayed across different sessions, different users, and even different models within the same provider's ecosystem.
- By capturing an encrypted reasoning trace from a strong, well-guarded model (e.g., Claude Opus) and feeding it into a weaker, less-guarded sibling model (e.g., Claude Haiku) with a request to transcribe its own thinking, they got the weaker model to output the strong model's hidden reasoning verbatim, without ever jailbreaking the strong model directly.
- Applying this technique to 6,708 real agent session logs scraped from GitHub and Hugging Face, they decoded 315,320 reasoning blocks and recovered 367 PII artifacts and 182 credentials, including 62 API keys, 33 passwords, and 30 personal emails from genuine user sessions.
- They also showed that harmful information can remain hidden inside a model's reasoning even when its visible, final answer safely refuses the request, and this hidden content can be extracted via the same technique.

| Claude | GPT | Gemini | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Source / Target | F5 | O4.8 | S5 | S4.6 | S4.5 | H4.5 | Source / Target | 5.6s | 5.6t | 5.6l | 5 | 5-m | 5-n | Source / Target | 3.1P | 3P | Rob | 3.5F | 3F |
| Fable 5 | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | GPT-5.6-sol | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | Gemini 3.1 Pro | ✓ | ✓ | ✓ | ✓ | ✓ |
| Opus 4.8 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | GPT-5.6-terra | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | Gemini 3 Pro | ✓ | ✓ | ✓ | ✓ | ✓ |
| Sonnet 5 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | GPT-5.6-luna | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | Gemini Robotics 1.6 | ✓ | ✓ | ✓ | ✓ | ✓ |
| Sonnet 4.6 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | GPT-5 | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | Gemini 3.5 Flash | ✓ | ✓ | ✓ | ✓ | ✓ |
| Sonnet 4.5 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | GPT-5-mini | ✓ | ✓ | ✓ | ✗ | ✓ | ✗ | Gemini 3 Flash | ✓ | ✓ | ✓ | ✓ | ✓ |
| Haiku 4.5 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | o4-mini | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | Gemini 3.1 Flash Lite | ✓ | ✓ | ✓ | ✓ | ✓ |
| # | Issue | What the mitigation provides | Mitigation |
|---|---|---|---|
| 1 | Cross-user leakage | ✓ User-identity binding ✓ Stateless verification ✓ Immediate mismatch rejection | 1. Embed user_id in AEAD associated data at issuance. 2. On replay, compare bound identity to authenticated caller. 3. Reject the envelope on any mismatch. |
| 2 | Cross-session leakage | ✓ Session + predecessor binding ✓ Ordinality (P1) under compaction ✓ Native fork / compact / downgrade support ✓ Dramatically reduced blast radius | 1. Hash-chain each envelope to session_id and its predecessor (Eq. 1). 2. Enforce ordinality server-side. 3. Retain only Merkle roots after compaction so surviving spans stay verifiable. |
| 3 | Legacy public/enterprise datasets | ✓ Permanent undecodability of pre-fix signatures ✓ Clean cryptographic separation from new material | 1. Rotate every pre-fix signing key. 2. Refuse to decode any envelope under a retired key ID. 3. (Optional) Offer identity-verified re-signing for enterprise archives. |
| 4 | Backwards compatibility | ✓ Zero-break migration path ✓ Bounded dual-format window ✓ Identity-verified re-issuance | 1. Accept both legacy and context-bound envelopes during a fixed deprecation window. 2. Expose an opt-in batch re-signature endpoint. 3. Re-issue only after confirming the requester owns the original session. |
| 5 | Model-level compliance | ✓ Closure of residual gaps beyond cryptography ✓ Resistance to transcription / replay jailbreaks | 1. Post-train models to recognise transcription-style prompts (e.g., <thinking-copy>). 2. Refuse the request irrespective of envelope validity. |
| 6 | Nonce predictability | ✓ Critical since key is shared between users ✓ Cryptographic foundation for every binding above ✓ Collision- and forgery-resistance at provider scale | 1. Draw a high-entropy nonce from a CSPRNG for every block. 2. Enforce server-side uniqueness before the envelope is issued. |
| Model | Prefill | Category | Prefilled | Control | Δ | p |
|---|---|---|---|---|---|---|
| Kimi-K3 | Opus 4.8 | STEM | 0.305 | 0.160 | +1.5×10−1 | 1.7×10−5 |
| Kimi-K3 | Opus 4.8 | non-STEM | 0.289 | 0.203 | +8.6×10−2 | 6.3×10−6 |
| Inkling | Opus 4.8 | STEM | 0.217 | 0.205 | +1.2×10−2 | 7.4×10−2 |
| Inkling | Opus 4.8 | non-STEM | 0.241 | 0.239 | +2.1×10−3 | 5.5×10−1 |
| Kimi-K3 | Inkling | STEM | 0.359 | 0.337 | +2.2×10−2 | 1.2×10−1 |
| Kimi-K3 | Inkling | non-STEM | 0.272 | 0.263 | +9.4×10−3 | 5.5×10−1 |
| Inkling | Kimi-K3 | STEM | 0.414 | 0.411 | +2.2×10−3 | 7.2×10−1 |
| Inkling | Kimi-K3 | non-STEM | 0.320 | 0.306 | +1.4×10−2 | 3.3×10−2 |
| Category | Labeler 1 (Figure 44) | Labeler 2 (Figure 45) | Deduplication | Non-benchmark | Reasoning only |
|---|---|---|---|---|---|
| Personal information | |||||
| Name | 4,350 | 541 | 173 | 130 | 4 |
| Address | 839 | 233 | 87 | 36 | 5 |
| 651 | 232 | 72 | 30 | 3 | |
| Date of birth | 122 | 24 | 9 | 3 | 1 |
| Government ID | 29 | 21 | 7 | 1 | 0 |
| Payment card | 90 | 64 | 9 | 0 | 0 |
| Phone | 76 | 18 | 10 | 4 | 0 |
| Credentials | |||||
| Access token | 852 | 84 | 30 | 24 | 3 |
| API key | 966 | 90 | 69 | 62 | 11 |
| Password | 1,235 | 330 | 72 | 33 | 2 |
| Private key | 62 | 11 | 11 | 7 | 0 |
| Technical identifiers | |||||
| IP address | 1,763 | 20 | 6 | 6 | 0 |
| URL | 14,192 | 55 | 33 | 32 | 3 |
| File or repository path | 31,380 | 373 | 281 | 279 | 24 |
| Internal identifier | 14,369 | 27 | 17 | 14 | 1 |
| Account identifier | 3,072 | 31 | 21 | 17 | 1 |
| Session identifier | 1,662 | 6 | 5 | 3 | 1 |
| Other | 1,068 | 34 | 29 | 23 | 5 |
| Total | 76,778 | 2,194 | 941 | 704 | 64 |
| Persona field | GPT 5.5 | Opus 4.7 | |
|---|---|---|---|
| identity | Legal name (Alex Green) | ✓ | ✓ |
| Street + unit (664 Spadina Ave, 1208) | ✓ | ✓ | |
| City / province / country | ✓ | ✓ | |
| Postal code (M5S 2H7) | ✓ | ✓ | |
| Security-question answer | ✗ | ✓ | |
| Date of birth | ✓ | ✗ | |
| creds | Session email | ✓ | ✓ |
| Password / session token | ✗ | ✓ |

Findings
- The extraction attack successfully recovered plaintext reasoning across all three tested providers (Anthropic, OpenAI, Google) by feeding a strong model's encrypted trace into a weaker sibling (Haiku 4.5, GPT-5.6 Luna, Gemini Robotics 1.6).
- On 120 Codeforces problems, the API-reported thinking-token counts closely matched the token counts of the re-encoded extracted reasoning for most inputs, supporting the faithfulness of the extraction.
- Decoding 315,320 reasoning blocks from 6,708 publicly scraped agent sessions recovered 367 PII artifacts and 182 credentials overall, including (from genuine, non-benchmark sessions) 62 API keys, 33 passwords, and 30 personal emails.
- 64 of 704 artifacts recovered from genuine-session reasoning were entirely absent from the visible chat history, meaning they existed only inside the encrypted block.
- Decoding Opus 4.8's reasoning after a paraphrased HarmBench prompt revealed harmful information (e.g., car-theft methods) that was completely absent from its benign, refusing visible answer.
Where it can be used
- Developers using reasoning-model APIs can use this finding as a reason not to publish raw session logs containing encrypted reasoning blocks online without extra caution.
- AI providers designing or auditing their encryption schemes for reasoning traces can reference this vulnerability analysis when deciding whether to bind traces to specific sessions, users, or models.
- Security researchers auditing other multi-model API ecosystems can adapt this cross-model compatibility test as a methodology for checking similar flaws.
Limits and open work
- As of August 2026, providers implemented mitigations following the disclosure, so the exact attacks described are no longer reproducible as-is.
- The experiments cover a specific set of models and providers (Anthropic, OpenAI, Google); whether the same vulnerability exists in other providers or future model generations is not established.
- Only 0.3% of the 315,320 decoded blocks actually contained personal data, so the risk should not be generalized to every public reasoning log.
- Faithfulness of extraction was verified indirectly via matching token counts, not by confirming the extracted content is word-for-word identical to the model's true private reasoning.
- The cryptographic and system-level mitigations the paper proposes are recommendations, not measures that have been implemented and verified to work.
Why it matters
It shows that filtering only the final visible output of an AI is not enough, because sensitive or harmful content can survive untouched inside the hidden reasoning that gets passed back and forth as an encrypted block. This matters directly for developers who publish session logs online, since they may be unknowingly leaking secrets buried in reasoning they cannot even read.
Terms in this paper
- chain-of-thought (reasoning trace) · the internal, step-by-step text a model generates to work through a problem before producing its final answer
- encrypted reasoning block · a scrambled, unreadable chunk of text that packages a model's reasoning trace when it is sent back to the client
- decoder model · a weaker, less-guarded model that is tricked into reading out another model's encrypted reasoning in plaintext
- AEAD (authenticated encryption) · an encryption scheme that also proves the content has not been tampered with, using a signature/tag
- distillation attack · using another model's outputs or reasoning as training data to build a cheaper copycat model
Original abstract (English)
Leading large language model providers now conceal their models' step-by-step reasoning, or chain-of-thought, to protect intellectual property and limit information leakage. Rather than storing these traces server-side, providers return them to the client as blocks of encrypted text, which the client passes back with each subsequent request. Building on prior research, we identify an architectural vulnerability: these encrypted blocks are fully compatible and interchangeable across different sessions, users, and models within a provider's ecosystem. We exploit this compatibility to develop a scalable decryption jailbreak. By injecting an encrypted reasoning trace from a given model into a weaker, and less safeguarded model from the same provider, we force it to decode and output the trace verbatim in plaintext, without ever jailbreaking the more capable model directly. This vulnerability enables four distinct attack vectors. First, it circumvents anti-distillation mechanisms, allowing adversaries to extract a proprietary model's reasoning, as we demonstrate across Anthropic, OpenAI, and Google. Second, it allows for large-scale private data extraction. Developers frequently share session logs publicly, unaware of contents of the encrypted blocks. By decoding 315,320 reasoning blocks scraped from public repositories, we recovered 367 Personally Identifiable Information (PII) artifacts and 182 credentials. Third, it inadvertently reveals hazardous information hidden within the reasoning process, even in cases where the model's final, visible output safely rejects a malicious request. Fourth, attackers can leverage this flaw to execute invisible prompt injections, embedding malicious payloads entirely within encrypted blocks to poison public agentic rollouts. Following responsible disclosure, we propose concrete cryptographic and system-level mitigations to secure client-side reasoning.
Read on arXivLatest papers
- SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?AI coding agents were tested on fixing real scientific software, and even the best one failed more than half the time
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM ServingMaking sparse attention fast enough and accurate enough for real LLM serving, not just papers
- PolicyGuide: From Guarding One Action to Guiding the Whole Workflow for Policy-Compliant LLM AgentsMaking customer-service AI agents follow the whole procedure, not just avoid one bad action
- EXIMO: VLM Guided Exploration of VLA PoliciesTeaching a robot new chores without human teleoperation, by letting a chatty AI supervise it
- EnvHarness: Awakening Static Worlds for Agent LearningInstead of building new training worlds from scratch, this work adds a plug-in layer that reshapes existing ones around each agent's actual weaknesses
- Bounded Sovereignty and the Control Tax: Pricing AI Oversight When the Deployer Does Not Own the ModelCompanies that rent AI instead of owning it can only do half of AI safety oversight
- PersonalBench: Measuring the Authorship Gap in LLM PersonalizationAI can be prompted to write 'like someone,' but its own voice never fully disappears
- Automated Summarization of Financial News Using Large Language Models and Retrieval-Augmented Generation: An Early Empirical Study (Fall 2023)Testing AI summaries of stock news, the simple approach beat the trendy retrieval-based one
Latest from METAL MEDIA
Figures: Alexander Panfilov et al., arXiv:2608.09867, CC BY 4.0