Indirect Prompt Injections: Are Firewalls All You Need, or Stronger Benchmarks?

Rishika Bhagwatkar, Kevin Kasa, Abhay Puri, Gabriel Huang, Irina Rish, Graham W. Taylor, Krishnamurthy Dj Dvijotham, Alexandre Lacoste · Submission to ICLR 2026 · Rejected

TL;DR

A simple, training-free dual-firewall—placed at the agent–tool boundary to minimize outgoing arguments and sanitize incoming tool outputs—virtually eliminates indirect prompt injection (IPI) attacks across four major agent benchmarks. However, this apparent “perfection” exposes that current agent security benchmarks suffer from broken metrics, flawed execution setups, and weak attacks that are easily saturated yet still bypassable in practice.

What Problem Does This Paper Address?

Autonomous LLM agents that execute multi-step workflows (e.g., booking travel, reading emails, making bank transfers) rely on external, untrusted environments. Adversaries exploit this through indirect prompt injection (IPI)—embedding hidden instructions into webpages, database entries, or tool outputs to hijack the agent.

Prior defenses require model retraining or complex, heavy system-level architectures (such as dual-agent privilege separation or custom interpreters) that degrade task performance (utility). At the same time, the research community lacks clarity on whether existing benchmarks accurately measure agent vulnerability or defense efficacy.

Methods

The authors introduce a model-agnostic "Minimize & Sanitize" pipeline operating directly at the LLM–tool boundary:

  • Tool-Input Firewall (Minimizer, $F_I$): Inspects outgoing tool calls before execution. Given the trusted user task and tool description, an auxiliary LLM strips away unnecessary confidential or personally identifiable information (PII) to prevent data exfiltration.
  • Tool-Output Firewall (Sanitizer, $F_O$): Inspects returned raw tool observations before they reach the main agent. It actively identifies, removes, or rewrites suspicious imperatives (e.g., "ignore previous instructions"), uncommon formatting, or hidden attacks while preserving task-relevant content.

Unlike simple pattern matchers or classification guardrails, these firewalls act as prompt-driven, low-privilege LLM filters requiring no fine-tuning or custom interpreters.

[User Task] ──> [LLM Agent] ──(Call args)──> [Minimizer] ──> [Tool Execution]
                                                                     │
[Agent Action] <─────────────── [Sanitizer] <──(Raw output)──────────┘

Datasets

The authors evaluated their defense across four standard benchmarks and introduced targeted corrections:

  • AgentDojo: Multi-domain agent benchmark (banking, slack, travel, workspace).
  • Agent Security Bench (ASB): Evaluates multi-stage tool planning.
  • InjecAgent: Evaluates simulated malicious tool calls (direct harm and data stealing).
  • $\tau$-Bench: Dynamic conversational benchmark, augmented with data-stealing attacks via DoomArena.
  • AgentDojo-Revised & ASB-Revised (New): Corrected versions introduced in this paper that eliminate artificial failure modes and fix scoring bugs.

Key Insights and Ideas

  • The Sanitizer alone saturates existing benchmarks: A single output filter eliminates nearly all attacks across four suites with minimal utility loss. It achieves this with roughly $2.5\times$ lower latency and far fewer input tokens than complex baselines like CaMeL.
  • Benchmark evaluations are severely confounded:
    • AgentDojo frequently overwrites task-critical information with injection text (e.g., replacing bill amounts). Thus, utility drops reflect missing data rather than agent failure. Additionally, strict delta checks (e.g., expecting an exact increment of 1 in inbox count) falsely score successful tasks as failures.
  • ASB forcibly appends malicious tools to the agent's tool set, inflating attack success from an actual 9.25% up to 73.58% purely via testbed manipulation.
  • InjecAgent provides no utility metric at all, making it impossible to evaluate false-positive costs.
  • The "Perfect" defense is still bypassable: The firewalls appear impenetrable only because benchmark attacks are naive. The authors demonstrate that encoding an injection attack in Braille bypasses the GPT-4o Sanitizer—the sanitizer decodes the Braille text instead of purging it, leading the downstream agent to execute the malicious payload.

Key Results

  • AgentDojo (GPT-4o): The Sanitizer alone slashed Attack Success Rate (ASR) to 0.02% (down from 57.69% undefended) while boosting Utility under Attack (UA) to 69.17% (vs. 50.01% undefended and 54.5% for CaMeL).
  • Agent Security Bench (GPT-4o): Under the combined attack, the Sanitizer reduced ASR from 68.75% to 16.33% on the original benchmark, and down to 2.58% on ASB-Revised.
  • $\tau$-Bench (GPT-4o): Sanitization dropped ASR from 56.09% to 0.00% while increasing UA from 47.40% to 63.91%.
  • Generalization: The firewall pattern transferred robustly across multiple open and closed backbone models, including LLaMA-3.3-70B, Qwen3-32B, and Qwen3-8B.

Limitations and Future Work

  • Adversarial Obfuscation: The Sanitizer fails against non-standard representations (such as Braille, rare Unicode, or cipher-based injections) where safety alignment weakens.
  • Over-Sanitization: The Minimizer and Sanitizer occasionally over-redact valid task inputs (e.g., removing legitimate IBAN numbers or modifying hotel search arguments), reducing benign utility.
  • Trust Assumptions: The defense assumes the initial user prompt is trustworthy and tool infrastructure is uncompromised.
  • Call for Stronger Benchmarks: The authors argue that current static benchmarks create a false sense of security. Future benchmarks must feature adaptive attackers, dynamic environments, API fuzzing, and comprehensive utility-security trade-off reporting.

Summary updated

BibTeX
@inproceedings{bhagwatkar2025indirect,
  author = {Rishika Bhagwatkar and Kevin Kasa and Abhay Puri and Gabriel Huang and Irina Rish and Graham W. Taylor and Krishnamurthy Dj Dvijotham and Alexandre Lacoste},
  title = {{Indirect Prompt Injections: Are Firewalls All You Need, or Stronger Benchmarks?}},
  booktitle = {Lock-LLM @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=aSUHAayPml},
}
Figure