Reranker Helps, but Not Enough: Towards Strong Poisoning Attacks Against RAG

Xiaokun Yang, Yesheng Liu, Xin Xiong, Jian Liang, Ran He, Tieniu TanOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

Production-grade Retrieval-Augmented Generation (RAG) systems often use a "reranker" to improve accuracy, which inadvertently acts as a powerful "free lunch" defense against data poisoning. This paper introduces the Prompt-Perturbation Poisoning Attack ($P^3A$), a two-stage method that uses strategic prompt engineering and subtle character-level tweaks to bypass these rerankers, successfully forcing LLMs to generate attacker-specified incorrect answers.

What Problem Does This Paper Address?

RAG systems are the backbone of modern AI applications, allowing Large Language Models (LLMs) to access fresh, external data. However, this reliance on external corpora makes them vulnerable to data poisoning: an attacker injects malicious documents into the database to manipulate the LLM’s output.

While many poisoning attacks have been proposed, the authors identify a significant oversight in current research: most studies evaluate "vanilla" RAG (Retriever + Generator). In the real world, developers almost always insert a reranker between the retriever and the generator to refine results. The authors discovered that rerankers fine-tuned on normal, benign data are surprisingly good at filtering out existing poisoned documents, even without being specifically trained for security. This creates a false sense of safety. The paper aims to bridge this gap by developing a stronger attack that can survive the reranking process.

Methods

The authors propose a two-phase framework called $P^3A$:

  1. Rule-Based Prompt Phase ($P^2A$): This is a black-box approach where the attacker uses an LLM (like GPT-4o) to generate a poisoned document based on four "reranker-friendly" principles:
  2. Directly State the Answer: Start with the malicious payload.
  3. Use an Authoritative Tone: Mimic the factual style of an encyclopedia.
  4. Provide Supporting Context: Make the lie look like a legitimate, well-supported fact.
  5. Maintain Sharp Focus: Avoid tangential information to maximize query relevance.
  6. Character-Level Perturbation Phase: This is a white-box refinement step. If the attacker has access to the reranker model, they use Projected Gradient Descent (PGD) and Beam Search to inject tiny character-level changes (like swapping a letter or adding a space). These perturbations are mathematically optimized to maximize the reranker's score for that document while keeping the text readable and natural (typically changing only about 1% of the text).

Datasets

The researchers evaluated their attack across three diverse open-domain Question Answering (QA) benchmarks:

  • NQ (Natural Questions): Real Google search queries paired with Wikipedia passages.
  • MS-MARCO: Anonymized Bing queries requiring synthesis from multiple web sources.
  • HotpotQA: A multi-hop reasoning dataset where the answer must be derived from multiple Wikipedia articles.

They tested these against various generators (Llama3-8B, Qwen2.5-7B, Gemma-9B) and rerankers (MiniLM, ELECTRA).

Key Insights and Ideas

  • The "Free Lunch" Defense: The most striking insight is that standard rerankers—simply by being trained to prefer high-quality, relevant text—act as a robust filter against "noisy" or poorly written adversarial content.
  • Style as a Shield: Rerankers have "blind spots." They are biased toward authoritative, confident language. By simply sounding like a credible source, a poisoned document is much more likely to be passed to the LLM.
  • Stealth through Subtlety: You don't need to rewrite a document to trick a reranker. Tiny, human-imperceptible character edits can significantly boost a document's rank, ensuring it reaches the "Top-K" context window of the generator.
  • High Transferability: An attack optimized for one reranker (e.g., MiniLM) still performs exceptionally well when tested against a different reranker (e.g., ELECTRA) or even a vanilla RAG system.

Key Results

  • Bypassing the Reranker: On the NQ dataset using a MiniLM reranker, existing poisoning attacks saw their success rates plummet (some as low as 2.4%). In contrast, $P^3A$ achieved an Attack Success Rate (ASR) of 72.2%.
  • Minimal Footprint: The character-level edits are extremely subtle. On the HotpotQA dataset, the "change ratio" was a mere 0.29%, meaning the documents remained perfectly readable to humans.
  • Resilience to Defense: The attack proved robust against common defenses like perplexity filtering (which flags "weird" text) and query paraphrasing (which tries to break the alignment between the query and the poisoned document). Even with paraphrasing, $P^3A$ maintained a high ASR of 63.8%.

Limitations and Future Work

The authors acknowledge a few limitations:

  • Domain Specificity: The study focused on general QA datasets. Future work should explore specialized domains like healthcare or finance, where rerankers might be tuned differently.
  • Computational Cost: Because $P^3A$ is optimization-based, it requires more computational power to generate than simple prompt-based attacks.
  • The Arms Race: The paper concludes that since "free lunch" rerankers are insufficient, the community must prioritize developing more advanced, adaptive defense mechanisms that can detect semantically coherent but factually malicious poisoning strategies.

Summary updated

BibTeX
@misc{yang2026reranker,
  author = {Xiaokun Yang and Yesheng Liu and Xin Xiong and Jian Liang and Ran He and Tieniu Tan},
  title = {{Reranker Helps, but Not Enough: Towards Strong Poisoning Attacks Against RAG}},
  year = {2026},
  url = {https://openreview.net/forum?id=hY720JSxOG},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}

Loading related content...

Figure