BadAgent: Inserting and Activating Backdoor Attacks in LLM Agents
Yifei Wang, Dizhan Xue, Shengjie Zhang, Shengsheng Qian
摘要
With the prosperity of large language models (LLMs), powerful LLM-based intelligent agents have been developed to provide customized services with a set of user-defined tools. State-of-the-art methods for constructing LLM agents adopt trained LLMs and further fine-tune them on data for the agent task. However, we show that such methods are vulnerable to our proposed backdoor attacks named BadAgent on various agent tasks, where a backdoor can be embedded by fine-tuning on the backdoor data. At test time, the attacker can manipulate the deployed LLM agents to execute harmful operations by showing the trigger in the agent input or environment. To our surprise, our proposed attack methods are extremely robust even after fine-tuning on trustworthy data. Though backdoor attacks have been studied extensively in natural language processing, to the best of our knowledge, we could be the first to study them on LLM agents that are more dangerous due to the permission to use external tools. Our work demonstrates the clear risk of constructing LLM agents based on untrusted LLMs or data. Our code is public at https://github.com/DPamK/BadAgent
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 24 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- TAMAS: Benchmarking Adversarial Risks in Multi-Agent LLM Systems 引用了 AgentBench: Evaluating LLMs as Agents
- VPI-Bench: Visual Prompt Injection Attacks for Computer-Use Agents 引用了 HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
- VPI-Bench: Visual Prompt Injection Attacks for Computer-Use Agents 引用了 WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
- AgentBench: Evaluating LLMs as Agents 引用了 Language Models are Few-Shot Learners
- AgentBench: Evaluating LLMs as Agents 引用了 Training language models to follow instructions with human feedback
- AgentBench: Evaluating LLMs as Agents 引用了 WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face 引用了 Language Models are Few-Shot Learners
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face 引用了 Training language models to follow instructions with human feedback
- JARVIS or Ultron? A Survey on the Safety and Security Threats of Computer-Using Agents 引用了 VPI-Bench: Visual Prompt Injection Attacks for Computer-Use Agents
- JARVIS or Ultron? A Survey on the Safety and Security Threats of Computer-Using Agents 引用了 WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
- WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper24
- Your Agent May Misevolve: Emergent Risks in Self-evolving LLM AgentsShuai Shao, Qihan Ren, Dongrui Liu, Chen Qian 等ICLR 2026 · 60 次引用
- VPI-Bench: Visual Prompt Injection Attacks for Computer-Use AgentsTri Cao, Bennett Lim, Yue Liu, Yuan Sui 等ICLR 2026 · 45 次引用
- JARVIS or Ultron? A Survey on the Safety and Security Threats of Computer-Using AgentsAda Chen, Yongjiang Wu, Junyuan Zhang, Jingyu Xiao 等ACL 2026 · 24 次引用
- TAMAS: Benchmarking Adversarial Risks in Multi-Agent LLM SystemsIshan Kavathekar, Hemang Jain, Ameya Rathod, Ponnurangam Kumaraguru 等ACL 2026 · 16 次引用
- TAI3: Testing Agent Integrity in Interpreting User IntentShiwei Feng, Xiangzhe Xu, Xuan Chen, Kaiyuan Zhang 等NeurIPS 2025 · 9 次引用
它引用的 Paper15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging FaceYongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li 等NeurIPS 2023 · 1,778 次引用
- WebShop: Towards Scalable Real-World Web Interaction with Grounded Language AgentsShunyu Yao, Howard Chen, John Yang, Karthik NarasimhanNeurIPS 2022 · 1,477 次引用
- AgentBench: Evaluating LLMs as AgentsXiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu 等ICLR 2024 · 748 次引用
相关 Paper
- Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based AgentsWenkai Yang, Xiaohan Bi, Yankai Lin, Sishuo Chen 等NeurIPS 2024 · 195 次引用
- BackdoorAgent: A Unified Framework for Backdoor Attacks on LLM-based AgentsYunhao Feng, Yige Li, Yutao Wu, Yingshui Tan 等ACL Findings 2026 · 1 次引用
- Your LLM Agent Can Leak Your Data: Data Exfiltration via Backdoored Tool UseWuyang Zhang, Shichao PeiACL Findings 2026 · 1 次引用
- Instruction Backdoor Attacks Against Customized LLMsRui Zhang, Hongwei Li, Rui Wen, Wenbo Jiang 等USENIX Security 2024 · 83 次引用
- Persistent Backdoor Attacks Under Continual Fine-Tuning of LLMsJing Cui, Yufei Han, Jianbin Jiao, Junge ZhangAAAI 2026
