The Reasoning Trace Privacy Problem: How Chain-of-Thought Leaks Sensitive Data in Production
Your reasoning model correctly identifies that a piece of data is sensitive 98% of the time. Yet it leaks that same data in its chain-of-thought 33% of the time. That gap — between knowing something is private and actually keeping it private — is the core of the reasoning trace privacy problem, and most production teams haven't built for it.
Extended thinking has become a standard tool for accuracy-hungry applications: customer support triage, medical coding assistance, legal document review, financial analysis. These are also exactly the domains where the data in the prompt is most sensitive. Deploying reasoning models in these contexts without understanding how traces handle that data is a significant exposure.
What Makes Reasoning Traces Different from Outputs
When a model produces a final answer, there are years of alignment work aimed at preventing it from repeating sensitive information it shouldn't repeat. Reasoning traces — the internal scratchpad that thinking models use before generating a response — have received far less of that treatment.
Research published at EMNLP 2025 ("Leaky Thoughts: Large Reasoning Models Are Not Private Thinkers") quantified this precisely. Models tested could identify sensitive information as sensitive 98% of the time. But in 33.1% of cases, they still leaked that information inside their reasoning traces. The mechanism was mostly mundane: 74.8% of reasoning trace leaks were simple recollection — the model mechanically copying input data into the scratchpad the same way you might transcribe notes before processing them.
This matters because the attack surface is different. Output leaks tend to involve contextual misunderstanding — the model doesn't grasp why repeating something is harmful. Trace leaks are structural: the model uses the scratchpad as working memory, and if your SSN or diagnosis is in the input, it frequently ends up in that working memory verbatim before any output-layer safety check runs.
Three Ways Traces Reach Attackers
Direct exposure through the API. Many implementations pass full thinking blocks back to clients for transparency. This is explicitly discouraged in production for sensitive domains, but it's the default behavior in several frameworks and the path of least resistance. Users who see thinking traces — or internal dashboards that display them — get everything the model wrote during deliberation.
Injection into reasoning from adversarial inputs. A class of attacks called H-CoT (Hijacking Chain-of-Thought) demonstrated in early 2025 that reasoning transparency itself becomes an attack vector. By manipulating the displayed reasoning steps and feeding them back to the model, attackers can redirect the model's thought process. Under these attacks, o1's safety rejection rates dropped below 2%. The same technique affected o3, DeepSeek-R1, and Gemini 2.0 Flash Thinking. When a model's reasoning can be hijacked, whatever sensitive data was in that reasoning becomes extractable.
Logging and observability pipelines. This is the most common production exposure, and the least visible. Observability systems that capture full request-response pairs for debugging include reasoning traces in that capture. Teams build dashboards. Dashboards get shared. S3 buckets get misconfigured. What started as a debugging aid becomes a permanent record of every sensitive thing that passed through the system. The DeepSeek infrastructure incident in January 2025 — where Wiz Research found a publicly accessible ClickHouse database containing over one million lines of log streams with user chat history — is a case study in what happens when trace data isn't treated with the same care as output data.
The Extended Thinking Paradox
There's an uncomfortable tradeoff buried in the current generation of reasoning models: the more you invest in thinking compute, the more private data gets written into traces.
Longer reasoning chains use more of the context from the original prompt. The model traces more paths through the problem, references more details to reason correctly, and produces a more thorough scratchpad. All of this improves accuracy on complex tasks. It also means a 32-token thinking budget exposes less PII than a 32,000-token budget — even if the final answer in both cases would have been the same.
For most general-purpose tasks this doesn't matter. But if you're running a model on intake forms, medical records, legal filings, or financial statements, you're using exactly the tools that make extended thinking most beneficial in exactly the contexts where the extended thinking creates the most exposure.
What Actually Mitigates This
Prompt-level privacy instructions. Explicit lists outperform abstract principles. Telling a model "do not include PHI in your reasoning" produces worse results than "do not include these specific field types in your reasoning: patient_name, diagnosis_code, date_of_birth, insurance_member_id." Models respond to specificity because they can match against it. Abstract instructions require generalization the model may not make reliably. Research on Chain-of-Sanitized-Thoughts (a 2025 paper from the EMNLP privacy track) found that instruction-level guidance significantly reduces trace leakage for frontier models, though weaker models need fine-tuning to get the same effect.
- https://arxiv.org/pdf/2506.15674
- https://arxiv.org/pdf/2601.05076
- https://arxiv.org/pdf/2511.07772
- https://arxiv.org/pdf/2603.05618
- https://arxiv.org/html/2502.12893v1
- https://www.trendmicro.com/en_us/research/25/c/exploiting-deepseek-r1.html
- https://joshthompson.co.uk/ai/gemini-cot-leak-llm-safety-persuasion-reliability/
- https://www.wiz.io/blog/wiz-research-uncovers-exposed-deepseek-database-leak
- https://platform.claude.com/docs/en/build-with-claude/extended-thinking
- https://konghq.com/blog/enterprise/building-pii-sanitization-for-llms-and-agentic-ai
- https://docs.wandb.ai/weave/guides/tracking/redact-pii
- https://optyxstack.com/security-compliance/llm-logging-without-pii-observability-patterns
- https://genai.owasp.org/llmrisk/llm01-prompt-injection/
