RAG-Pull: Turning Retrieval into a Code-Injection Channel via Invisible Unicode Perturbations
On the map: Retrieval-augmented generation → Privacy and security of RAG
also in 1 more
Abstract (arXiv)
Retrieval-Augmented Generation (RAG) increases the reliability and trustworthiness of the LLM response and reduces hallucination by eliminating the need for model retraining. It does so by adding external data into the LLM's context. We develop a new class of black-box attack, RAG-Pull, that inserts hidden UTF characters into queries or external code repositories, redirecting retrieval toward malicious code, thereby breaking the models' safety alignment. We observe that query and code perturbations alone can shift retrieval toward attacker-controlled snippets, while combined query-and-target perturbations achieve near-perfect success. Once retrieved, these snippets introduce exploitable vulnerabilities such as remote code execution and SQL injection. RAG-Pull's minimal perturbations can alter the model's safety alignment and increase preference towards unsafe code, therefore opening up a new class of attacks on LLMs.
Key facts. Cited by 4 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 44 of its 73 references that are in the map. First posted on arXiv 13 Oct 2025.
Builds on
44 of 73 references.
Closest ancestors · 9
Same direction, newest first
- 2025The Hidden Threat in Plain Text: Attacking RAG Data Loaders7 Jul
- 2025The Silent Saboteur: Imperceptible Adversarial Attacks against Black-Box Retrieval-Augmented Generation Systems24 May
- 2025One Shot Dominance: Knowledge Poisoning Attack on Retrieval-Augmented Generation Systems15 May
- 2024GASLITEing the Retrieval: Exploring Vulnerabilities in Dense Embedding-based Search30 Dec
- 2024HijackRAG: Hijacking Attacks against Retrieval-Augmented Large Language Models30 Oct
- 2024On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application Domains12 Sep
- 2024Corpus Poisoning via Approximate Greedy Gradient Descent7 Jun
- 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Models3 Jun
- 2024PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models12 Feb
Other references · 35
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
- 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,463
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
- 2020On Faithfulness and Factuality in Abstractive Summarizationcited by 900
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
23 more
- 2021Large Dual Encoders Are Generalizable Retrieverscited by 456
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
- 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 429
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2023Poisoning Web-Scale Training Datasets is Practicalcited by 290
- 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 278
- 2022The Alignment Problem from a Deep Learning Perspectivecited by 258
- 2018Manipulating Machine Learning: Poisoning Attacks and Countermeasures for Regression Learningcited by 225
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
- 2023Poisoning Retrieval Corpora by Injecting Adversarial Passagescited by 159
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
- 2019Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systemscited by 101
- 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attackscited by 85
- 2023Unleashing the potential of prompt engineering for large language modelscited by 72
- 2021Bad Characters: Imperceptible NLP Attackscited by 71
- 2024We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMscited by 65
- 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 60
- 2023Assessing Prompt Injection Risks in 200+ Custom GPTscited by 55
- 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 33
- 2024Unleashing Worms and Extracting Data: Escalating the Outcome of Attacks against RAG-based Inference in Scale and Severity Using Jailbreakingcited by 30
- 2022Towards Improving Faithfulness in Abstractive Summarizationcited by 27
- 2021Trojan Source: Invisible Vulnerabilitiescited by 8
- 2025TRAPDOC: Deceiving LLM Users by Injecting Imperceptible Phantom Tokens into Documentscited by 6
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Securing Retrieval-Augmented Generation: A Taxonomy of Attacks, Defenses, and Future Directionscited by 2
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generationcited by 1
- 2026Tracing Target Answers in Poisoned Retrieval Corpora via Token Influence Attributioncited by 0
- 2026InceptionRAG: Stealthy Poisoning Attack Against Retrieval-Augmented Generationcited by 0
- 2026InceptionRAG: Stealthy Poisoning Attack Against Retrieval-Augmented Generation15 Sep 2026
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generation2 Sep 2026
- 2026Tracing Target Answers in Poisoned Retrieval Corpora via Token Influence Attribution24 Jun 2026
- 2026Securing Retrieval-Augmented Generation: A Taxonomy of Attacks, Defenses, and Future Directions9 Apr 2026
Similar, not cited
Close in wording, no citation either way
- 2025Token-Level Precise Attack on RAG: Searching for the Best Alternatives to Mislead Generation
- 2024Rag and Roll: An End-to-End Evaluation of Indirect Prompt Manipulations in LLM-based Application Frameworks
- 2025RAGPart & RAGMask: Retrieval-Stage Defenses Against Corpus Poisoning in Retrieval-Augmented Generation
- 2024Data Extraction Attacks in Retrieval-Augmented Generation via Backdoors
- 2026Retrieved But Not Reliable: A Survey on Attacks, and Defenses in Retrieval-Augmented Generation
- 2024Backdoored Retrievers for Prompt Injection Attacks on Retrieval Augmented Generation of Large Language Models
- 2026PIDP-Attack: Combining Prompt Injection with Database Poisoning Attacks on Retrieval-Augmented Generation Systems
- 2026Towards Secure Retrieval-Augmented Generation: A Comprehensive Review of Threats, Defenses and Benchmarks