← Lab /AI/ML

In-context secrets can be reconstructed from benign model outputs

Models leak user secrets through hidden correlations in ordinary responses, enabling reconstruction even when direct extraction is refused

AI/ML arXiv 20 Aug 2026 Attack Prototype evidence Threat model

Published as “Inadvertent Context Leakage in Language Models”

Why it matters

Personal agents that keep private data in-context are vulnerable to covert extraction of that data, even when they refuse to disclose it textually.

Summary

In-context secrets leak through non-linguistic channels: adaptive black-box adversaries can reconstruct numeric secrets and even full SSNs from benign model outputs. Experiments on eight frontier proprietary LLMs show up to 100% reconstruction of 2-digit secrets, 82% of 4-digit secrets, 41% per-digit accuracy for 8-digit secrets, and 97% success on the leading digit of a 9-digit SSN, far above chance. The evidence spans multiple models, secret lengths, and both passive and active attacks, though a few models show no leakage beyond chance for longer secrets.

What they found 2

  1. Adaptive adversary achieves perfect reconstruction of 2-digit secrets on two frontier models.

    “An adaptive adversary reaches 100% full-secret reconstruction at N=2 on Claude Opus 4.6 and Gemini 3.1 Pro”

  2. Prompt-injection attack recovers the leading digit of a 9-digit SSN in 97.1% of trials on Claude Opus 4.6 and 88.6% on Gemini 3.1 Pro.

    “It recovers the leading digit in 97.1% of trials on Claude Opus 4.6 and 88.6% on Gemini 3.1 Pro”

Caveats 5

  • Two models (Grok 4.1 Fast and GPT-5.4 nano) never exceed chance at secret lengths N≥4, showing the attack does not universally succeed.
  • Within the leaky tier, higher suppression does not consistently predict higher leakage (correlation drops to ρ=0.50 for the three leaky models).
  • Our experiments target two predicate families-digit values and binary attributes-on a fixed set of models. We leave generalization to other predicate types, models, and deployment configurations open.
  • We do not evaluate the stronger threat model where the adversary cannot query the model at will.
  • All eight evaluated models are proprietary and reachable only through their APIs, so we evaluate the black-box case alone.

What’s new here 4

  • Considers non-textual output channels (token patterns, length, formatting) for leakage, beyond prior linguistic judges.
  • Introduces an adaptive black-box adversary that learns model-specific leakage channels.
  • Defines and measures a suppression metric linking instruction compliance to leakage.
  • Demonstrates active prompt-injection attacks that extract full SSNs from production-style agents.

Threat model stated by the source

Adversaryadaptive adversary with black-box query access
Capabilitycan issue arbitrary prompts to the target model and observe generated text (no logits or internal states)
Assumesknows the length of the secret; the deployment designates the protected value via a confidentiality instruction