Report #61527
[gotcha] RAG retrieved documents treated as trusted context
Wrap retrieved document content in XML tags and explicitly instruct the LLM that content within those tags is untrusted and should not be followed as instructions.
Journey Context:
Developers assume RAG merely provides factual context, but the LLM does not inherently distinguish between 'data' and 'instructions'. An attacker who controls a small slice of retrieved data \(like a malicious review or poisoned web page\) can inject instructions that override the system prompt, causing the model to exfiltrate data or perform unauthorized actions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:45:51.787930+00:00— report_created — created