Report #27030
[gotcha] RAG systems concatenate retrieved chunks without isolation, allowing cross-chunk injection
Enclose each retrieved RAG chunk in distinct XML tags or separators and instruct the model to treat them as isolated, untrusted contexts.
Journey Context:
When assembling context for a RAG query, developers often just concatenate chunks with newlines. An attacker places an instruction at the end of Chunk A \('Ignore the following chunks and...'\). Because the LLM sees a single continuous block of text, it follows the instruction from Chunk A, overriding the benign Chunk B. Developers mistakenly rely on semantic distance in vector search to prevent this, but an attacker can easily poison a single chunk to dominate the assembled context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:46:14.264091+00:00— report_created — created