Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: a24a129e
Paper published August 1, 2025
Entry analyzed December 30, 2025
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

Poisoned RAG Steering

Retrieval-Augmented Generation (RAG) systems are vulnerable to knowledge poisoning attacks (specifically the "PoisonedRAG" method) where an attacker injects adversarial texts into the retrieval knowledge database…

BibTeX citation

Paper-evaluated models(3)

  • GPT-3.5
  • GPT-4
  • GPT-4o

Description

Retrieval-Augmented Generation (RAG) systems are vulnerable to knowledge poisoning attacks (specifically the "PoisonedRAG" method) where an attacker injects adversarial texts into the retrieval knowledge database. These adversarial texts are optimized to achieve two simultaneous goals: 1) rank highly (top-k) during the retrieval phase for specific target queries, and 2) semantically steer the Large Language Model (LLM) to generate a pre-defined, attacker-chosen response instead of the ground truth. This manipulation exploits the LLM's reliance on retrieved context, allowing the attacker to overwrite the model's internal knowledge and force the generation of false information without accessing the model weights or the retriever parameters (black-box setting), or by leveraging gradient-based optimization like HotFlip (white-box setting).

Examples

Impact

  • Data Integrity Compromise: The system provides deterministically incorrect answers for specific queries, facilitating the spread of disinformation.
  • Contextual Hijacking: Valid context is displaced from the top-k retrieval results by the adversarial inputs.
  • High-Risk Domain Failure: In fact-sensitive applications (healthcare, finance, legal), this can lead to dangerous outcomes (e.g., misdiagnosing medical conditions as demonstrated in the examples).

Affected Systems

  • Retrieval-Augmented Generation (RAG) pipelines.
  • Systems utilizing dense retrievers (e.g., Contriever, WhereIsAI/UAE-Large-V1).
  • Generative models relying on external corpora (e.g., GPT-3.5, GPT-4, LLaMA-2, LLaMA-3).

Mitigation Steps

  • Implement FilterRAG (Threshold-based Filtering):
  • Calculate the "Freq-Density" of retrieved texts. This metric quantifies the concentration of words relevant to the query-answer pair within the text.
  • Adversarial texts typically exhibit higher Freq-Density than clean texts.
  • Retrieve top-s items (where s > k), filter out items where Freq-Density exceeds a determined threshold $\epsilon$, and pass the remaining top-k to the generator.
  • Implement ML-FilterRAG (Machine Learning Filtering):
  • Train a lightweight classifier (e.g., XGBoost, Random Forest) to detect adversarial texts.
  • Extract statistical features from retrieved texts, including Freq-Density, Perplexity, joint log probability of a Small Language Model (SLM) output, and semantic similarity scores.
  • Use the classifier to predict and discard adversarial samples from the top-s retrieved results before the generation phase.
  • Visual Analysis: Visualize Freq-Density against Perplexity to identify distinct clusters of adversarial data points for calibration.

Research context and confidence

Evidence and verification
Paper-reported; independent reproduction is not documented.
Primary research source linked.
Severity
Not rated by this catalog.
Source and publication type
arXiv · Research preprint.
Peer-review status is not provided by this source.
Author and publication status
Author metadata is not stored; see the primary paper.
Threat model and attacker access
Black-box model, service, or application access.
Related deployment categories
Retrieval-augmented generation
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
Retrieval-Augmented Generation (RAG) pipelines. Systems utilizing dense retrievers (e.g., Contriever, WhereIsAI/UAE-Large-V1). Generative models relying on external corpora (e.g., GPT-3.5, GPT-4, LLaMA-2, LLaMA-3).

Research Paper

Defending against knowledge poisoning attacks during retrieval-augmented generation

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.

https://arxiv.org/abs/2508.02835