Published: 2026-11-23
Categories: AI Agent Security
Coverage, Not Count: Prompt-Injection Red-Team Data for Hardening Agents
Key Takeaways
A preprint published on November 18, 2026, PIPETTE: Prompt Injection Purple-Teaming for Robust LLM Agents, adds weight to a concern that security teams running automated red teaming should take seriously. A red-team campaign can report a high attack success rate and thousands of successful injections, and those findings can still do little to harden an agent when they are reused as adversarial training data [1]. The authors, from the University of Waterloo, Zhejiang University, and KTH, show that two reinforcement-learning (RL) red-teamers, RL-Hammer [2] and PISmith [3], tend toward “mode collapse.” They keep finding variations of the same few attack strategies, and the extra successes “add no additional robustness improvements” [1]. The study is an arXiv preprint and has not yet been peer reviewed.
- Volume and success rate did not predict defensive value. In three of the four training settings the authors tested, though by narrow margins in two, the red-teamer that produced more successful attack strings yielded a defended agent that was less robust against held-out adaptive attacks. The clearest case was Qwen3-4B trained with RL: worst-case attack success was 47.5% with PISmith data versus 27.5% with RL-Hammer data [1].
- Coverage of distinct strategies, not raw count, appears to be what matters. PIPETTE’s own red-teamer rewards attacks for being new at the strategy level. It produced both the highest attack volume and the most robust defended agents, which suggests volume is not harmful in itself but is a poor stand-in for coverage [1].
- Lexical diversity metrics can be gamed. RL attackers given rewards for wording diversity learned to change letter case or prepend irrelevant text while reusing the same strategy [1][2].
- How the defense is trained matters as much as the data. Off-policy fine-tuning and outcome-only RL lowered benign utility, in one case from 40.21% to 15.46%. PIPETTE’s on-policy training with token-level rewards held or slightly improved utility [1].
- The evidence has limits. It comes from one preprint using models of 27B parameters or smaller and a limited adaptive-attack budget. The authors state that they “do not establish low strategy coverage as the sole cause” of the effect [1].
For practitioners, the main lesson is about how to measure red teaming. Counts of findings and attack success rates are reasonable measures of how exposed a system is. They are weak measures of how much a red-team corpus is worth for hardening that system. The study tested only model-level fine-tuning, but the same logic plausibly applies to guardrail classifiers and detection rules trained on red-team output. Organizations that feed red-team output into any of these should measure strategy coverage directly.
Background
Prompt injection remains one of the most serious security weaknesses of LLM-based agents, and OWASP ranks it first among risks to LLM applications [11]. In agentic systems, the most serious form is indirect: the hostile instruction arrives in a tool output, a retrieved document, an email, or a web page, rather than from the user. Benchmarks such as AgentDojo [5] and AgentDyn [4] turn this threat into “task pairs.” A legitimate user task is paired with an injection goal hidden in the agent’s environment, and success is measured on two axes: did the agent finish the user’s task, and did it carry out the attacker’s instruction?
Defenses fall into two broad families. System-level defenses sit outside the model. They include architectural approaches such as CaMeL, which restructure the agent so that untrusted data cannot change control flow [9], and input detectors such as Meta’s Prompt Guard, which classify inputs before they reach the model [17]. Model-level defenses, by contrast, train the model itself to resist injected instructions. Examples include the instruction hierarchy work [10], Meta-SecAlign [6], and the adversarial training Google DeepMind described in its account of defending Gemini [8]. Model-level defenses depend on the quality of their adversarial training data, and that data increasingly comes from automated red-teamers rather than hand-written attacks.
Researchers have built RL-based red-teamers because static attack sets go stale quickly. Nasr et al. showed that adaptive attackers, given enough search budget, bypassed all 12 recent jailbreak and prompt-injection defenses they evaluated, most with attack success above 90% [7]. RL-Hammer trains an attacker model to maximize attack success against defended targets, and it reports high success rates even against models trained to resist injection [2]. PISmith takes a similar RL approach aimed at prompt-injection defenses, and it reports that broadening its training data raised single-attempt success against Meta-SecAlign-8B from 0.87 to 0.99 [3]. It seems natural to feed these strong attackers’ output back into defensive training, and that “purple-teaming” loop is the subject of the PIPETTE study.
The tension between how effective an attack is and how diverse attacks are is not new to red teaming. Earlier OpenAI work on automated red teaming found that RL attackers tend to settle on narrow, repetitive attack patterns unless they are explicitly rewarded for diversity [12]. RL-Hammer’s own authors reported that their attacker learned to “reward-hack” diversity objectives [2]. PIPETTE’s contribution is to measure what that collapse costs on the defensive side once the attacks become training data.
Security Analysis
The Volume Fallacy in Adversarial Training Data
The PIPETTE authors trained four defended agents: two base models (Qwen3-4B-Instruct and Llama-3.1-8B-Instruct), each trained by two methods (supervised fine-tuning and outcome-reward RL). Each was trained on attacks collected by RL-Hammer or PISmith against 560 AgentDyn task pairs [1]. They then tested every defended agent against adaptive search attacks on held-out AgentDojo tasks. The table below sets the size of each red-team corpus beside the worst-case attack success rate the resulting defended agent showed later.
| Base model | Red-teamer | Train-time ASR | Attack strings collected | Worst-case ASR after RL training | Worst-case ASR after SFT |
|---|---|---|---|---|---|
| Qwen3-4B | RL-Hammer | 33.39% | 4,282 | 27.5% | 15.0% |
| Qwen3-4B | PISmith | 68.75% | 7,132 | 47.5% | 12.5% |
| Llama-3.1-8B | RL-Hammer | 25.18% | 1,671 | 25.0% | 15.0% |
| Llama-3.1-8B | PISmith | 27.32% | 1,783 | 27.5% | 20.0% |
| Qwen3-4B | PIPETTE-Red | 70.54% | 8,299 | 20.0% | 2.5% |
| Llama-3.1-8B | PIPETTE-Red | 41.07% | 2,112 | 10.0% | 5.0% |
Source: PIPETTE [1], Table 2, Figure 2, and §5.2/Figure 5. Worst-case ASR is the highest of the ChatInject, TAP, and Genetic attacks on 40 AgentDojo task pairs.
In three of the four RL-Hammer versus PISmith comparisons, the larger, higher-success corpus produced the more vulnerable agent. The exception was supervised fine-tuning on Qwen3-4B, where PISmith data did slightly better. The authors summarize the result cautiously: higher train-time success and larger datasets “do not guarantee stronger inference-time robustness, likely due to a lack of coverage of distinct attack strategies” [1]. They also note that the red-teamers differ in dataset size and sampling. The comparison therefore points in a direction but is not a controlled test of volume alone.
The margins behind that pattern also deserve attention. Because the adaptive evaluation uses 40 task pairs, each 2.5-point difference corresponds to a single task pair. The Qwen3-4B RL gap of eight task pairs is substantial. The two Llama-3.1-8B gaps, of one and two task pairs, are within the range that could arise from noise, and the two Llama corpora are close in both size and train-time success, so those rows barely test volume at all. The pattern is therefore suggestive rather than statistically established.
The bottom two rows matter just as much for interpreting the result. PIPETTE-Red collected the most successful attacks in both settings, and its data produced the most robust agents in all four. That outcome argues against reading the finding as “fewer findings are better.” The more defensible reading is that attack count is a noisy proxy. Thousands of rephrasings of one strategy can patch “only a single vulnerability,” as the authors put it, while a corpus spanning many strategies teaches the defended model something more general [1].
Why RL Red-Teamers Collapse
An RL attacker rewarded only for successful injections needs to find just one working strategy and then apply it across every task [1]. PISmith adds an entropy bonus to encourage exploration, but the bonus shrinks once average reward crosses a threshold. In effect, exploration relaxes as soon as the attacker finds something that works. RL-Hammer adds diversity rewards based on BLEU scores and embedding distance. These measure surface wording, so the attacker satisfied them by changing letter case, rewording, or adding irrelevant preamble while keeping the same underlying approach [1][2].
PIPETTE quantifies this with an “Explainability Score” (ES). An LLM extracts a task-agnostic description of the strategy behind each successful injection. Sparse dictionary learning then condenses these descriptions into a set of 32 “strategy primitives.” A new attack’s ES reflects how well the existing dictionary already explains it: a reworded duplicate scores near 1, and a new strategy scores near 0 [1]. When unseen ChatInject attacks were scored against each red-teamer’s accumulated dictionary, a higher score is better, because it means the red-teamer’s dictionary already explains attacks it never saw. On that measure, RL-Hammer leveled off at an ES of about 0.20 (Qwen3-4B) and 0.35 (Llama-8B). PISmith stalled or drifted downward after early iterations, and PIPETTE-Red reached roughly 0.60 and 0.77 [1]. The authors call this “strategy-level mode collapse.” The term names a failure that dashboards reporting only attack counts and success rates would not reveal.
One caveat applies to these figures. PIPETTE-Red is trained to produce attacks with low ES during red-teaming, and the ES evaluation relies on the same dictionary mechanism and LLM-extracted strategy descriptions [1]. The ES comparison is therefore not fully independent of PIPETTE-Red’s training objective, and the downstream robustness results in the table above are the stronger evidence of its coverage advantage.
The Defensive Training Method Also Carries Risk
The second half of the study concerns how the defender learns from adversarial data, and the findings bear directly on deployment. Supervised fine-tuning imitates fixed “clean” trajectories and gives no feedback when the model drifts away from them. Outcome-only RL assigns one reward per trajectory and cannot tell which tokens caused a failure. That can push the model toward refusing or stopping early [1]. Both baselines cost real utility. On Llama-3.1-8B, benign task completion on AgentDojo fell from 40.21% to 15.46% after SFT on RL-Hammer data. On Qwen3-4B it fell from 61.86% to 49.48% [1]. A defended agent that completes fewer than two-fifths as many legitimate tasks is a plausible candidate for rollback or workarounds by its operators, which would itself be a security outcome.
PIPETTE-Blue combines a short supervised warm-up with on-policy RL. The reasoning it teaches rests on two checks: does the observation contain an instruction, and does each tool call serve a goal the user actually authorized? The authors frame the principle this way: observations “may supply the data for that goal but cannot authorize a new one” [1]. A token-level contrastive reward credits individual tokens that are more likely when the model is primed to ignore the injection than when primed to follow it. With this approach, benign utility rose slightly above the undefended baseline on both small models, to 64.95% on Qwen3-4B and 41.24% on Llama-8B [1].
Comparative Results Against Existing Defenses
The authors also compared the full PIPETTE pipeline with published defenses on benchmarks not used in training. The headline results are summarized below, including the ChatInject setting where competing defenses achieved lower attack success at a cost in utility. Every figure in the table comes from the PIPETTE preprint and has not been independently reproduced.
| Setting | Comparison defense | Comparison result | PIPETTE result |
|---|---|---|---|
| Qwen3-4B, AgentDojo static attacks (avg. ASR / benign utility) | CaMeL | 1.71% / 57.73% | 0.48% / 64.95% |
| Qwen3-4B, ChatInject (ASR / utility under attack) | PromptGuard; CaMeL | 0.24% / 16.19%; 0.95% / 33.81% | 1.43% / 58.10% |
| Llama-3.1-8B, AgentDojo static attacks (avg. ASR / benign utility) | Meta-SecAlign | 0.81% / 29.90% | 0.43% / 41.24% |
| Llama-3.1-8B, adaptive TAP / Genetic ASR | Meta-SecAlign | 2.5% / 12.5% | 0.0% / 2.5% |
| Qwen3.6-27B, adaptive TAP / Genetic ASR | SecOPD | 15.0% / 30.0% | 2.5% / 5.0% |
| GPT-OSS-20B, adaptive TAP / Genetic ASR | Native instruction hierarchy | 50.0% / 92.5% | 5.0% / 10.0% |
Source: PIPETTE [1], Tables 5, 6, and 9.
These results deserve careful reading. The adaptive evaluation used 40 task pairs that static attacks had already compromised on undefended Qwen3-4B, so they may be less representative of the hardest cases for the other models. Search budgets were about 250 attempts per pair, and the attacker was a 4B-parameter model. The authors acknowledge that “a larger budget may achieve higher ASR” [1], and Nasr et al. showed how much stronger adaptive attacks can push reported robustness down [7]. Static attacks are not uniformly solved either. On ChatInject, PromptGuard and CaMeL achieved lower attack success than PIPETTE, but at a substantial cost to utility under attack [1]. The LLM grader behind the Explainability Score has not been validated against human labels, and the study ran only a single red-team/blue-team round [1].
Implications for Enterprise Red-Team Programs
These findings reach beyond academic benchmarks. Enterprise AI red-team programs, whether internal, contracted, or automated through commercial platforms, commonly summarize results as counts of successful attacks or overall success rates, in CSA’s observation of current practice. Those numbers then shape remediation priorities, guardrail training sets, and assurance claims. If a large share of findings are variations of one strategy, a program could patch that strategy thoroughly, report a dramatic fall in success rate, and remain exposed to every strategy it never explored. The PIPETTE results suggest that, at least for model-level defenses, a corpus’s diversity at the strategy level is a better guide to its hardening value than its size [1].
The study also reinforces a point that recurs across the prompt-injection literature: model-level training alone is not sufficient. Google DeepMind’s account of Gemini’s defenses describes adversarial training as one layer among several, combined with system-level controls [8]. Architectural approaches such as CaMeL show that limiting what untrusted data can authorize can provide guarantees, within their threat model, that training alone cannot [9]. Notably, PIPETTE-Blue’s reasoning check echoes CaMeL’s design principle, though it learns that rule in model weights rather than enforcing it in the system architecture.
Recommendations
Immediate Actions
Organizations that use automated red-team output for fine-tuning should audit those corpora for strategy-level duplication before the next training cycle. The study did not test guardrail classifiers or detection signatures, but corpora used for those purposes are plausibly subject to the same effect and merit the same audit. A practical first step is to cluster successful attacks by the technique they use rather than by surface wording. Examples of techniques include authority impersonation, fake system messages, chat-template injection, and task-completion framing. Then count how many distinct clusters are present. If a handful of clusters account for most findings, the corpus is likely to give narrow protection whatever its size.
Red-team reporting can begin to reflect this now at little cost. Reports should give the number of distinct attack strategies alongside the number of successful attacks. Where a workable strategy taxonomy exists, organizations should consider making remediation sign-off conditional on evidence that each strategy class has been addressed, rather than on a fall in overall attack success rate alone. Teams should also measure benign task completion before and after any defensive fine-tuning. The utility losses in the PIPETTE baselines show that a defense can appear to succeed on security metrics while making the agent unusable [1].
Short-Term Mitigations
Over the next one to two quarters, teams that run their own RL or search-based red-teamers should replace lexical diversity rewards with strategy-level novelty measures. These might use an LLM-extracted strategy description, as PIPETTE does, or a curated attack taxonomy. Following PIPETTE’s design, novelty rewards should apply only to successful attacks, so that the attacker cannot earn credit for diverse failures [1]. Evaluation should always hold out benchmarks and attack families that were not used in training. PIPETTE’s separation of AgentDyn for training from AgentDojo and ASB for testing is a reasonable template [1][4][5].
Where defensive fine-tuning is used, on-policy methods that give the model feedback on its own behavior appear to preserve utility better than off-policy imitation [1]. Teams should still validate any defended model against adaptive attackers with meaningful search budgets, following the methodology of Nasr et al. [7], before relying on reported robustness. Model-level hardening should be paired with system-level controls such as least-privilege tool access, separate handling of untrusted content, and human confirmation for high-impact actions.
Strategic Considerations
At a longer horizon, the field needs shared, maintained taxonomies of prompt-injection strategies, not just shared corpora of attack strings, so that coverage can be measured consistently across vendors and assessments. Assurance programs and third-party evaluations of AI agents should consider asking for strategy coverage evidence instead of headline success-rate figures alone. Multi-round purple-teaming, in which red and blue stages alternate as attacker and defender co-evolve, is an open research problem. The PIPETTE authors note that once a model is hardened, a new red-teamer may succeed too rarely to begin learning [1]. Organizations should treat robustness claims from single-round training as provisional. They should expect that new attack strategies will appear and plan for continuous reassessment.
CSA Resource Alignment
CSA’s Agentic AI Red Teaming Guide [13] is the most directly relevant CSA publication. It sets out practical test procedures for autonomous agents across threat categories that include goal manipulation, agent hijacking, and untrusted input handling. The PIPETTE findings add a methodological layer to that guidance. Structuring an engagement around the guide’s threat categories encourages breadth across threat types, and the evidence reviewed here suggests teams should go further and measure coverage at the level of attack strategy within each category. This matters especially when automated tooling generates findings at scale and when those findings will be reused as training data.
CSA’s research note Agent Data Injection: A New Attack Class Beyond Prompt Injection [14] describes attacks that corrupt the trusted metadata agents rely on and slip past defenses tuned to instruction-like injections. It reinforces this note’s central concern from another direction. A defense trained on a corpus dominated by one family of attacks may perform well on that family and fail on attack classes the corpus never covered. Strategy coverage audits should therefore include attack classes that sit beside classical prompt injection.
The AI Controls Matrix (AICM) v1.1 [15] provides the control framework for putting these recommendations into practice. Its Threat and Vulnerability Management and Application and Interface Security domains address adversarial testing and the validation of AI-specific defenses. The coverage-based reporting and held-out validation practices recommended above can serve as evidence for those controls. Finally, MAESTRO [16], CSA’s agentic AI threat modeling framework, offers a layered taxonomy that organizations can use as a starting point for the strategy-level classification this note recommends. Mapping red-team findings to MAESTRO layers and threat categories is one practical way to show coverage and expose blind spots.
References
[1] He, L., Wang, Y., Zhang, J., and Asokan, N. “PIPETTE: Prompt Injection Purple-Teaming for Robust LLM Agents.” arXiv:2611.24362, November 2026.
[2] Wen, Y., et al. “RL Is a Hammer and LLMs Are Nails: A Simple Reinforcement Learning Recipe for Strong Prompt Injection.” arXiv:2510.04885, October 2025.
[3] Yin, C., Geng, R., Wang, Y., and Jia, J. “PISmith: Reinforcement Learning-based Red Teaming for Prompt Injection Defenses.” arXiv:2603.13026 (COLM 2026), March 2026.
[4] Li, H., Wen, R., Shi, S., Zhang, N., Vorobeychik, Y., and Xiao, C. “AgentDyn: Are Your Agent Security Defenses Deployable in Real-World Dynamic Environments?” arXiv:2602.03117, February 2026.
[5] Debenedetti, E., et al. “AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents.” arXiv:2406.13352 (NeurIPS 2024), June 2024.
[6] Chen, S., et al. “Meta-SecAlign: Training LLMs against Prompt Injection for Robust Agents.” arXiv:2507.02735, July 2025.
[7] Nasr, M., et al. “The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections.” arXiv:2510.09023, October 2025.
[8] Shi, C., et al. (Google DeepMind). “Lessons from Defending Gemini Against Indirect Prompt Injections.” arXiv:2505.14534, May 2025.
[9] Debenedetti, E., et al. “Defeating Prompt Injections by Design.” arXiv:2503.18813, March 2025.
[10] Wallace, E., et al. “The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions.” arXiv:2404.13208, April 2024.
[11] OWASP Gen AI Security Project. “LLM01: Prompt Injection.” OWASP Top 10 for LLM Applications, 2025.
[12] Beutel, A., Xiao, K., Heidecke, J., and Weng, L. “Diverse and Effective Red Teaming with Auto-generated Rewards and Multi-step Reinforcement Learning.” arXiv:2412.18693, December 2024.
[13] Cloud Security Alliance. “Agentic AI Red Teaming Guide.” CSA, 2025.
[14] Cloud Security Alliance. “Agent Data Injection: A New Attack Class Beyond Prompt Injection.” CSA, July 2026.
[15] Cloud Security Alliance. “AI Controls Matrix (AICM) v1.1.” CSA, 2025.
[16] Huang, K. “Agentic AI Threat Modeling Framework: MAESTRO.” CSA Blog, February 2025.
[17] Meta. “Prompt Guard Model Card.” Llama Documentation, 2024.