Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents

Hanrong Zhang, Jingyuan Huang, Kai Mei, Yifei Yao, Zhenting Wang, Chenlu Zhan, Hongwei Wang, Yongfeng Zhang

TL;DR

As Large Language Models (LLMs) evolve from simple chatbots into autonomous agents equipped with tools and memory, they face a massive new attack surface. Agent Security Bench (ASB) is a comprehensive new framework that formalizes these threats, revealing that current defenses are alarmingly ineffective against sophisticated "mixed attacks" and a novel "Plan-of-Thought" backdoor.

What Problem Does This Paper Address?

We are moving from "LLMs as calculators" to "LLMs as pilots." Modern AI agents use external tools (APIs), browse the web, and maintain long-term memory via Retrieval-Augmented Generation (RAG). While this makes them incredibly useful for tasks like autonomous driving or financial analysis, it also makes them dangerous.

Overview of attack vectors in the LLM Agent Framework

Existing security research has mostly focused on "jailbreaking" chatbots. However, agents have unique vulnerabilities: an attacker could poison a tool's output to trick the agent later (Indirect Prompt Injection) or corrupt the agent's long-term memory. The authors argue that the community lacks a unified, large-scale benchmark to evaluate how these "agentic" components—system prompts, user instructions, tools, and memory—hold up under fire.

Methods

The researchers developed ASB, a framework that formalizes and tests 27 different types of attacks and defenses across 10 diverse real-world scenarios (e.g., e-commerce, finance, legal advice).

The paper introduces a particularly clever new threat: the Plan-of-Thought (PoT) Backdoor Attack. Unlike standard prompt injections, this attack embeds hidden instructions into the agent’s system prompt or few-shot demonstrations. It trains the agent to act normally unless it sees a specific trigger (like a smile emoji or a specific phrase), at which point it executes a malicious "plan" using its tools.

To measure success, the authors propose a new metric called Net Resilient Performance (NRP). It calculates a score that balances an agent's utility (how well it does its job) against its robustness (how well it resists attacks), helping developers choose models that aren't just smart, but safe.

Datasets

The ASB benchmark is massive compared to previous efforts like InjecAgent or AgentDojo. It provides a comprehensive evaluation environment spanning numerous scenarios and tools.

Summary of the ASB benchmark components

Key components of the benchmark include:

  • 10 Scenarios: Ranging from IT management to autonomous vehicles.
  • 400+ Tools: Simulated APIs the agents can call.
  • 13 LLM Backbones: Including heavyweights like GPT-4o, Claude 3.5 Sonnet, and LLaMA 3.
  • 400 Tasks: Split between "aggressive" (risky) and "non-aggressive" instructions.

Key Insights and Ideas

  • The "Rise-then-Fall" Vulnerability Curve: One of the most interesting findings is the relationship between model capability and security. As models get "smarter" (better at following instructions), their Attack Success Rate (ASR) initially goes up because they are more obedient to the attacker’s injected instructions. However, at the very highest levels of capability (e.g., GPT-4o), the ASR begins to fall because these models have better internal "refusal" mechanisms to filter out unsafe requests.
  • Mixed Attacks are Lethal: The most effective strategy isn't just one type of attack, but a "Mixed Attack" that combines prompt injection with memory poisoning. By hitting the agent at multiple stages of its reasoning process, attackers achieved an average success rate of over 84%.
  • Defenses are a Double-Edged Sword: Current defenses (like paraphrasing the user's input or using delimiters) are often "prevention-based." The paper found these are not only easy to bypass but also frequently degrade the agent's performance on legitimate tasks.

Key Results

  • Mixed Attack Dominance: Across all 13 models, Mixed Attacks reached a peak average ASR of 84.30%, while maintaining a very low refusal rate (3.22%).
  • PoT Backdoor Success: The novel PoT attack was terrifyingly effective against advanced models, achieving a 100% success rate on GPT-4o and GPT-4o-mini.
  • Defense Failure: Common defenses like "Instructional Prevention" only reduced the attack success rate by a negligible amount (roughly 1.6% for indirect injections), proving that we are currently bringing a knife to a gunfight.
  • Model Rankings: Claude 3.5 Sonnet and LLaMA 3-70B emerged as some of the most "resilient" models when measured by the new NRP metric, balancing high task performance with relatively strong resistance to attacks.

Limitations and Future Work

The authors acknowledge that their current defenses are mostly static. They suggest that future work should move toward dynamic reasoning validation—systems that don't just look at the input text, but actually analyze the logical coherence of the agent's plan to see if it has deviated from its original goals.

Additionally, while the benchmark covers 10 scenarios, the real world is infinitely more complex. The authors plan to expand the benchmark to include more sophisticated multi-agent attack scenarios and more robust, detection-based defense mechanisms.

Summary updated

BibTeX
@inproceedings{zhang2025agent,
  author = {Hanrong Zhang and Jingyuan Huang and Kai Mei and Yifei Yao and Zhenting Wang and Chenlu Zhan and Hongwei Wang and Yongfeng Zhang},
  title = {{Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=V4y0CpX4hK},
}
Figure