Overcoming the Retrieval Barrier: Indirect Prompt Injection in the Wild for LLM Systems
Hongyan Chang, Ergute Bao, Xinjian Luo, Ting Yu
摘要
Large language models (LLMs) increasingly rely on retrieving information from external corpora, creating a new attack surface: indirect prompt injection (IPI). Previous studies have highlighted this risk but often avoid the hardest step: ensuring that malicious content is actually retrieved. In practice, unoptimized IPI is rarely retrieved under natural queries, which leaves its real-world impact unclear. We address this challenge by decomposing the malicious content into a trigger fragment that guarantees retrieval and an attack fragment that encodes arbitrary attack objectives. Based on this idea, we design an efficient and effective black-box attack algorithm that constructs a compact trigger fragment to guarantee retrieval for any attack fragement. Our attack requires only API access to embedding models, is cost-efficient (as little as $0.21 per target user query on OpenAI's embedding models), and achieves near-100% retrieval across 11 benchmarks and 8 embedding models (including both open-source models and proprietary services). Based on this attack, we present the first end-to-end IPI exploits under natural queries and realistic external corpora, spanning both RAG and agentic systems with diverse attack objectives. These results establish IPI as a practical and severe threat: when a user issued a natural query to summarize emails on frequently asked topics, a single poisoned email was sufficient to coerce GPT-4o into exfiltrating SSH keys with over 80% success in a multi-agent workflow. We further evaluate several defenses and find that they are insufficient to prevent the retrieval of malicious text, highlighting retrieval as a critical open vulnerability.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases 引用了 Poisoning Web-Scale Training Datasets is Practical
- AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases 引用了 Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases 引用了 Retrieval Augmented Language Model Pre-Training
- AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases 引用了 AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
它引用的 Paper27
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni 等NeurIPS 2020 · 19,162 次引用
- Retrieval Augmented Language Model Pre-TrainingKelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat 等ICML 2020 · 2,937 次引用
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language ModelsXiaogeng Liu, Nan Xu, Muhao Chen, Chaowei XiaoICLR 2024 · 722 次引用
- AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge BasesZhaorun Chen, Zhen Xiang, Chaowei Xiao, Dawn Song 等NeurIPS 2024 · 539 次引用
- Poisoning Web-Scale Training Datasets is PracticalNicholas Carlini, Matthew Jagielski, Christopher A. Choquette-Choo, Daniel Paleka 等S&P 2024 · 309 次引用
相关 Paper
- Benchmarking and Defending against Indirect Prompt Injection Attacks on Large Language ModelsJingwei Yi, Yueqi Xie, Bin Zhu, Emre Kiciman 等KDD 2025 · 27 次引用
- InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model AgentsQiusi Zhan, Zhixiang Liang, Zifan Ying, Daniel KangACL Findings 2024 · 147 次引用
- AGENTVIGIL: Automatic Black-Box Red-teaming for Indirect Prompt Injection against LLM AgentsZhun Wang, Vincent Siu, Zhe Ye, Tianneng Shi 等EMNLP Findings 2025 · 8 次引用
- Defending against Indirect Prompt Injection by Instruction DetectionTongyu Wen, Chenglong Wang, Xiyuan Yang, Haoyu Tang 等EMNLP Findings 2025 · 5 次引用
- Attention is All You Need to Defend Against Indirect Prompt Injection Attacks in LLMsYinan Zhong, Qianhao Miao, Yanjiao Chen, Jiangyi Deng 等NDSS 2026 · 13 次引用
