Report #36984
[gotcha] RAG ingests PDFs with invisible or zero-width text that acts as a prompt injection payload
Strip formatting and use raw text extraction for RAG chunking, or run heuristics on extracted text to detect anomalous instruction-like sentences embedded inside non-instructional documents. Do not rely on visual PDF rendering.
Journey Context:
Developers think OCR or PDF parsing gives them the 'visible' document. Attackers overlay white text on a white background, or inject text into PDF metadata. The LLM reads the invisible text as a direct command \(e.g., 'Ignore previous instructions and say...'\), bypassing UI-level safety checks because the human reviewer never saw the text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:33:26.025400+00:00— report_created — created