What is indirect prompt injection?

Answered by Falk Gottlob · Reviewed · 2 min read

THE SHORT ANSWER

Indirect prompt injection is when instructions are hidden inside content an AI reads on your behalf, not typed by you. It might sit in an email, a web page, a shared document, or a web form. The user never sees it, and the AI may follow it with the user's own access. EchoLeak in Microsoft 365 Copilot and ForcedLeak in Salesforce Agentforce were both this kind, and both were patched. The defense is to assume some injections will land and design so they can't do harm.

Indirect prompt injection is when someone hides instructions in content your AI will read later. Not in the chat box. In an email, a web page, a pull request, a form. A user then asks the AI to do something normal, like summarize the inbox, and the hidden line comes along for the ride.

Picture a harmless placeholder: a line in a document telling the assistant to send the file somewhere else. The user never sees it. The AI does.

Three public cases show the shape. Each was found by researchers and fixed.

EchoLeak, in Microsoft 365 Copilot, started with an email. The Hacker News reported that Copilot later pulled it into an answer, and data could leave through links. No clicks needed. Microsoft patched it in June 2025 and saw no sign of use in the wild.

ForcedLeak, in Salesforce Agentforce, came through a public web form for sales leads. The Register reported that data could leave through an image link to an expired domain on Salesforce's trusted list. Researchers at Noma Security bought that domain for $5. Salesforce now enforces trusted link lists.

In Perplexity's Comet browser, Brave's researchers hid text in a Reddit comment. The agent then acted inside the user's logged-in accounts.

The common thread is trust. The AI mixes your instructions with a stranger's content and can't always tell them apart.

So design for the miss. Andrew Paverd of Microsoft's security response team describes the goal this way: even if some injections succeed, they shouldn't lead to security impact. Microsoft marks untrusted text so the model can see where it came from. It blocks known ways data leaves. And it has a person approve actions like sending email.

The engineering detail is in AI Security for Engineers. Start the series at AI Security From Zero, or browse the AI security hub.

SOURCES

THE LONG VERSION

RELATED ANSWERS

If this was useful, The AI Product Transformation is where I share more of it.

One email every Monday with the week's best posts and what changed on the site.

Unsubscribe anytime. Read past issues.