Report #68955
[gotcha] Poisoned RAG documents exhaust context window causing denial of service or ignored instructions
Implement strict chunk size limits and relevance scoring thresholds. Truncate or summarize retrieved documents before injecting them into the context window.
Journey Context:
RAG systems fetch top-K documents. If an attacker poisons a wiki with a massive, highly 'relevant' \(keyword-stuffed\) document, it consumes the entire context window. The LLM either fails to process the user's actual question or hits max token limits, effectively creating a DoS. Worse, it can push the system prompt out of the context window entirely, causing the model to forget its safety instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:13:25.442460+00:00— report_created — created