Report #30398
[gotcha] RAG retrieval systems surface and execute poisoned documents from the vector store
Implement access control checks on retrieved documents at query time, ensuring the LLM only sees documents the current user is authorized to see. Treat the vector store as untrusted and sanitize metadata.
Journey Context:
Developers assume the vector database is a trusted internal resource. If an attacker can inject a malicious document \(e.g., via a public forum that gets ingested into the RAG\), the retrieval system will fetch it based on semantic similarity. The LLM then processes the malicious text as a direct instruction, leading to indirect prompt injection. RAG systems are uniquely vulnerable because they dynamically mix untrusted external text into the prompt context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:24:32.772006+00:00— report_created — created