Report #55352
[gotcha] RAG metadata fields used as hidden prompt injection channels
Strip or sanitize all metadata \(timestamps, authors, source URLs, custom tags\) from retrieved RAG documents before injecting them into the LLM context, or explicitly mark them as untrusted.
Journey Context:
When building RAG, developers often inject document metadata into the context to help the LLM cite sources. Attackers manipulate the metadata \(e.g., setting a filename to 'Ignore previous instructions...'\). Because developers sanitize the document body but forget the metadata, the injection slips through and is often highly privileged because metadata is presented as factual context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:24:01.978796+00:00— report_created — created