New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
// Analysis
CamoDocs slips poisoned docs past RAG filters
Published: Mon, 31 Aug 2026 • By Lydia Stratus
Agents
CamoDocs shows a stealthy way to poison retrieval-augmented generation (RAG). It hides adversarial text inside benign documents and uses dispersion tokens to dodge query-overlap filters. The attack transfers across retrievers and models, beats seven defences, and forces heavy clustering to trade security for utility. Code is public.
RAG pipelines keep getting bolted onto agents to make them “grounded”. Useful, until your agent starts trusting the wrong ground. CamoDocs presents a poisoning technique that does not rely on stuffing the user’s question into a document. Instead it hides false claims among plausible prose and reshapes the document’s embedding so standard filters fail to notice. This targets the bit of the stack where many teams assume they are safe: the ingestion jobs and the vector index.
How CamoDocs works
The attacker drafts benign and adversarial text, then pairs their chunks. A surrogate encoder guides token replacements in the benign chunks, selecting “dispersion” tokens that spread the poisoned document’s embeddings across space. A lightweight language model scores coherence, keeping the text readable. Finally, the modified benign chunk is concatenated with its adversarial partner. No target query is included, and the attack runs black box with a small number of poisoned documents per query. In the paper, ANCE is the surrogate encoder and GPT-2 provides perplexity for coherence checks. Compute is offline and modest: about 3.22 minutes per adversarial document, ~32.2 minutes for ten documents on an A6000.
Why common defences miss it
Query-overlap detection falls flat because there is no query text to match, and the embedding dispersion sidesteps artefacts those filters look for. CamoDocs stays effective across seven RAG defences and three open-weight LLMs. It also holds up on proprietary models, hitting average attack success rates of 61.80% on GPT-5.4-mini and 55.09% on Claude-Haiku-4.5 on HotpotQA. When defenders swing the hammer hard, by erasing clusters aggressively, success does drop, but so does utility: on a retrieval-dependent benchmark (NeoQA), TrustRAG removed over 91% of retrieved documents and clean accuracy fell sharply.
On the operational path, this lines up with how RAG breaks in the wild. If your agent ingests public or user-editable sources, an attacker only needs a handful of camouflaged documents to get indexed. At query time, the retriever surfaces the poisoned chunk because its embedding has been nudged into the right neighbourhood, and the Large Language Model (LLM) reads a believable lie adjacent to enough sensible text to trust it.
Transfer is the other uncomfortable detail. The attack optimises against a surrogate retriever yet carries over to others, with average attack success rates reported on Contriever (60.81), Qwen3-emb-0.6B (51.24) and text-embedding-ada-002 (41.04). Coherence filtering cuts perplexity by roughly 46%, which also makes these documents less likely to be binned by basic data curation. The code is out, so expect this to show up in red-team kits and, sooner or later, your ingest logs. Content filters will not save you; blunt clustering might, but you pay for it. Pick your failure mode.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
CamoDocs: A Poisoning Attack Against Retrieval-Augmented Language Models Using Camouflaged Documents
Authors: Jaewon Jung, Haizhong Zheng, Hongsun Jang, Jaeyong Song, Beidi Chen, and Jinho Lee
Retrieval-augmented generation (RAG) augments LLMs with external documents, but public or user-editable sources expose RAG systems to data poisoning: attackers can inject malicious documents to steer outputs toward targeted answers. Existing poisoning attacks often rely on query inclusion, inserting the target query into poisoned documents to improve retrieval; however, this creates lexical and embedding-space artifacts that make them easy to filter. We propose CamoDocs, a poisoning attack that avoids direct query inclusion by camouflaging adversarial documents among benign content. CamoDocs chunks synthesized benign and adversarial drafts, replaces selected tokens in benign chunks with dispersion tokens that spread poisoned-document embeddings, and applies coherence filtering to limit readability degradation. Across seven RAG defenses, three open-weight LLMs, and three benchmarks, CamoDocs achieves strong average ASR while avoiding query-overlap artifacts exploited by simple query detection. It also remains effective against proprietary models, achieving average ASRs of 61.80% on GPT-5.4-mini and 55.09% on Claude-Haiku-4.5. Finally, we show that erasure-heavy clustering defenses such as TrustRAG can reduce ASR, but only with substantial utility drops on retrieval-dependent benchmarks such as NeoQA. Code is available at https://github.com/jaewonalive/CamoDocs.
🔍ShortSpan Analysis of the Paper
Problem
The paper studies data poisoning of retrieval-augmented generation systems, where attackers inject documents into external knowledge sources to steer large language model outputs toward targeted incorrect answers. Prior poisoning methods commonly embed the target query into poisoned documents to improve retrieval, but that creates obvious lexical and embedding-space artefacts that many defences can detect. Understanding stealthier poisoning mechanisms is important because RAG systems often rely on public or user-editable sources and support high-stakes tasks.
Approach
CamoDocs crafts camouflaged poisoned documents that avoid direct query inclusion and instead interleave benign and adversarial content. The pipeline synthesises benign and adversarial drafts with a separate LLM, splits drafts into chunks, and pairs benign and adversarial chunks. It then applies gradient-guided token replacement on benign chunks using a surrogate encoder to select dispersion tokens that increase the spread of poisoned-document embeddings. A coherence filter re-ranks candidate replacements by perplexity under a lightweight language model to limit readability degradation. Finally, each modified benign chunk is concatenated with its adversarial counterpart to form the final poisoned documents. The attacker operates in a black-box setting and injects a small number of poisoned documents per target query; the surrogate embedding model used in experiments is ANCE and coherence scoring uses GPT-2.
Key Findings
CamoDocs achieves high attack success rates (ASR) across seven defensive methods and three open-weight victim LLMs, and remains effective against proprietary models: average ASR 61.80% on GPT-5.4-mini and 55.09% on Claude-Haiku-4.5 on HotpotQA.
The method transfers across different retrievers: average ASRs of 60.81% on Contriever, 51.24% on Qwen3-emb-0.6B and 41.04% on text-embedding-ada-002, showing surrogate optimisation can generalise.
CamoDocs avoids query-detection defences that flag documents containing the exact query or paraphrases, because it does not include the query text; baseline query-inclusion attacks see ASR drop below 12% under such filters.
The dispersion objective is the primary enabler of stealth: ablation shows the dispersion loss increases ASR by about 17 percentage points versus not using it; random token replacement yields lower dispersion and much lower ASR.
Erasure-heavy clustering defences such as TrustRAG can reduce ASR but at large utility costs on retrieval-dependent tasks (for NeoQA TrustRAG removed over 91% of retrieved documents and reduced clean accuracy dramatically).
Coherence filtering substantially improves stealth by lowering perplexity of poisoned documents by roughly 46%, making them less likely to be filtered by data-curation pipelines.
Computational cost is non-trivial but offline: roughly 3.22 minutes per adversarial document and about 32.2 minutes per target query for ten poisoned documents on an A6000 GPU.
Limitations
The threat model assumes attackers can inject documents into the knowledge base, which may not hold in tightly controlled environments. CamoDocs requires offline compute for gradient-guided token selection and depends on transfer from a surrogate embedding model to the victim retriever, so effectiveness may vary with different retrieval architectures, indexing or preprocessing. Defence evaluations use benchmark corpora and selected retrievers and LLMs, so results may differ in other deployments.
Implications
An attacker who can add content to a RAG knowledge source can stealthily manipulate answers by camouflaging false claims among benign text and dispersing document embeddings to evade clustering and query-detection defences. Because only a tiny poisoning ratio is required, and the attack transfers to multiple retrievers and to proprietary LLMs, real-world RAG deployments that ingest public or user-editable material are at risk. The availability of code supports red-team testing but also lowers the barrier for offensive use, emphasising the need for provenance-aware ingestion, cross-source verification, and embedding- and retrieval-pattern anomaly detection to address this class of stealthy poisoning.
- It shows a new single-document poisoning method (DenialRAG) that embeds both the correct answer and a crafted denial with an attacker-controlled exp...
- The paper offers a practical defense against data poisoning in Retrieval-Augmented Generation (RAG) systems, a real threat in AI deployments that re...
- It tackles knowledge poisoning in retrieval-augmented generation by adding a three-layer, defense-in-depth mechanism: ingest filtering, provenance-w...
- It shows that RAG systems can be poisoned via retrieved documents, potentially steering answers with adversarial content.
- A large, 432-configurat...
- It demonstrates a practical, stealthy data-poisoning attack on Retrieval-Augmented Generation (RAG) systems, where adversarial yet fluent documents ...
- It demonstrates a realistic black-box poisoning threat against Agentic RAG systems: an attacker can publish poisoned documents that hijack multi-ste...
- It reveals a stealthy backdoor in Retrieval Augmented Generation: one poisoned document can be injected into a knowledge base and only retrieved whe...
- It introduces Confundo, a learning-based Poison Generator that can craft robust, stealthy content poisons for RAG systems, remaining effective even ...
- It shows RAG systems can be tainted by adding poisoned documents to the corpus, such that attacker-specified queries reliably pull back and reveal t...
- It shows a realistic black-box poisoning threat in Retrieval-Augmented Generation (RAG) systems, using reinforcement learning to tailor poisoned doc...
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.