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
Abstract
Although LLM-based agents, powered by Large Language Models (LLMs), can use external tools and memory mechanisms to solve complex real-world tasks, they may also introduce critical security vulnerabilities. However, the existing literature does not comprehensively evaluate attacks and defenses against LLMbased agents. To address this, we introduce Agent Security Bench (ASB), a comprehensive framework designed to formalize, benchmark, and evaluate the attacks and defenses of LLM-based agents, including 10 scenarios (e.g., e-commerce, autonomous driving, finance), 10 agents targeting the scenarios, over 400 tools, 27 different types of attack/defense methods, and 7 evaluation metrics. Based on ASB, we benchmark 10 prompt injection attacks, a memory poisoning attack, a novel Plan-of-Thought backdoor attack, 4 mixed attacks, and 11 corresponding defenses across 13 LLM backbones. Our benchmark results reveal critical vulnerabilities in different stages of agent operation, including system prompt, user prompt handling, tool usage, and memory retrieval, with the highest average attack success rate of 84.30%, but limited effectiveness shown in current defenses, unveiling important works to be done in terms of agent security for the community. We also introduce a new metric to evaluate the agents' capability to balance utility and security. Our code can be found at https: //github.com/agiresearch/ASB . Furthermore, ASB explores the vulnerabilities in agents performing tasks in diverse settings. Specifically, ASB evaluates across 10 task scenarios, 10 corresponding agents, and over 400 tools, including both normal and attack tools, and 400 tasks, divided into aggressive and non-aggressive types. The aggressive tasks assess the agent's refusal rate in response to risky or aggressive instructions. Our key contributions are summarized as follows: ① We design and develop Agent Security Bench (ASB), the first comprehensive benchmark including 10 scenarios (e.g., e-commerce, autonomous driving, finance), 10 agents targeting the scenarios, over 400 tools and tasks for evaluating the security of LLM-based agents against numerous attacks and defense strategies. ② We propose a novel PoT Backdoor Attack, which embeds hidden instructions into the system prompt, exploiting the agent's planning process to achieve high attack success rates. ③ We formalize and categorize various adversarial threats targeting key components of LLM agents, including DPI, IPI, Memory Poisoning Attacks, PoT Backdoor Attacks, and Mixed Attacks, covering vulnerabilities in system prompt definition, user prompt handling, memory retrieval, and tool usage. ④ We benchmark 27 different types of attacks and defenses on ASB across 13 LLM backbones with 7 metrics, demonstrating that LLM-based agents are vulnerable to the attacks, with the highest average attack success rates exceeding 84.30%. In contrast, existing defenses are often ineffective. Our work highlights the need for stronger defenses to protect LLM agents from sophisticated adversarial techniques. ⑤ We introduce the Net Resilient Performance (NRP) metric to assess the agents' balance between utility and security and emphasize the importance of performance testing on ASB for selecting suitable backbones for agent applications.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f4c521ca-5175-4ada-9bc7-a0a4485ee9b8Cited by top-tier papers51
- AgentAuditor: Human-level Safety and Security Evaluation for LLM AgentsHanjun Luo, Shenyu Dai, Chiming Ni, Xinfeng Li et al.NeurIPS 2025 · 98 citations
- ST-WebAgentBench: A Benchmark for Evaluating Safety and Trustworthiness in Web AgentsIdo Levy, Ben wiesel, Sami Marreed, Alon Oved et al.ICLR 2026 · 78 citations
- DRIFT: Dynamic Rule-Based Defense with Injection Isolation for Securing LLM AgentsHao Li, Xiaogeng Liu, Hung-Chun Chiu, Dianqi Li et al.NeurIPS 2025 · 76 citations
- ACE: A Security Architecture for LLM-Integrated App SystemsEvan Li, Tushin Mallick, Evan Rose, William K. Robertson et al.NDSS 2026 · 57 citations
- MCP Security Bench (MSB): Benchmarking Attacks Against Model Context Protocol in LLM AgentsDongsen Zhang, Zekun Li, Xu Luo, Xuannan Liu et al.ICLR 2026 · 47 citations
Builds on23
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- Gorilla: Large Language Model Connected with Massive APIsShishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. GonzalezNeurIPS 2024 · 1,715 citations
- Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied AgentsWenlong Huang, Pieter Abbeel, Deepak Pathak, Igor MordatchICML 2022 · 1,539 citations
Related papers
- AgentLAB: Benchmarking LLM Agents against Long-Horizon AttacksTanqiu Jiang, Yuhui Wang, Jiacheng Liang, Ting WangICML 2026 · 21 citations
- MCP-SafetyBench: A Benchmark for Safety Evaluation of Large Language Models with Real-World MCP ServersXuanjun Zong, Zhiqi Shen, Lei Wang, Yunshi Lan et al.ICLR 2026 · 34 citations
- SEC-bench: Automated Benchmarking of LLM Agents on Real-World Software Security TasksHwiwon Lee, Ziqi Zhang, Hanxiao Lu, Lingming ZhangNeurIPS 2025 · 86 citations
- Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based AgentsWenkai Yang, Xiaohan Bi, Yankai Lin, Sishuo Chen et al.NeurIPS 2024 · 195 citations
- Think Twice Before You Act: Protecting LLM Agents Against Tool Description Poisoning via Isolated PlanningShanghao Shi, Xiao Wang, Chaoyu Zhang, Hao Li et al.ICML 2026 · 1 citation
