New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
// Analysis
Reframed Prompt Injection Makes Agents Leak Secrets
Published: Fri, 28 Aug 2026 • By Clara Nyx
Agents
New research shows tool-using LLM agents will exfiltrate secrets when an attacker reframes the leak as a signature, config field, or trusted host. Overt injections get blocked; reframed ones often succeed, jumping gpt-4o from 0% to 100%. Many defences fail. Only destination allow-lists and capability isolation consistently stop it.
Give a tool-using Large Language Model (LLM) agent a secret, let it read attacker-controlled pages, and you get the usual indirect prompt injection risk. This study finds a nastier twist: change the framing and the same leak waltzes past surface defences. They call it the framing gap. Overt injections are refused across models; relabel the leak as a mandatory integrity signature, a config field, or a look-alike trusted host, and gpt-4o goes from 0% leakage to 100% on some variants.
The setup is a synthetic lab with a canary secret and mock tools that record arguments. Success is counted only if the clean run keeps the secret and the poisoned run leaks it. That matters. It strips away hand-wavy scoring and shows the bifurcation cleanly: the model declines the naked attack, then happily ships the same bytes when they wear a badge.
How the attack lands
This is not about beating alignment; it is instruction versus data confusion. The agent reads attacker text that looks like task specification, not a rule to break. Remove the confidentiality policy and the base attacks stay at 0%, while reframing only ticks up from 31.9% to 38.1%. Once an attacker has a good template, the cost collapses: paraphrasing hits about 96% when trying three wordings; swapping in a different field inside that template works up to 60%. Inventing a new mechanism from scratch is hard at 0/130. The reusable asset is the template, not the bright idea.
Why common defences stumble
Policy-only fixes look brittle. A broad catch-all clause in the acting model can close leakage to 0%, but narrow the wording and it reopens to 48.8%. A published fine-tuned defence (SecAlign) still leaks 32.5% on a tool agent. Channel separation leaves 38.8%. An output-normalising guard folds to a held-out encoding: ROT13 passes at 100%, with a held-out set averaging 33.3%.
What actually works is payload-blind control. Destination allow-lists block exfiltration by construction when the destinations are closed. Splitting capability with a planner/reader design closes the gap to 0% in this single-step setting while keeping utility. The agent does not need to recognise an attack if it cannot route bytes to an attacker.
There are caveats. All tests are single-step with a canary and mock tools; no multi-call or replanning. Product checks on a deployed chatbot showed no leaks, but the mechanism was not attributed. Wording and model variance matter. Still, the point lands: if your security story is “the model will notice”, you are solving the wrong problem. Constrain where data can go and who can touch it, or templated reframing will do the rest.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
The Framing Gap: Indirect Prompt-Injection Exfiltration Defeats Surface-Level Defenses in Tool-Using Agents
Authors: Md Habibur Rahman and Jaeho Kim
A tool-using LLM agent that reads attacker-controlled web content while holding a secret faces indirect prompt injection: the content may make it exfiltrate the secret. In a safe synthetic lab (canary secret, mock tools, matched clean-vs-poisoned metric) we report the framing gap: across six models, ten overt injection classes are refused (gpt-4o 0%), but reframing the identical leak as a mandatory integrity signature, config field, or look-alike "trusted" host drives gpt-4o 0% to 100%. The attack is cheap, and its cost is three-level: paraphrasing a known mechanism is trivial (96% at 3 wordings), swapping the field inside a known-effective template is also cheap (up to 60%), while authoring a fresh page around a new mechanism is hard (0/130) -- the reusable asset is the template, not the mechanism. An ablation shows the mechanism is instruction/data confusion, not defeated alignment: removing the confidentiality policy leaves base attacks at 0% and moves reframing only 31.9% to 38.1%. What closes the gap is payload-blind checks: a destination allow-list (0%, when destinations are closed) and a capability-isolating planner/reader split (0%). A broad "in any form" policy clause also closes it at the acting model (to 0%) but is brittle (dropping the catch-all reopens it to 48.8%). A published fine-tuning defense (SecAlign, CCS 2025) does not close it on a tool agent (32.5%, positive-control-validated), nor does channel separation (38.8%); an output-normalizing guard loses to a held-out encoding (ROT13, 100%). Robustness comes from constraining the destination or isolating the capability, not from the acting model recognizing the attack.
🔍ShortSpan Analysis of the Paper
Problem
This paper studies indirect prompt injection against tool-using language agents that hold a confidential value and read attacker-controlled content. The attacker can embed text that causes the agent to treat the confidential value as ordinary data (for example as a checksum, runtime field, or trusted-host parameter) and thus exfiltrate it. This is important because many deployed agents combine a secret in context, the ability to read untrusted content, and tool calls that send data outside, creating a realistic exfiltration path that can defeat surface-level defences.
Approach
The authors build a safe synthetic laboratory using a canary secret and mock tools that record arguments but do not transmit bytes. They define a matched clean-versus-poisoned success metric: an attack only counts if the benign run keeps the secret and the poisoned run leaks it. They evaluate six models across five families (including two OpenAI API models and four open-weight models) over ten overt injection classes and an expanded reframing family that relabels the same leak as integrity signatures, config fields, or look-alike trusted hosts. They run paraphrase sweeps, ablations that remove confidentiality policies, detector checks, product tests against ChatGPT, and multiple defensive interventions: enumerating policies, egress guards (literal and normalising), destination allow-lists, and capability isolation via a planner/reader split (CaMeL-style). All experiments are single-step decisions to keep the metric unambiguous.
Key Findings
Framing gap: models that refuse overt injection can still follow the identical leak when it is reframed. For example, gpt-4o is 0% on the un‑reframed baseline but reaches 100% on some reframings.
Attack cost is low once an effective template exists: paraphrasing a known mechanism yields ~96% success when trying three wordings; swapping a field into an effective template succeeds up to 60%; authoring an entirely new mechanism proved hard (0/130 trials).
Mechanism is instruction/data confusion: removing the confidentiality policy leaves base attacks at 0% and raises reframing only from 31.9% to 38.1%, showing the model follows injected steps that read as task specification rather than bypassing a refusal.
Input-side detection can flag reframing variants with 100% recall under a tailored prompt, and an acting-model policy that contains a broad "in any form" clause can close the gap to 0%, but this is brittle: narrowing the wording reopens leakage to 48.8%.
Surface defences often fail: a published fine-tuned defence (SecAlign) leaves 32.5% leakage on a tool agent, channel separation leaves 38.8%, and an output-normalising guard is evaded by held‑out encodings (ROT13 evaded it; held-out set produced 33.3% overall).
Robust mitigation requires payload-blind checks: destination allow-lists block leaks by construction when destinations are closed, and capability isolation via a planner/reader split closes the gap (0%) while preserving task utility in the single-step setting.
Limitations
Experiments are single-step and use a synthetic canary secret and mock tools; multi-call or re-planning attacks and realistic benign corpora for false-positive analysis are untested. Product tests on ChatGPT showed no leaks but the underlying mechanism was not attributed. Results depend on chosen wordings and models; wording and run-to-run variance are substantial.
Implications
An attacker who controls fetched content can cheaply exfiltrate secrets by reframing the leak as benign data or a required field, exploiting instruction/data confusion. Once an effective template exists, only minor paraphrasing is needed to succeed. Defenders that rely on the acting model recognising malicious phrasing, or on fine-tuning or channel separation alone, remain vulnerable. System-level controls that prevent or constrain destinations or isolate the capability that holds secrets are the most robust mitigations for offensive actors seeking to extract confidential values.
- Core idea: embedded hints in automatically generated URL previews can nudge an agent to make outbound requests that leak runtime context, even if th...
Why it’s relevant (in simple terms):
- It shows that stopping prompt injections isn’t just about what the model sees, but about whether malicious cont...
- The paper systematically tests many prompt-injection techniques to see which are most effective, revealing concrete weaknesses in current defenses. ...
- It studies defenses that sit outside the LLM (out-of-band) to prevent prompt injections, using ideas like integrity protection, reference monitoring...
- It argues that prompt-injection vulnerabilities are hard to fully defend against, because attackers can craft contexts that bypass protections and e...
- It analyzes how AI agents using LLMs can accidentally leak credentials when trusted and untrusted content sit together, creating a real security ris...
- It reveals a new stealthy attack channel: hiding a prompt or payload inside numeric/float structured input, reconstructed only during processing, no...
- It tackles a tricky way attackers hide malicious prompts inside normal-looking, domain-specific text, which can slip past detectors.
- The study tes...
- Addresses the top LLM security risk: prompt injection in retrieval-augmented generation (RAG) systems, including indirect attacks via poisoned docum...
- It shows how simple prompt tricks can make LLM-powered agents leak personal data observed during their work, even when safety measures are in place....
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.