Stealing Reasoning Traces from Proprietary LLM APIs
AI公司把模型的思考过程加密隐藏起来,但研究者发现可以骗一个能力较弱的同门模型把它原样读出来
Anthropic、OpenAI、Google等公司现在会把推理模型在给出最终答案前的内部思考过程加密后再返回给用户,而不是直接明文展示。这篇论文发现这些加密的推理区块可以在不同会话、不同用户、甚至同一家公司的不同模型之间互换使用,于是利用这一点把强模型产生的加密推理喂给防护较弱的同门弱模型,让它原样转录成明文。他们用这种方法解码了从公开仓库抓取的315,320条推理区块,恢复出367项个人信息和182项账号密钥。
METAL LAB 解读图
利用弱模型解码加密推理的攻击流程
证据状态已报告实测结果
- 向强模型提问向像Opus 4.8这样防护严密的模型提问,获取其返回的加密推理区块(签名)。
- 转移加密区块把这个原本属于另一会话、另一用户或另一模型的加密区块,插入到对同公司另一模型的请求中。
- 交给弱模型把区块喂给像Haiku 4.5这样防护较弱的同门模型,并要求它把'自己的'思考原样输出。
- 得到明文弱模型解密并逐字输出了强模型原本隐藏的推理内容。
- 四种滥用方式可用于蒸馏专有推理、提取泄露的个人信息与密钥、暴露隐藏的有害内容、以及实施隐蔽的提示注入攻击。
他们做了什么
- 现代推理模型在给出最终回答前会先生成一大段内部思考文字,厂商为保护知识产权和安全,把这段内容加密后再发给用户。
- 研究团队发现这些加密的推理区块具有可移植性:同一家公司生态系统内,不同会话、不同用户、甚至不同模型之间都可以互相替换使用。
- 他们把强模型(例如Claude Opus)产生的加密推理注入到防护较弱的同门弱模型(例如Claude Haiku)中,要求它把自己的思考原样输出,结果弱模型把强模型的隐藏推理逐字转录成了明文,全程没有直接攻破强模型本身。
- 把这套方法应用到从GitHub和Hugging Face抓取的6,708条真实智能体会话记录上,解码出315,320条推理区块,恢复出367项个人身份信息(PII)和182项账号密钥,其中真实用户会话中就包含62个API密钥、33个密码、30个个人邮箱。
- 他们还证明,即使模型最终给出的可见回答安全地拒绝了恶意请求,危险信息仍可能残留在隐藏的推理过程中,并可通过同样的方法提取出来。

| 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 | ✗ | ✓ |

研究结果
- 在Anthropic、OpenAI、Google三家的API上,研究者都成功把强模型的加密推理注入防护较弱的同门弱模型(Haiku 4.5、GPT-5.6 Luna、Gemini Robotics 1.6),并让其原样输出明文推理。
- 在120道Codeforces编程题上,API报告的思考token数与重新编码后提取出的推理token数在大多数情况下高度吻合,支持提取结果的可信度。
- 对6,708条公开抓取的智能体会话解码出的315,320条推理区块中,共恢复出367项个人信息和182项账号密钥,其中真实用户会话里包含62个API密钥、33个密码、30个个人邮箱。
- 在恢复出的704项真实会话相关信息中,有64项完全没有出现在可见的聊天记录里,只存在于加密的推理区块内。
- 对Opus 4.8用改写过的HarmBench提示提问后,其最终可见回答安全拒绝了请求,但解码出的推理内容中仍包含了具体的有害信息(如汽车盗窃方法)。
可应用场景
- 使用推理模型API的开发者可以据此意识到,不应随意把包含加密推理区块的原始会话日志直接公开发布。
- AI服务提供商在设计或审查推理加密方案时,可以参考这篇论文揭示的跨会话、跨用户、跨模型可复用漏洞。
- 安全研究人员在审查其他多模型API生态系统时,可以借鉴这种跨模型兼容性测试方法。
局限与待验证事项
- 截至2026年8月,各厂商在论文披露后已采取了缓解措施,论文中描述的具体攻击方式已无法照原样重现。
- 实验只覆盖了Anthropic、OpenAI、Google这几家特定的模型组合,其他厂商或未来的模型是否存在同样漏洞尚未验证。
- 在解码的315,320条区块中,只有0.3%真正含有个人信息,不能因此推断所有公开的推理日志都存在同等风险。
- 推理提取的忠实度只是通过token数量匹配间接验证的,并不能保证提取内容与模型真实私有推理逐字完全一致。
- 论文提出的加密和系统层面的缓解方案目前只是建议,尚未被证实已经落地并生效。
为什么重要
这说明只审查AI最终给用户看的答案是不够的,因为敏感或有害内容可能完整地藏在被加密、来回传递的推理区块里。这对把会话日志公开分享的开发者尤其重要,因为他们可能在不知情的情况下,把藏在加密区块里的真实密码和个人信息一起泄露了出去。
本文术语
- 思维链/推理过程 · 模型在给出最终答案之前,一步步展开的内部思考文字
- 加密推理区块 · 厂商把模型的推理过程打包成一段无法直接读懂的加密文本,再传回给客户端
- 解码模型 · 被利用来把别的模型加密推理原样读出来的、防护较弱的模型
- AEAD认证加密 · 一种既加密内容又能验证内容是否被篡改的加密方式
- 蒸馏攻击 · 利用别家模型的输出或推理过程作为训练数据,复制出一个廉价的仿制模型
论文原文摘要(英文)
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.
在 arXiv 阅读最新论文
- SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?让AI编程助手去修复真实科学软件,连最强的那个也有一半以上任务没做对
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving把稀疏注意力从论文原型变成能真正上线服务的加速方案
- PolicyGuide: From Guarding One Action to Guiding the Whole Workflow for Policy-Compliant LLM Agents让客服AI坐席不只是拦住一个危险动作,而是把整个流程走对
- EXIMO: VLM Guided Exploration of VLA Policies不用人工遥控演示,让会说话的AI来教机械臂做新家务
- EnvHarness: Awakening Static Worlds for Agent Learning不重新搭建训练环境,而是给现有环境套一层可插拔组件,针对每个智能体的具体弱点重新塑形
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI助手在该向你提问的时候,却更愿意自己去核实事实
- SynFlow: A Multidimensional Diachronic Semantic Analysis Toolkit一款把单词意义变化拆解到语法细节的开源分析工具
- Automated Summarization of Financial News Using Large Language Models and Retrieval-Augmented Generation: An Early Empirical Study (Fall 2023)用AI总结股市新闻发现:简单的摘要方法反而比时髦的检索增强技术更靠谱
METAL LAB 最新报道
图片来源: Alexander Panfilov et al., arXiv:2608.09867, CC BY 4.0