External Data Extraction Attacks against Retrieval-Augmented Large Language Models
On the map: Retrieval-augmented generation → Privacy and security of RAG
also in 1 more
Abstract (arXiv)
In recent years, RAG has emerged as a key paradigm for enhancing large language models (LLMs). By integrating externally retrieved information, RAG alleviates issues like outdated knowledge and, crucially, insufficient domain expertise. While effective, RAG introduces new risks of external data extraction attacks (EDEAs), where sensitive or copyrighted data in its knowledge base may be extracted verbatim. These risks are particularly acute when RAG is used to customize specialized LLM applications with private knowledge bases. Despite initial studies exploring these risks, they often lack a formalized framework, robust attack performance, and comprehensive evaluation, leaving critical questions about real-world EDEA feasibility unanswered. In this paper, we present the first comprehensive study to formalize EDEAs against retrieval-augmented LLMs. We first formally define EDEAs and propose a unified framework decomposing their design into three components: extraction instruction, jailbreak operator, and retrieval trigger, under which prior attacks can be considered instances within our framework. Guided by this framework, we develop SECRET: a Scalable and EffeCtive exteRnal data Extraction aTtack. Specifically, SECRET incorporates (1) an adaptive optimization process using LLMs as optimizers to generate specialized jailbreak prompts for EDEAs, and (2) cluster-focused triggering, an adaptive strategy that alternates between global exploration and local exploitation to efficiently generate effective retrieval triggers. Extensive evaluations across 4 models reveal that SECRET significantly outperforms previous attacks, and is highly effective against all 16 tested RAG instances. Notably, SECRET successfully extracts 35% of the data from RAG powered by Claude 3.7 Sonnet for the first time, whereas other attacks yield 0% extraction. Our findings call for attention to this emerging threat.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 52 of its 98 references that are in the map. First posted on arXiv 3 Oct 2025.
Builds on
52 of 98 references.
Closest ancestors · 8
Same direction, newest first
- 2025DCMI: A Differential Calibration Membership Inference Attack Against Retrieval-Augmented Generation7 Sep
- 2025Riddle Me This! Stealthy Membership Inference for Retrieval-Augmented Generation1 Feb
- 2024Feedback-Guided Extraction of Knowledge Base from Retrieval-Augmented LLM Applications21 Nov
- 2024Generating Is Believing: Membership Inference Attacks against Retrieval-Augmented Generation27 Jun
- 2024Is My Data in Your Retrieval Database? Membership Inference Attacks Against Retrieval Augmented Generation30 May
- 2024CPR: Retrieval Augmented Generation for Copyright Protection27 Mar
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems27 Feb
- 2024The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)23 Feb
Other references · 44
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2023A Survey of Large Language Modelscited by 2,576
- 2016Membership Inference Attacks against Machine Learning Modelscited by 2,281
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
- 2022Survey of Hallucination in Natural Language Generationcited by 2,075
32 more
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,601
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2023Large Language Models as Optimizerscited by 864
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 800
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
- 2023Extracting Training Data from Diffusion Modelscited by 732
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 573
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 486
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 452
- 2023Scalable Extraction of Training Data from (Production) Language Modelscited by 434
- 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 429
- 2023ChatDoctor: A Medical Chat Model Fine-Tuned on a Large Language Model Meta-AI (LLaMA) Using Medical Domain Knowledgecited by 325
- 2024A Comprehensive Survey of Hallucination Mitigation Techniques in Large Language Modelscited by 269
- 2023Prompting Large Language Model for Machine Translation: A Case Studycited by 250
- 2023MasterKey: Automated Jailbreak Across Multiple Large Language Model Chatbotscited by 183
- 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attackscited by 143
- 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 127
- 2023AnglE-optimized Text Embeddingscited by 99
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
- 2024Membership Inference Attacks Against In-Context Learningcited by 43
- 2023Privacy Implications of Retrieval-Based Language Modelscited by 32
- 2024Unleashing Worms and Extracting Data: Escalating the Outcome of Attacks against RAG-based Inference in Scale and Severity Using Jailbreakingcited by 30
- 2024PAPILLON: Efficient and Stealthy Fuzz Testing-Powered Jailbreaks for LLMscited by 21
- 2025Rethinking Data Protection in the (Generative) Artificial Intelligence Eracited by 18
- 2024UPAM: Unified Prompt Attack in Text-to-Image Generation Models Against Both Textual Filters and Visual Checkerscited by 12
- 2025DATABench: Evaluating Dataset Auditing in Deep Learning from an Adversarial Perspectivecited by 8
- 2023LLMMaps -- A Visual Metaphor for Stratified Evaluation of Large Language Modelscited by 6
- 2025Rethinking Membership Inference Attacks Against Transfer Learningcited by 6
- 2023AToMiC: An Image/Text Retrieval Test Collection to Support Multimedia Content Creationcited by 5
- 2024TruVRF: Towards Triple-Granularity Verification on Machine Unlearningcited by 4
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Data Extraction Attacks in Retrieval-Augmented Generation via Backdoors
- 2024Pirates of the RAG: Adaptively Attacking LLMs to Leak Knowledge Bases
- 2025Token-Level Precise Attack on RAG: Searching for the Best Alternatives to Mislead Generation
- 2025RAG Security and Privacy: Formalizing the Threat Model and Attack Surface
- 2025SafeRAG: Benchmarking Security in Retrieval-Augmented Generation of Large Language Model
- 2026Retrieved But Not Reliable: A Survey on Attacks, and Defenses in Retrieval-Augmented Generation
- 2024PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models
- 2026Securing Retrieval-Augmented Generation: A Taxonomy of Attacks, Defenses, and Future Directions