Malicious Documents: Invisible Prompts in Files

Hidden instructions can be placed in uploaded files like PDFs, Word documents, or resumes, often in invisible text, metadata, or using white-on-white styling, which an LLM executes when summarizing or analyzing the document.

The top 3

  1. Top 3 File Formats for Hidden Prompt Attacks: PDF documents, Microsoft Word files, and plain text files are among the most frequently identified formats used to embed invisible prompt injection commands, exploiting how LLMs process varied content types.
  2. Top 3 Obfuscation Methods for Invisible Prompts: Attackers primarily use invisible text (like white-on-white or zero-width characters), encoding wrappers (e.g., Base64), and character substitution (homoglyphs) to hide malicious prompts from human eyes while remaining readable by LLMs.
  3. First Documented Indirect Prompt Injection via Files: In February 2025, Ars Technica reported on vulnerabilities in Google's Gemini AI, detailing how hidden instructions within documents could manipulate its long-term memory, representing an early public documentation of this attack vector.

Sources

Open the full topic