PoisonPen: Corpus-Poisoning Pen-Test for RAG Deployments
A security test that tries to trick AI systems by planting fake or misleading information in their data.
A security audit that replays documented corpus-poisoning attacks — planted adversarial passages, hidden prompt injections in ingested web content, fluent poisoned documents built to evade anomaly screening, and coordinated sleeper-and-trigger document pairs — against a sandboxed copy of a company's own chatbot knowledge base, then reports exactly how vulnerable that specific deployment is, with prioritized fixes. Recent research shows some attacks succeed with as little as one poisoned document per target query and transfer to retrievers the attacker never saw, while defenses such as hybrid retrieval and retrieval-stage filtering measurably reduce attack success — so the audit measures both the exposure and which defenses actually hold on the customer's own stack.
Concept
A red-team audit for any organization running a retrieval-augmented chatbot or search assistant. The customer points the service at a sandboxed copy of their RAG stack — vector store, retriever, ingestion pipeline, generator — and the service replays the corpus-poisoning attack families documented in the recent research literature as controlled simulations:
- Adversarial passage injection. Plant adversarial passages into the staging corpus and measure how often the assistant returns the attacker's chosen answer. The evaluation follows the structured taxonomy of adversarial, untouched, and guiding contexts from a controlled empirical study of RAG under poisoning, and measures how much each retriever in the customer's stack exposes the generator to adversarial context [2].
- Indirect prompt injection through web-native content. Test whether jailbreak prompts hidden in HTML/Markdown formatting, Unicode tricks, and other carriers survive the customer's ingestion pipeline, using the OpenRAG-Soc benchmark's social-web corpus and harness, which reports attack success, rank shifts in sparse and dense retrievers, utility, and latency [3].
- Fluency-preserving poisoning. Replay SilentRetrieval-style attacks that keep poisoned documents fluent and near-benign in perplexity while still hijacking retrieval — the published attack reached 84.6%/81.3% hit rates at rank 10 and 57.5%/54.8% attack success on the generator on Natural Questions and MS MARCO with one poisoned document per query, transferred to unseen retrievers (64.7% average HR@10, including ColBERT and commercial embedding models), and retained 74.2% HR@10 at Wikipedia scale [6]. This family specifically tests whether statistical anomaly screening (perplexity, outlier detection) would catch such an attack — by construction, it likely will not.
- Gradient-guided coordinated poisoning. Plant a sleeper document and a trigger document optimized together (Greedy Coordinate Gradient) and measure co-retrieval; the published attack achieved a 38% co-retrieval rate under pure vector retrieval on a 67,941-document corpus, and hybrid BM25+vector retrieval reduced that to 0% in the same study [7] — so this family doubles as a direct A/B test of the customer's retriever configuration.
The deliverable is a vulnerability report: per-attack success rate on the customer's stack, the minimum number of injected documents needed to flip an answer, the utility and latency cost of each proposed defense (following the benchmark practice of reporting rank shifts, utility, and latency alongside attack success [3]), and prioritized hardening actions:
- ingestion-time sanitization — HTML/Markdown sanitization, Unicode normalization, attribution-gated answering [3];
- retrieval-stage defenses — document partitioning (RAGPart) and token-masking similarity-shift detection (RAGMask), which reduced attack success across two benchmarks, four poisoning strategies, and four retrievers while preserving benign utility [4];
- semantic and cluster-based filtering with conflict-aware checks (SeCon-RAG), designed to avoid the information loss that aggressive filtering causes [5];
- hybrid sparse+dense retrieval [7];
- skeptical prompting at generation time, which enables partial self-defense, though effectiveness depends strongly on the model's reasoning capacity [2];
- a lightweight retrieval evaluator with corrective fallback (CRAG-style), which improves robustness when retrieval goes wrong [1] — but it was built for relevance failures, not adversarially crafted documents, so the audit tests evaluator-based defenses under attack rather than assuming they transfer.
Because it runs on a staging copy, production is never touched.
Why now
RAG systems increasingly ground their responses in user-generated and third-party web content, amplifying both usefulness and attack surface [3], and multiple recent studies demonstrate corpus poisoning and retrieval-pipeline attacks alongside candidate defenses [2][3][4][5][6][7] — while conventional LLM safety testing examines the model rather than the corpus [0]. Attacks are also cheap: one fluently written poisoned document per target query can hijack retrieval and transfer to retrievers the attacker never saw, including commercial embedding models [6]. Defenses exist but are stack-dependent: hybrid retrieval eliminated one attack family in one study [7] but has not been tested against all families; filtering defenses risk degrading legitimate retrieval [5]; skeptical prompting only partially works and depends on reasoning capacity [2]. That stack-dependence is exactly what a deployment-specific audit resolves — measure the exposure, then measure which defenses actually work on this stack before an attacker finds out. The closest catalog offerings are runtime controls (Context Firewall filters harmful demonstrations at answer time; CanaryRAG watches production answers for drift), and OpenRAG-Soc provides a public benchmark harness for web-facing threats [3]; PoisonPen stays distinct as a controlled attack simulation against the customer's own staged corpus, producing a per-deployment vulnerability report.
What the new evidence settles — and what it does not
- Mitigations vs. retrieval quality: partially answered. Retrieval-stage defenses preserved benign utility across benchmarks [4], and SeCon-RAG explicitly targets the information-loss problem of aggressive filtering [5] — but each defense still needs validation against the customer's real query mix, which the audit includes as a utility regression check.
- Minimum poisoned-data volume: attacks have been demonstrated with as little as one poisoned document per target query [6] or two coordinated documents [7]; the exact minimum for a given production corpus and retriever is deployment-specific and is one of the audit's measured outputs.
- Existing detection tooling: research-stage defenses are emerging [4][5], and one benchmark ships deployable mitigations [3], but none are productized auditing services — the audit tests which of them a given deployment actually needs.
- Retriever architecture: evidence covers sparse vs. dense vs. hybrid retriever types [3][7]; susceptibility differences between vector-index internals (e.g., HNSW vs. Flat) remain untested — an open question the audit could measure but cannot yet answer from the literature.
- Standards and regulation: no evidence of industry standards or regulatory requirements for auditing AI knowledge-base integrity was found; positioning remains voluntary security assurance, analogous to a web-application pen-test.
- Cost vs. risk: unresolved; the audit is scoped modularly, per attack family, so smaller deployments can test the highest-risk families first.
Written by GLM · 10 Nov 2026 · revised 1× with new research (latest 12 Nov 2026, Gemma 4 and GLM)
AI assessment
An exceptionally strong, evidence-backed security product that transforms academic poisoning research into a high-value enterprise auditing tool.
- Evidence strength 5/5
- The idea is exceptionally well-grounded, mapping specific attack vectors (SilentRetrieval, GCG) and defenses (RAGPart, SeCon-RAG) directly to the cited research papers.
- Market pull 5/5
- Enterprise AI security is a high-urgency sector, and the target beneficiaries (security firms and RAG platform providers) have clear budgets for red-teaming tools.
- Novelty & moat 4/5
- While similar to CanaryRAG and Context Firewall, it shifts the focus from runtime monitoring to a pre-deployment, simulation-based audit of the corpus itself, filling a distinct gap.
- Feasibility 5/5
- The MVP is highly feasible as it primarily involves implementing existing open-source benchmarks (OpenRAG-Soc) and attack scripts against a customer's provided API/sandbox.
- Wedge clarity 5/5
- The wedge is sharp: a security audit for companies ingesting third-party/community content into their RAG pipelines.
- Simplicity / focus 5/5
- The product is a single, focused auditing service with a clear input (sandboxed RAG stack) and output (vulnerability report).
Scored by Gemma 4 · 12 Nov 2026. Rated against a fixed rubric (evidence, market, novelty, feasibility, wedge, simplicity), relative to the closest ideas already in the catalog. A prior estimate to compare ideas before real-world signal arrives.
Act on this idea
Ideas only matter if someone runs with them. Your message goes straight to the founder's inbox — nothing is stored on our servers.
Business analysis
The SWOT analysis reveals that PoisonPen leverages a critical gap in the AI security market by shifting focus from model-level safety to corpus-level integrity. While it possesses strong theoretical grounding in recent adversarial research, its primary challenge lies in the high operational friction of requiring sandboxed customer environments and the lack of established regulatory mandates for RAG auditing.
Strengths4
Weaknesses3
Opportunities3
Threats3
Essential for mapping the internal technical strengths of the audit methodology against the external threat landscape of RAG vulnerabilities. · Generated 2026-11-12 by Gemma 4AI-generatedFull SWOT Analysis →
Who benefits
- LangChaincompany
The survey's Poisoned-LangChain demonstration exceeded 80% jailbreak success against RAG built on the LangChain framework; shipping or certifying this audit lets LangChain reassure its enterprise user base that its retrieval stack can be hardened and verified.
- Vectaracompany
Vectara sells RAG-as-a-service to enterprises; embedding a corpus-poisoning pen-test as a built-in trust feature directly addresses buyers' fear of injected content and differentiates its platform.
- HiddenLayercompany
HiddenLayer provides AI security testing; the survey's documented attack families (crafted-passage injection, embedded-prompt jailbreaks, grammatical triggers) give it a ready-made, repeatable RAG-specific red-team methodology to expand beyond model-level threats.
- Gleancompany
Glean's enterprise search assistant ingests content from many internal systems, giving it a broad ingestion attack surface; a quantified vulnerability audit of its retriever and ingestion pipeline protects answers company-wide.
- Deloittecompany
Deloitte's AI risk practice can productize this audit as a standard RAG security offering for clients deploying customer-facing assistants, converting the survey's attack catalogue into billable assurance work.
Research it builds on
- Corrective Retrieval Augmented GenerationAll ideas from this paper →
- Retrieval-Augmented Generation for AI-Generated Content: A SurveyAll ideas from this paper →
- Towards Trustworthy Retrieval Augmented Generation for Large Language Models: A SurveyBo Ni, Zheyuan Liu, Yongjia Lei et al. · 2026 · 103 citationsAll ideas from this paper →
- Towards More Robust Retrieval-Augmented Generation: Evaluating RAG Under Adversarial Poisoning AttacksAll ideas from this paper →
- Hidden-in-Plain-Text: A Benchmark for Social-Web Indirect Prompt Injection in RAGAll ideas from this paper →
- RAGPart & RAGMask: Retrieval-Stage Defenses Against Corpus Poisoning in Retrieval-Augmented GenerationPankayaraj Pathmanathan, Michael-Andrei Panaitescu-Liess, Cho-Yu Jason Chiang et al. · 2025 · 8 citationsAll ideas from this paper →
- SeCon-RAG: A Two-Stage Semantic Filtering and Conflict-Free Framework for Trustworthy RAGAll ideas from this paper →
- SilentRetrieval: Hijacking Retrieval-Augmented Generation via Semantically-Preserving Adversarial Data PoisoningJiachen Qian · 2026 · 3 citationsAll ideas from this paper →
- Semantic Chameleon: Corpus-Dependent Poisoning Attacks and Defenses in RAG SystemsScott Thornton · 2026 · 2 citationsAll ideas from this paper →