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 · DOI

Abstract

As Large Language Models (LLMs) evolve into autonomous agents, they become vulnerable to Indirect Prompt Injection (IPI) attacks. This paper evaluates a lightweight "Minimize & Sanitize" firewall approach, finding it virtually eliminates successful attacks on current benchmarks. However, the study also reveals that these benchmarks are often "saturated" or flawed, prompting a call for more robust evaluation standards and demonstrating vulnerabilities to adaptive techniques like Braille encoding.

Introduction

The transition of LLMs from passive chatbots to active "agents" capable of web browsing and API execution introduces a critical security threat: Indirect Prompt Injection (IPI). Unlike direct jailbreaking, IPI occurs when an agent processes external, untrusted data—such as a malicious email or poisoned webpage—that contains hidden instructions. These instructions can hijack the agent's behavior, leading to unauthorized actions like data exfiltration or fraudulent transactions.

Current defense strategies often involve expensive retraining or restrictive overrides that significantly degrade an agent's utility. This research investigates whether a model-agnostic, lightweight firewall can provide robust protection without sacrificing performance.

Methodology: The Minimize & Sanitize Pipeline

The authors propose a modular defense system consisting of two LLM-based firewalls positioned at the boundary between the agent and its environment.

The Minimize & Sanitize pipeline architecture, showing how the Tool-Input Firewall (Minimizer) and Tool-Output Firewall (Sanitizer) intercept and clean data between the AI Agent and its tools.
  1. Tool-Input Firewall (Minimizer): This component intercepts tool calls and strips away unnecessary or sensitive information from the arguments, ensuring the tool receives only the minimum data required for the task.
  2. Tool-Output Firewall (Sanitizer): This component inspects tool responses for malicious instructions or suspicious formatting, "cleaning" the content before it reaches the primary agent.

This approach is model-agnostic, requires no retraining, and utilizes "limited-privilege" LLMs to act as security guards.

Benchmarking and the "Saturating" Problem

The defense was evaluated across four major benchmarks: AgentDojo, Agent Security Bench (ASB), InjecAgent, and $\tau$-Bench. A key finding was that the "Minimize & Sanitize" approach achieved near-zero Attack Success Rates (ASR) on most existing datasets.

While initially appearing as a total victory, the authors argue this indicates "benchmark saturation." Many current benchmarks are too easy to solve or contain fundamental flaws. For instance, the ASB benchmark was found to "force" malicious tools into the agent's workflow; removing this forced injection caused the ASR to drop from 73% to 9% even without defenses. Consequently, the authors released revised versions of AgentDojo and ASB with more realistic scenarios and fixed metrics.

Results

The firewall approach demonstrated superior trade-offs between security and utility compared to complex baselines.

Comparison of various defenses on the AgentDojo benchmark. The Sanitizer achieves a near-zero Attack Success Rate (ASR) while maintaining high Benign Utility (BU) and User Accuracy (UA).

On the original AgentDojo benchmark, the Sanitizer reduced the ASR from 57.69% to a negligible 0.02%. Unlike defenses like CaMeL, which require custom interpreters and can hinder performance, the firewall maintained high Benign Utility (BU) by intervening only at the tool interface. Furthermore, in their revised version of AgentDojo, the authors improved measured utility by over 18% simply by fixing brittle evaluation metrics that previously penalized agents for harmless side effects.

Discussion: The Braille Bypass and Future Work

Despite the success of the firewalls, the authors discovered a significant vulnerability: the "Braille Bypass." By encoding malicious instructions in Braille, attackers could slip past the Sanitizer. Because Braille tokens are rare in training data, the firewall failed to recognize the intent, yet the primary agent was still capable of decoding and executing the hidden commands.

This highlights that prompt-based firewalls are not a panacea against adaptive attackers. Future research must focus on developing stronger agentic security benchmarks that include adaptive attacks, dynamic environments, and canary strings to prevent memorization.

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