SafeRAG: Benchmarking Security in Retrieval-Augmented Generation of Large Language Model
Xun Liang, Simin Niu, Zhiyu Li, Sensen Zhang, Hanyu Wang, Feiyu Xiong, Jason Zhaoxin Fan, Bo Tang, Jihao Zhao, Jiawei Yang, Shichao Song, Mengwei Wang
Abstract
The indexing-retrieval-generation paradigm of retrieval-augmented generation (RAG) has been highly successful in solving knowledgeintensive tasks by integrating external knowledge into large language models (LLMs). However, the incorporation of external and unverified knowledge increases the vulnerability of LLMs because attackers can perform attack tasks by manipulating knowledge. In this paper, we introduce a benchmark named SafeRAG designed to evaluate the RAG security. First, we classify attack tasks into silver noise, intercontext conflict, soft ad, and white Denial-of-Service. Next, we construct RAG security evaluation dataset (i.e., SafeRAG dataset) primarily manually for each task. We then utilize the SafeRAG dataset to simulate various attack scenarios that RAG may encounter. Experiments conducted on 14 representative RAG components demonstrate that RAG exhibits significant vulnerability to all attack tasks and even the most apparent attack task can easily bypass existing retrievers, filters, or advanced LLMs, resulting in the degradation of RAG service quality. Code is available at: https: //github.com/IAAR-Shanghai/SafeRAG .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Knowledge Conflicts for LLMs: A Survey cites Synthetic Disinformation Attacks on Automated Fact Verification Systems
- Knowledge Conflicts for LLMs: A Survey cites On the Risk of Misinformation Pollution with Large Language Models
- Exploring Knowledge Conflicts for Faithful LLM Reasoning: Benchmark and Method cites Knowledge Conflicts for LLMs: A Survey
Cited by top-tier papers5
- Visual Inception: Compromising Long-term Planning in Agentic Recommenders via Multimodal Memory PoisoningJiachen QianACL 2026 · 3 citations
- Securing Retrieval-Augmented Code Generation via Contextual Knowledge Injection: A Case for Embedded IoT ApplicationsTong Sun, Jingyi Su, Yi Gao, Wei DongUSENIX Security 2026
- Exploring Knowledge Conflicts for Faithful LLM Reasoning: Benchmark and MethodTianzhe Zhao, Jiaoyan Chen, Shuxiu Zhang, Haiping Zhu et al.SIGIR 2026
- Beyond Explicit Refusals: Soft-Failure Attacks on Retrieval-Augmented GenerationWentao Zhang, Yan Zhuang, ZhuHang Zheng, Mingfei Zhang et al.ACL 2026
- Safe RAG by RAG: Untying the Bell That RAG Rang with the RAG HandXun Liang, Mengwei Wang, Yuefeng Ma, Simin NiuAAAI 2026
Builds on10
- Toxicity in chatgpt: Analyzing persona-assigned language modelsAmeet Deshpande, Vishvak Murahari, Tanmay Rajpurohit, Ashwin Kalyan et al.EMNLP Findings 2023 · 178 citations
- On the Risk of Misinformation Pollution with Large Language ModelsYikang Pan, Liangming Pan, Wenhu Chen, Preslav Nakov et al.EMNLP Findings 2023 · 85 citations
- Self-Knowledge Guided Retrieval Augmentation for Large Language ModelsYile Wang, Peng Li, Maosong Sun, Yang LiuEMNLP Findings 2023 · 62 citations
- Synthetic Disinformation Attacks on Automated Fact Verification SystemsYibing Du, Antoine Bosselut, Christopher D. ManningAAAI 2022 · 58 citations
- Knowledge Conflicts for LLMs: A SurveyRongwu Xu, Zehan Qi, Zhijiang Guo, Cunxiang Wang et al.EMNLP 2024 · 38 citations
Related papers
- Open Schrödinger's Closed Box: Identifying Retrieval Augmented Generation in API-Accessible Large Language Model ServicesYukun Jiang, Xinyue Shen, Michael Backes, Zheng Li et al.ACL 2026
- On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application DomainsXun Xian, Ganghua Wang, Xuan Bi, Rui Zhang et al.ICML 2025
- PRGB Benchmark: A Robust Placeholder-Assisted Algorithm for Benchmarking Retrieval-Augmented GenerationZhehao Tan, Yihan Jiao, Dan Yang, Junwei Liu et al.AAAI 2026
- LeakDojo: Decoding the Leakage Threats of RAG SystemsMaosen Zhang, Jianshuo Dong, Boting Lu, Wenyue Li et al.ACL Findings 2026
- The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)Shenglai Zeng, Jiankun Zhang, Pengfei He, Yiding Liu et al.ACL Findings 2024 · 104 citations
