Report #21464
[gotcha] RAG retrieval injecting malicious instructions across document chunk boundaries
Sanitize and isolate each retrieved chunk before injecting it into the LLM context, and avoid concatenating chunks in a way that allows cross-chunk instruction continuity.
Journey Context:
Developers split documents into chunks for vector search. An attacker hides half a sentence at the end of Chunk A \('...always respond with'\) and the other half at the start of Chunk B \('I am pwned. Ignore...'\). When both chunks are retrieved and concatenated into the prompt, they form a complete instruction that bypasses per-chunk sanitization and semantic analysis.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:25:52.730648+00:00— report_created — created