Menu
← FIELD NOTESSECURITY 2026.11.21 · 15 min

Your prompt-injection defense was benchmarked against yesterday's attacker.

A defense that reports near-zero attack success looks finished — the number is published, the benchmark is named, the box is ticked. The number is conditional: it holds against static attacks, and against an attacker who optimizes against the specific defense, poisons the model upstream, or moves below the prompt entirely, the same defenses fall past fifty percent.

A team builds an agent that reads untrusted text — web pages, emails, documents, the output of a tool that called some other tool — and they know prompt injection is the exposure, because everyone knows that now. So they do the responsible thing. They pick a published defense with a paper behind it: an instruction-hierarchy fine-tune, a known-answer detector, a guardrail classifier, something with a benchmark and a number. The number is good — the paper reports attack success driven to a few percent, sometimes to zero, against a standard suite of injection attacks. The defense goes into the system, the security review notes prompt injection is “handled,” and the team moves on.

The reasoning passes review because the number is real. The defense genuinely was evaluated, the attack-success rate genuinely was near zero, and the paper is not lying. Nobody in the room is careless — they are reading a measurement and trusting it the way a measurement is meant to be trusted.

But the measurement has a denominator nobody read aloud. The near-zero rate was measured against a fixed catalogue of injection strings — the known attacks, run as written. That is a meaningful test. It is not the test. An attacker need not run the catalogue as written: they can optimize the attack against the specific defense you deployed, attack the model itself upstream before it ever reaches you, or put the payload somewhere the defense does not inspect at all. Against any of those the published number does not hold — and it is the only one the team has.

This post is about why a published prompt-injection defense score is conditional on a static attacker, why three distinct classes of stronger attacker each break that condition differently, and why a defense’s only honest score is its attack-success rate under the strongest adaptive attack against it, reported per threat model.

A static benchmark is not a security guarantee

The mistake is a measurement error, and it is worth naming precisely, because it does not look like one — it looks like the diligence a security review demands.

A benchmark of a prompt-injection defense is a fixed set of attack inputs run against the defense with the attack-success rate tallied. For most of what a benchmark measures, a fixed set is the right tool: factual accuracy, reasoning, and retrieval quality do not change behavior because you measured them. A model’s MMLU score is the same whether or not MMLU adapts to it — MMLU is not trying to beat the model, it is a passive ruler.

A security benchmark is not a passive ruler, because the thing it stands in for — an attacker — is not passive. The attacker’s job is to adapt to the defense. So a frozen attack set measures the defense against the one attacker who does not exist: the one who runs yesterday’s attacks unchanged and never adjusts when they fail. The number answers the wrong question — not “does this defense stop the attacks in the benchmark” but “does this defense stop the attack that will be built against it,” and a frozen benchmark cannot ask that. A near-zero published score is therefore consistent with a defense that genuinely raises the attacker’s cost, and equally consistent with one that collapses the moment an attacker spends an afternoon optimizing against it. Nothing in the static number discriminates between those two, and they are not the same thing to ship.

What the keystone result shows

The reason this is a post and not a hunch is that the gap between the static number and the adaptive number has been measured directly, across a representative set of defenses.

Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents (arXiv 2503.00061) takes eight defenses against indirect prompt injection — the realistic case, where the malicious instruction arrives inside a document or tool output the agent consumes — and asks one question: what happens to each defense’s attack-success rate when the attack adapts to it. Not a new attack — the same attack, optimized against the specific defense in front of it.

The finding is that all eight defenses break. Every one. The adaptive attack-success rate consistently exceeds 50% against every defense tested — defenses whose static success rates were low enough to look solved. The conclusion to internalize: a static evaluation of a prompt-injection defense is not evidence the defense works, because the adaptation that defeats it is cheap, general, and available to any attacker who cares to run it. Near-zero static, above-50% adaptive, for the same defense.

Mechanism one: the defense is a fixed target

A deployed defense is fixed — code, or a model with frozen weights, or a classifier with a decision boundary that does not move between requests. That fixity is what makes it deployable, and also what makes it a target. An attacker who can observe the defense’s behavior — submit an input, see whether it was blocked or passed — has everything a search procedure needs: a fixed function and a signal about whether a candidate is winning. Generate a candidate injection, test, observe, adjust, repeat — each round moving the candidate toward an input the defense passes and the model still obeys.

This is not a clever exploit. It is the generic structure of attacking any fixed defense, and it is exactly what the keystone result operationalizes across all eight of its targets. The defender designed the defense against the attacks they could imagine; the adaptive attacker designs the attack against the defense they can see. The asymmetry is total — the defense frozen and visible, the attack free to move — and a static benchmark scores the defense as though the attacker were frozen too. That this is a vulnerability class rather than a bug, not a defect a patch retires, is why a frozen defense stays a stationary target no matter how good its static score was.

Mechanism two: the model itself was poisoned

The second class of stronger attacker does not optimize against your defense. It arrives before your defense, in the model’s own weights.

Backdoor-Powered Prompt Injection Attacks Nullify Defense Methods (arXiv 2510.03705) studies what happens when the model an agent is built on was fine-tuned on poisoned data — when an attacker, somewhere upstream, planted a backdoor during training. The precondition must not be glossed: this attack works only if the attacker controlled some of the fine-tuning data. It is a supply-chain attack, in the same family as the model-provenance concerns that apply to any weights you did not train yourself, and a team that fine-tunes only on data it fully controls is not exposed to it. But fine-tuning on a base model, adapter, or hub dataset is the common case, and that is what the paper measures.

The measurement is stark. Backdoor-powered injection reaches an attack-success rate of 97.8% to 100% for phishing payloads, 90% to 100% for general injection, and 59% to 89% for system-prompt extraction, across Qwen2-7B, Mistral-7B, and Llama3-8B. Against the same models, baseline non-backdoor injection reaches only 0% to 39.4%. What matters for a defender who already shipped a defense is what the instruction-hierarchy defenses do here. StruQ and SecAlign — built specifically to make a model privilege its system instructions over injected ones — do cut the baseline attacks down, holding them to 0% to 39.4%; that is the number that gets published. But against the backdoor-powered attack, those same defenses leave attack success at 50% to 97.8%. The defense works against the attacker it was benchmarked on and is nearly inert against the one who poisoned the model — and the published static number reflects only the first.

Mechanism three: the attack moves below the prompt

The third class of stronger attacker does not touch the prompt the defense inspects. It moves one layer down. Before an LLM agent acts, it selects a tool — it consults a set of tool descriptions, decides which is relevant, and routes to it. Those descriptions are documents, retrieved and ranked, and that selection is a surface. Prompt Injection Attack to Tool Selection in LLM Agents (arXiv 2504.19793) attacks it directly: the ToolHijacker attack injects a malicious tool document so that, for a targeted task, the agent selects the attacker’s tool instead of the legitimate one. ToolHijacker reaches 96.7% attack success on GPT-4o in the MetaTool setting, 88.2% on ToolBench, and 85.4% to 99.6% across eight LLMs. Against the same target, baseline attacks barely register: naive injection 6.0%, context-ignoring 1.2%, JudgeDeceiver 30.2%, PoisonedRAG 39.3%. ToolHijacker is not an improvement on those — it is a different regime.

And the defenses fail outright, because they inspect the wrong thing. Against ToolHijacker, StruQ leaves 99.6% attack success and SecAlign 97.5% — the instruction-hierarchy defenses are almost entirely inert, because the attack is not in the instruction channel they police. Detection does no better: known-answer detection has a 100% false-negative rate against this attack, DataSentinel detects only 80% to 100% depending on configuration, and perplexity-based detection reaches 90%. A defense placed at the prompt cannot see an attack that lives in the tool-selection layer, and a benchmark that only ever fed attacks through the prompt never discovered the layer was undefended. This is the indirect-injection problem pushed one level deeper — the malicious text is in the routing metadata, not the retrieved content — and it is why red-teaming an MCP server has to treat the tool catalogue as attacker-reachable input, not trusted configuration.

Why static benchmarks mislead — and the harness that helps

Three papers, three attackers — and they are three different threat models, not three faces of one universal “adaptive attack.” Optimizing against a deployed defense, poisoning fine-tuning data, and injecting a malicious tool document are distinct capabilities with distinct preconditions; blurring them into one boogeyman would be its own error. What they share is a consequence: a frozen catalogue cannot contain the attack optimized against this defense, the backdoor attack that lives in poisoned weights, or the tool-selection attack that never touches the prompt. The benchmark is not measuring a weaker version of the threat — it is measuring a different, passive threat and labeling the result as security.

The minimum bar above a static benchmark is a dynamic evaluation harness — one where attacks are generated and adapted against the system under test, in a realistic agent environment, rather than replayed from a list. AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents (arXiv 2406.13352) is the kind of harness the field should be testing against: 97 realistic agent tasks and 629 security test cases, structured so attacks and defenses can both evolve inside the environment. AgentDojo is not, here, evidence that defenses collapse — it is the supporting infrastructure, the testbed an honest adaptive evaluation can run on at all.

The opposite failure: over-defense

There is a failure mode on the other side. The instinct, on reading everything above, is to make the defense more aggressive — block more, flag more, refuse anything that looks remotely like an injection. That instinct has its own measured cost. InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Models (arXiv 2410.22770) shows that state-of-the-art guardrail models, tuned hard against injection, drop to roughly 60% accuracy on the NotInject over-defense benchmark — 339 entirely benign samples that merely contain trigger words a guard has learned to fear. A guard that fails four benign inputs in ten is an availability outage with a security justification; InjecGuard itself improves over-defense accuracy by 30.8 points. “Drive the attack-success number to zero” is the wrong objective if it is the only one — a guard optimized for a low rate alone can buy that number with false positives on ordinary text.

What the claim does not cover

Two honest qualifications, because the version of this argument that overstates loses the reader who knows the field.

First, the three core results are on open-source 7-to-8-billion-parameter models or accessed through commercial APIs. The attack-success numbers — the above-50% adaptive figures, the 97.8% backdoor figures, the 96.7% ToolHijacker figure on GPT-4o — are real on the systems tested, and the mechanisms are general, but the specific percentages are not a constant of nature: frontier-scale and differently-trained models may sit higher or lower. What does not change is that a static benchmark will not tell you where.

Second, the three mechanisms have genuinely different preconditions: adaptive optimization assumes the attacker can observe the defense; the backdoor attack assumes the attacker controlled part of the fine-tuning data; the tool-selection attack assumes the agent does tool selection over attacker-reachable documents. AgentDojo and InjecGuard are not attacks — they are the dynamic harness and the over-defense benchmark. None of that softens the conclusion; it sharpens it. Which threat models you are exposed to is a question only an explicit per-threat-model evaluation answers, and the single published static number answers none of them.

Evaluating a prompt-injection defense honestly

You cannot make a prompt-injection defense that an adaptive attacker cannot probe — a deployed defense is a fixed, visible target. What you can do is stop reporting the static number as the defense’s security.

Treat any near-zero static attack-success number as unverified until an adaptive attack has been run against it. A published score against a fixed catalogue is a starting point, not a result — the adaptive number is the real one, routinely above 50% where the static one was near zero. Until your defense has been attacked by something that optimizes against it, you know its marketing, not its security.

Report attack-success rate per threat model, not as one figure. Adaptive optimization, supply-chain model poisoning, and tool-selection injection are different attackers, and a defense that resists one can be inert against another. Score each threat model the system faces as its own line.

Establish whether the model’s weights are in your trust boundary. The backdoor attack is precondition-gated: it requires poisoned fine-tuning data. If you fine-tuned on a base model, adapter, or hub dataset you did not audit, that precondition may be met, and an instruction-hierarchy defense will not save you. If you cannot establish provenance, treat the backdoor threat model as live.

Defend the tool-selection layer, not only the prompt. If the agent selects tools from a catalogue of tool documents, that catalogue is attacker-reachable input a prompt-level defense never inspects. Treat it as the untrusted-supply-chain surface that red-teaming an MCP server treats a tool provider as — screen and pin it.

Evaluate in a dynamic harness, not against a frozen string list. A static list cannot contain the attack built against your specific defense. An AgentDojo-style environment — realistic agent tasks, attacks and defenses both able to evolve inside it — is the minimum bar for measuring the defense against something that moves.

Watch the over-defense number while you push the attack number down. A guard tuned only for a low attack-success rate can collapse to roughly 60% accuracy on benign trigger-word input — an availability failure dressed as security. Measure false positives on the same dashboard as attack success; do not ship a guard that buys its number by blocking ordinary requests.

Put adaptive attacks in the security test suite, and re-run them. An adaptive attack is cheap. Run it against your own defense, and re-run it on every model swap, defense change, and new tool. A defense’s adaptive score goes stale the moment the system changes, and an untested defense has an unknown attack-success rate that is not zero.

The checklist

Before you call a prompt-injection defense good enough to ship:

  • The defense has been attacked by an adaptive attacker — an attack optimized against this specific defense — not only by a static catalogue, and the adaptive attack-success rate is the number on record.
  • Attack-success rate is reported per threat model — adaptive optimization, model poisoning, tool-selection injection — not as one blended figure.
  • The provenance of the model’s weights is established; if fine-tuning data cannot be audited, the backdoor threat model is treated as live.
  • If the agent does tool selection, the tool-document catalogue is treated as attacker-reachable input and screened, not trusted as configuration.
  • The defense was evaluated in a dynamic, adaptive harness (AgentDojo-style), not by replaying a frozen list of injection strings.
  • Over-defense is measured on benign trigger-word input, on the same dashboard as attack success, and the guard is not shipped if it fails ordinary requests at a meaningful rate.
  • Adaptive attacks are in the security test suite and are re-run on every model change, every defense change, and every new tool.
  • Someone has written down which threat models this defense does and does not cover, and accepted the residual on purpose.

Reading list

The defense the team shipped was real, and the near-zero attack-success number in its paper was not a lie — it was an honest measurement of how the defense behaves against an attacker who runs yesterday’s attacks unchanged and gives up when they fail. That attacker does not exist. The one who does will optimize against the exact defense in front of them, attack the model upstream of it, or route around it through the tool layer it never inspects — and against that attacker the defense’s score is not near zero, it is the number nobody measured. Run the attack that adapts, and report the rate it produces, per threat model. The static number was the answer to the wrong question.

NEW ENGAGEMENT · INTAKE

Tell us about it.

The more specific you are, the more useful our first reply.

SERVICE AREA
↩ ENCRYPTED IN TRANSIT
ASK THE FIELD NOTES BETA