Skip to content
Preprint

Inadvertent Context Leakage in Language Models

Aug 2026 · 0 citations
Computer Science

TL;DR

Leakage enables two practical attacks: a trained classifier that infers semantic predicates about user memories from routine natural-language outputs, and an RL-trained adversary that extracts full Social Security Numbers from a production-style agent.

Abstract

For AI agents to be useful beyond simple chat, they must hold sensitive user context such as calendars, credentials, health records, and financial data. We study whether the mere presence of such secrets in a model's context window introduces hidden correlations into the model's benign outputs, allowing reconstruction even when the model correctly refuses direct extraction. We further study whether an adversary can actively engineer prompts that amplify this effect, using the model as a covert carrier to transmit secrets through seemingly innocuous text. In both cases, this limited leakage is exploited using a novel adaptive attack that assumes black-box access to the underlying model. In controlled experiments across eight proprietary models, we find that 2-digit in-context secrets are reconstructed with near-perfect accuracy and 4-digit secrets at 82\% exact match, all from outputs the model produces in response to ordinary, non-adversarial requests. We observe that more capable models leak more: stronger instruction-following amplifies sensitivity to in-context secrets, suggesting leakage is a byproduct of capability as opposed to a patchable bug. We show this leakage enables two practical attacks: (1) a trained classifier that infers semantic predicates about user memories (e.g., health conditions, financial events) from routine natural-language outputs, and (2) an RL-trained adversary that extracts full Social Security Numbers from a production-style agent.

View source

Similar papers

Preprint Aug 2026

The Model's Tell: Measuring Context-Leakage Attack Signals with Behavior Gauges

This paper proposes LeakGauge, which probes this response by appending a suffix that gauges leakage behavior and mapping its prefill token probabilities to an attack-risk score, and shows that the risk score is sensitive to an internal leakage-related direction.

Maosen Zhang, Jianshuo Dong, Bo-Han Lu et al. · 1 citation
Jul 2026

ToxScreen: Detecting Whether an LLM Has Been Poisoned

No method reliably surfaces every backdoor, but a broadly jailbreakable model is itself anomalous, a useful signal even when the exact trigger is not recovered, allowing defenders to filter jailbreaks.

A. Hughes, N. Xing, Collin Francel et al. · 0 citations
#artificial intelligence Preprint Aug 2026

Not to Break, but to Attest: Adversarial Probes for Privacy-Preserving LLM Verification

A privacy-preserving zk-SNARK-based audit framework that searches for probes designed in the spirit of adversarial examples to amplify logit drift between an approved model and a modified deployment and demonstrates that token-based probes consistently deliver the strongest mean sensitivity across models and GPU platfo...

C. Wilding, Mina Shaker, Fatemeh Ganji · 0 citations
Preprint Aug 2026

Checked-In Secret Detection: Strings Are All You Need

Hardcoded secrets in source code pose critical security vulnerabilities which can be easily exploited by malicious adversaries. Existing regex-based detection approaches suffer from fundamental limitations, as secrets often lack identifiable patterns, resulting in poor precision and recall. Recent studies have explored...

Zhengdong Huang, Kevin Li, Jinqiu Yang et al. · 0 citations
Preprint Aug 2026

Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States

A probe-gated reasoning-based defense is introduced to bridge a knowledge-action gap in agentic LLMs when they are exposed to IPI attacks, and an analysis framework is introduced that identifies natural-language explanations strongly correlated with probe-captured signals.

Jianshuo Dong, Yiming Liu, Maosen Zhang et al. · 1 citation · ⚡1
Jul 2026

When Binaries Talk Back: Representation-Confusion Attacks on LLM-Assisted Reverse Engineering

Such failures are called Representation-Confusion Attacks in Reverse Engineering (RARE): the pipeline promotes a correctly extracted observation to instruction authority, claim-validating evidence, or trusted analysis state without the authority or support that role requires.

Igor Santos-Grueiro · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.