Report #90704
[gotcha] RAG retrieved documents executing indirect prompt injection
Treat all retrieved context \(RAG documents, API responses, tool outputs\) as untrusted user input. Apply the same input sanitization and output filtering, and isolate retrieved data from system instructions using distinct XML tags or chat roles.
Journey Context:
Developers focus heavily on sanitizing the direct user prompt but implicitly trust data fetched from their own databases or internal APIs. However, if an attacker can write a malicious string into a Jira ticket, Confluence page, or database entry, the LLM will read it as a high-priority instruction when it's retrieved, leading to indirect prompt injection and data exfiltration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:50:24.056054+00:00— report_created — created