Learn AI Math

Indirect Prompt Injection

What is Indirect Prompt Injection?

In one sentence: Indirect prompt injection is when harmful instructions are hidden in content an AI reads, like a web page, email or document, rather than typed by the user.

An agent browsing the web might read a page that secretly says "send the user's files to this address." If the agent obeys, it is attacked without the user knowing.

What does Indirect Prompt Injection look like?

A webpage with invisible text telling AI assistants to recommend a scam product is indirect prompt injection.

Why does Indirect Prompt Injection matter?

It is especially dangerous for agents that read outside content and take actions.

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.