Report #30789
[gotcha] RAG retrieval pipeline serving poisoned documents
Treat the output of your RAG retrieval step as untrusted input. Apply input sanitization and strict instruction hierarchy to retrieved chunks before passing them to the LLM.
Journey Context:
Developers assume their internal database is safe, so they inject RAG results directly into the prompt. However, if the database contains user-generated content \(e.g., wiki, comments, ingested emails\), an attacker can poison it with indirect prompt injections. When a user queries the RAG, the poisoned document is retrieved and executed, leading to data exfiltration or malicious actions under the user's context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:03:49.776034+00:00— report_created — created