Researchers Extract Proprietary Reasoning Traces from Anthropic, OpenAI and Google LLMs, Revealing Hidden Secrets

A team of eight researchers from institutions including ELLIS Institute Tübingen, the Max Planck Institute for Intelligent Systems, Tübingen AI Center, MATS and Snyk published a preprint detailing a practical attack that recovers full reasoning traces from closed LLM APIs. The method requires only two API calls and works by feeding encrypted reasoning blocks from strong models such as Claude Opus 4.8 into weaker models from the same provider, such as Haiku 4.5, which then reproduce the hidden chain-of-thought verbatim. Analysis of 6,708 publicly shared agent logs from GitHub and Hugging Face yielded 315,320 recovered traces containing 704 unique secrets, including 62 API keys, 33 passwords and 24 access tokens that never appeared in visible session output. The attack also enables extraction of internal safety policies, system prompts and detailed harmful planning that providers normally filter from final answers. In addition, the same mechanism can be used in reverse to inject malicious instructions into shared logs that later get replayed by unsuspecting users. The authors recommend treating encrypted reasoning blocks as sensitive secrets and propose cryptographic binding of traces to sessions, users and models.

HabrTranslated from Russian

Read at source

A new research paper demonstrates that the hidden reasoning traces generated by leading large language models from Anthropic, OpenAI and Google can be recovered in full by using weaker models from the same providers, without attacking the target model itself.

The technique, described in the preprint "Stealing Reasoning Traces from Proprietary LLM APIs," exploits the fact that providers return encrypted reasoning blocks to clients so the model can continue multi-turn conversations. Researchers discovered that these blocks can be submitted to a less-protected smaller model, which is then prompted to reproduce the original chain-of-thought verbatim.

Testing on 120 Codeforces problems confirmed that the recovered traces matched the token counts reported in API metadata, proving the output was genuine rather than hallucinated. When the same method was applied to publicly available agent logs on GitHub and Hugging Face, analysts recovered 315,320 reasoning blocks containing 704 unique secrets, among them 62 API keys, 33 passwords and 24 access tokens that existed only inside the encrypted portions.

Multiple attack vectors identified

The paper outlines four distinct risks. First, competitors can distill high-quality reasoning from stronger models without triggering distillation defenses. Second, internal safety reasoning that is normally filtered from visible answers can be extracted, revealing detailed discussions of criminal techniques. Third, the mechanism can be reversed to embed malicious instructions inside shared logs that later get replayed by other users as part of the model’s own past reasoning.

Finally, the visible summaries returned by APIs were shown to omit or alter the actual sequence of thoughts. On certain AIME problems, the full trace revealed that the model first recalled a known answer before attempting to solve the problem, a behavior absent from the polished summary presented to users.

The authors advise developers to treat encrypted reasoning blocks as sensitive credentials and to avoid publishing or reusing uninspected agent trajectories from public repositories.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in AI Security

Logical Argument Claims Full Alignment of Superintelligent AGI Is Fundamentally Impossible
Claude Account Bans Linked to IP Reputation, Device Environment and Payment Channels, But No Confirmed Formula
Local LLMs in AppSec: What Open Tools and Models Can Handle in Application Security