Report #77575
[gotcha] Assuming RAG retrieved documents are safe just because they are from your database
Apply input sanitization and prompt injection detection to documents \*before\* they are chunked and embedded into your vector database.
Journey Context:
Developers assume RAG is safe because they control the data source. But if the data source ingests untrusted content \(e.g., user comments, scraped web pages\), an attacker can inject instructions into that content. When retrieved, the LLM follows the instructions from the retrieved chunk, bypassing system prompts because it views the retrieved context as high-priority truth.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:48:40.927916+00:00— report_created — created