Skip to content

BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Models

Jun 2024 · arXiv.org · Vol abs/2406.00083 · 109 citations · ⚡ 8 influential · 60 references
Computer Science

TL;DR

A novel threat is unveiled in which attackers steer the RAG system's response by injecting malicious passages into its knowledge base, enabling the attacker to steer the response without altering the user input or modifying the RAG weights.

Abstract

Retrieval-Augmented Generation (RAG) enhances Large Language Models (LLMs) by retrieving relevant information from external knowledge bases to provide more accurate, contextually informed, and up-to-date responses. However, this reliance on external knowledge introduces significant security vulnerabilities, as many RAG systems (e.g., Google Search) rely on large and unsanitized data repositories (e.g., Reddit). In this paper, we unveil a novel threat in which attackers steer the RAG system's response by injecting malicious passages into its knowledge base. When a user's query contains attacker-specified trigger words, the RAG retrieves and refers to these malicious passages, enabling the attacker to steer the response without altering the user input or modifying the RAG weights. BadRAG operates in two phases: (i) malicious passages are optimized to be retrieved exclusively when trigger words appear in user queries; (ii) these passages are meticulously crafted to achieve adversarial generation objectives, including denial of service, sentiment manipulation, context leakage, and tool misuse. Our experiments show that injecting just 10 malicious passages (0.04\% of the external corpora) achieves a 98.2\% retrieval success rate and increases negative response rates from 0.22\% to 72\% for queries containing triggers.

View source

Similar papers

#artificial intelligence Preprint Sep 2026

RAG-NAROK: Retrieval-Aware Knowledge Corpus Poisoning in RAG with Source-specific Refutation

This work introduces RAG-NAROK (Retrieval-Anchored Generation Negation And Response Quality Collapse), a RAG attack framework that adapts to the query text and exploits the transparency inherent in RAG pipeline to first extract the legitimate source identities, then generate Anchor-Specific Refutation documents.

A. Kafi, Alvi Ataur Khalil · 0 citations
Sep 2026

InceptionRAG: Stealthy Poisoning Attack Against Retrieval-Augmented Generation

This paper introduces InceptionRAG, a stealthy attack mechanism that subverts the standard attack paradigm of RAG, and shows superior evasion capabilities, effectively bypassing established defenses that mitigate traditional single-document injections.

Jia-Chang Zhang, Min Chen, Xiao-Nan Ren et al. · 1 citation
#natural language process... Preprint Aug 2026

TRIS: A Tri-Layer Retrieval Integrity Sieve Against Knowledge Poisoning

The Tri-Layer Sieve is presented, a middleware defense that sanitizes retrieved evidence through cross-embedding-space clustering with an independent judge model, structural filtering of trigger-payload artifacts, and LLM consistency verification, and exploits a key weakness of retrieval-stage poisoning.

Muhaimin Bin Munir, Akib Jawad Ononto, Nazia Shehnaz Joynab et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

Microsoft Research Blog Nov 3, 2026

Learn the rules: The hacker mindset

Research Manager Mike Walker reflects on a career spanning hacker culture, cybersecurity, and AI, sharing lessons about trust, teamwork, leadership, and why solving difficult problems requires curiosity, judgment, agility—and an understanding of the rules. The post Learn the rules: The hacker mindset appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.