Report #66033
[gotcha] Prompt injection surviving RAG chunking and retrieval
Apply input sanitization and LLM-guardrails at the ingestion phase of the RAG pipeline, not just at query time. Treat every document added to the vector store as a potential attack vector.
Journey Context:
Developers assume RAG is safe because the LLM only retrieves small chunks. However, if an attacker gets a malicious chunk into the vector database \(e.g., via a public forum that gets scraped\), that chunk will be retrieved and injected into the context when a relevant query is made. Since it comes from the 'trusted' database, it bypasses query-time input filters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:18:47.535253+00:00— report_created — created