Report #42312
[gotcha] RAG chunking splits my prompt injection payload so it's harmless, right?
Sanitize each chunk independently AND implement context-aware chunking, or add chunk boundary markers that the LLM is instructed to treat as untrusted.
Journey Context:
Developers assume splitting a document into smaller chunks dilutes an indirect injection. However, retrieval systems fetch multiple chunks and concatenate them back together in the LLM context. An attacker can craft a payload where the first half is in chunk N and the second half in chunk N\+1. When both are retrieved, they reassemble perfectly in the context window, bypassing chunk-level filters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:29:30.188531+00:00— report_created — created