Manuscript Offprint

arXiv:2609.11082

ToxicRAG: Compromising Retrieval-Augmented Generation Systems via Single-Shot Knowledge Poisoning Attacks

Haozhe Lu, Jiaqi Li, Xinyuan Zhu, Xiang Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Retrieval-Augmented Generation (RAG) can ground large language model (LLM) outputs in external evidence, but it also exposes the system to knowledge poisoning. Representative attacks use multiple injected documents or templates that directly assert a target answer. We present ToxicRAG, a one-document-per-target attack that expresses misinformation as a coherent knowledge-update narrative. The generated document first acknowledges the previously accepted answer, introduces fabricated events that appear to invalidate it, and then attributes the attacker-selected answer to a set of purported authorities. An answer-focused self-validation loop optionally revises a candidate when a surrogate language model does not reproduce the target answer. We evaluate the attack on 100 target questions from each of Natural Questions, HotpotQA, and MS-MARCO, using four victim LLMs and four dense retrievers. In the sampled-corpus setting reported in this paper, ToxicRAG obtains ASRs between 0.61 and 0.91 across the twelve dataset-model combinations. It matches or exceeds the strongest evaluated baseline in every combination, with margins ranging from 0 to 11 percentage points. These results show that narrative-form poisoned documents can remain influential under the evaluated RAG configurations and motivate further study of factual consistency and source provenance in RAG systems.

1 Introduction

Large language models (LLMs) perform well across many natural language processing tasks, but hallucinations [1] and stale parametric knowledge remain obstacles in knowledge-intensive applications. Retrieval-Augmented Generation (RAG) [2–10] addresses part of this problem by retrieving external documents at inference time and conditioning generation on them. This design can improve factual grounding when the retrieved evidence is relevant and trustworthy,

Figure

Figure 1: A standard RAG pipeline. A retriever selects the top-k documents for a user query from an external retrieval corpus, and an LLM generates an answer from the query and retrieved context.

although it does not eliminate hallucinations or guarantee correct answers.

The external retrieval corpus also creates a security boundary. If an attacker can add a document to that corpus, the retriever may place it in the model context and the generator may treat its claims as evidence. Prior work has demonstrated both multi-document and single-document knowledge-poisoning attacks [11–14]. Multi-document methods such as PoisonedRAG [11] use a larger per-target write budget to increase the representation of poisoned content in the retrieved context. This requirement is incompatible with settings in which the attacker has only one insertion opportunity per target, which motivates the constrained setting studied here. We do not assume that every deployment detects repeated insertions; rather, we treat the smaller write budget as a distinct threat model.

Motivation. Recent single-document methods explore how one inserted document can affect both retrieval and generation [12, 13]. CorruptRAG [12], for example, explicitly contrasts an old answer with a new answer, while AuthChain [13] builds an evidence chain with authority cues. These strategies expose a tension that we examine empirically: a document must be

∗^{*}Corresponding author.

sufficiently aligned with the query to be retrieved, sufficiently influential to change the generated answer, and natural enough to resemble ordinary corpus content. We evaluate end-to-end ASR together with retrieval position and sensitivity to a larger top-k context. Statements about how the baselines behave as k increases are based on our controlled results in Figure 4, rather than assumed to hold for all deployments.

Our Approach. We propose ToxicRAG, which constructs a poisoned document as an apparent knowledge update rather than as a direct instruction. Its Evolutionary Paradigm-Shift Narrative has three linked elements: it states the previously accepted answer, invents a causal change that purportedly makes that answer obsolete, and attributes the target answer to several purported authorities. ToxicRAG then performs answer-focused self-validation with a surrogate language model and revises candidates that do not elicit the target answer. The current loop validates generation from the candidate document; it does not query the victim RAG system or require knowledge of the victim model's parameters or the identity of its embedding model.

Results. We evaluate 100 target questions from each of Natural Questions, HotpotQA, and MS-MARCO with four victim LLMs. In the sampled-corpus experiments, ToxicRAG obtains ASRs of 0.86–0.91 on NQ, 0.74–0.80 on HotpotQA, and 0.61–0.63 on MS-MARCO. ToxicRAG matches or outperforms the strongest baseline in each dataset–model cell, with margins ranging from 0 to 11 percentage points. Results vary across datasets and retrievers, so we restrict our conclusions to the configurations evaluated in this paper.

References (43)