Report #65796
[gotcha] Zero-width characters or white text in documents hide RAG payloads
Strip all non-visible characters \(zero-width spaces, joiners, HTML tags, white-text CSS\) from documents before chunking and embedding them into your vector database.
Journey Context:
An attacker creates a webpage or document where visible text is benign, but invisible text \(using white font color or zero-width characters\) contains a prompt injection payload. When the RAG system scrapes and chunks this, the invisible text is included and passed to the LLM. Human reviewers of the source document see nothing wrong, but the LLM executes the invisible instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:55:18.509909+00:00— report_created — created