This article discusses a critical security vulnerability in large language model (LLM) architectures where encrypted reasoning traces, intended for internal model state management and multi-turn conversations, can be extracted in plaintext by querying weaker models in the same family. It highlights the architectural trade-offs between statelessness, cost, and security, and the design implications for protecting sensitive information processed by AI models.
Read original on ByteByteGoModern large language models (LLMs) generate extensive internal reasoning traces (also known as chain of thought) before producing a concise answer. These traces are crucial for complex problem-solving and can contain highly sensitive information, including user data, internal hypotheses, and even hardcoded credentials if the model interacts with code. Providers face a dilemma: these traces are necessary for maintaining conversation continuity in multi-turn interactions, but exposing them poses significant commercial and security risks.
To enable stateless LLM servers to handle multi-turn conversations, state (the reasoning trace) must be persisted. Two primary architectural approaches are considered:
AEAD Envelope Structure
The encrypted block sent to the client is typically an AEAD envelope, which guarantees both confidentiality (hiding content) and integrity (proving content wasn't altered). It includes a header (model name, block type, version, key identifier), a nonce for unique encryption per use, an authentication tag, and the ciphertext. Importantly, researchers found that authentication often covers only the model/version, not the generating account or conversation ID, which contributes to compatibility vulnerabilities.
A critical architectural weakness identified is 'cross-model compatibility'. This means an encrypted reasoning block generated by a powerful, highly-trained LLM (e.g., Claude Opus, GPT-5.6 Sol) can be accepted and processed by a less-trained, cheaper model within the same family (e.g., Claude Haiku, GPT-5.6 Luna). These smaller models, optimized for speed and cost, often lack the robust anti-distillation and refusal training of their flagship counterparts.
To address these vulnerabilities, architects must consider enhancements to their AI infrastructure security: