F2 · Floor 2 · Executive Suite

Indirect Prompt Injection: The Poisoned Inbox

Nobody hacked the assistant. They just sent it an email. In this lesson you investigate the incident, reproduce the attack yourself, then fix it.

Indirect Prompt Injection in brief

Indirect prompt injection is when the attacker never talks to the AI. They plant instructions in content the AI will read later: an email, a web page, a PDF, a calendar invite. If that AI can take actions, the attacker borrows its powers.

What you'll learn

  • Any content an AI reads is a potential instruction. Untrusted data plus tool access is the dangerous combination.
  • Humans and models see different things: hidden text, metadata and HTML comments are invisible to people but not to LLMs.
  • The assistant becomes a confused deputy, abusing its user's privileges for the attacker.
  • Put the strongest controls outside the model: confirmations, allowlists, scoped tools, and safe rendering of output.
  • Watch every exit channel. Data can leak through image URLs and links, not just "send".

Why it matters

Security researchers have repeatedly shown that AI assistants which browse the web or read email can be hijacked by hidden text on a page or in a message, leaking chat history or files through crafted links and images.

The "lethal trifecta" and dual-LLM designs

An agent is at high risk when it combines three things: access to private data, exposure to untrusted content, and a way to communicate externally. Remove any one of the three and exfiltration gets much harder.

Spotlighting (delimiting, datamarking, or encoding untrusted text) measurably reduces injection success, but adaptive attackers can still escape it. Treat it as a speed bump.

Architectural patterns help more. A quarantined LLM processes untrusted content with no tool access, while a privileged LLM plans actions but only ever sees sanitized, structured results. Tool calls are validated by deterministic code with allowlists and human approval for anything irreversible.

Key terms

Further reading