PIPETTE: Prompt Injection Purple-Teaming for Robust LLM Agents
Lipeng He, Yihan Wang, Jiawen Zhang, N. Asokan
Abstract
Large language model (LLM) agents routinely interact with untrusted external data, exposing them to indirect prompt injection (IPI) attacks that hijack agents into executing attacker-chosen tasks. To uncover these vulnerabilities at scale, automated red-teaming methods often leverage reinforcement learning (RL) to generate attacks that achieve high attack success rates (ASR). Model developers use the attacks discovered during internal red-teaming to harden agents through adversarial training before deployment, a collaborative offensive-defensive process known in cybersecurity as purple-teaming. However, we show that achieving high ASR during red-teaming does not guarantee robustness gains from subsequent adversarial training. Specifically, we find that two state-of-the-art RL-based red-teaming methods, RL-Hammer and PISmith, suffer from mode collapse, repeatedly discovering similar attack strategies whose additional successes add no additional robustness improvements to adversarial training. To address this gap, we introduce PIPETTE, a unified prompt injection purple-teaming framework that effectively converts red-teaming discoveries into defender robustness improvements. PIPETTE employs a dictionary learning-based reward that encourages broader coverage of attack strategies during red-teaming. It also integrates an on-policy adversarial training pipeline tailored to IPI defense, enabling agents to resist attacks while completing legitimate user tasks. Extensive evaluations across agentic benchmarks (AgentDojo and ASB) demonstrate that PIPETTE produces defenders that achieve near-zero attack success rates on static attacks and can withstand strong adaptive attacks, while maintaining benign task utility close to that of the undefended baseline.
Create a lesson
Related papers
AutoPI: Taxonomy-Guided Adaptive Red Teaming for Prompt Injection in LLM Agents
Shared title terminology · Stavros Damianakis, Konstantinos Psounis
What Survives the Shift from Text to Pixels? Conditional Protection against Prompt Injection in Image-Rendered Documents
Shared title terminology · Haoyang Liu, Yinong Xu, Zhe Lang et al.
Evolution Under Fire: Evolving Agent Safety Harnesses with Adaptive Injection Stressors
Shared title terminology · Yujun Wang, Yilun Liu, Jinhe Bi et al.
Eight in Ten LLMs Leak System-Prompt Secrets: Nevan, an Agentic Capture-the-Flag Study
Shared title terminology · Ana Clara Zoppi Serpa, Anderson Rocha, Hélio Pedrini
VAST: Compiling Grounded Vulnerability Scenarios into Verifiable, Multi-Step Environments for Evaluating LLM Red-Team Agents
Shared title terminology · Zhen Wan
Mjolnir: Finding and Reproducing Vulnerabilities in Root-of-Trust Firmware and RTL with Project-Grounded Agents
Shared title terminology · Collin MacDonald, Carl Lundin, Stephen Herwig et al.