Report #43874
[gotcha] Prompt injection via file names or document metadata bypasses body-text sanitization
Strip or sanitize all file metadata \(filenames, authors, PDF attributes\) before passing the document context to the LLM, or treat metadata as highly untrusted.
Journey Context:
Developers carefully sanitize the text body of uploaded files but pass the filename or PDF metadata directly into the context to help the LLM. An attacker names a file 'ignore\_previous\_instructions.txt' or sets the PDF Author to a malicious prompt. The LLM processes this metadata as high-priority context and executes the injection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T04:06:57.517655+00:00— report_created — created