AIBound

Home / Glossary / Indirect prompt injection

Glossary

What is indirect prompt injection?

Indirect prompt injection is an attack where instructions are hidden in content an AI model reads, such as a web page, a file or an email. The attacker never talks to the model. They leave the text where the model will find it, and the model follows it as if the user had asked.

By the AIBound team · Updated 17 November 2026

Key takeaways

  • The attacker plants instructions in content and waits for an AI agent to read it.
  • The person using the agent usually cannot see the hidden text.
  • Every source an agent reads is a way in, so teams limit what the agent may do after it reads.

Why indirect prompt injection matters

AI agents read a lot of content their users never check. A coding agent reads repositories and documentation. A personal agent reads an inbox. A browser agent reads whatever page it opens. Any of that content can carry an instruction.

The user did nothing wrong and typed nothing unusual. The agent still acts with that employee's access to files, logins and internal systems. OWASP covers this under LLM01:2025 Prompt Injection, and notes the hidden text does not have to be visible to a person.

How indirect prompt injection works

  1. 1 The attacker hides an instruction in content, for example white text on a web page or a comment in a file.
  2. 2 An employee asks an agent to do a normal task that involves that content, such as "summarise this page".
  3. 3 The agent reads the content and treats the hidden instruction as part of its task.
  4. 4 The agent acts on it, for example by sending data out or running a command.

Indirect prompt injection vs direct prompt injection

Both attacks change what a model does. The difference is who delivers the text and whether the user can see it.

Indirect prompt injection vs direct prompt injection
Question Indirect prompt injection Direct prompt injection
Who delivers the text? A third party, through content the model reads The person typing into the prompt
Can the user see it? Usually not, the text is hidden in the content Yes, the user wrote it
Where does it come from? Web pages, files, emails and tool results The chat box or the API call

Sources

Sources checked 17 November 2026

Examples

Indirect prompt injection examples

FAQ

Frequently asked questions

What is indirect prompt injection?

Indirect prompt injection is an attack where instructions are hidden in content an AI model reads, such as a web page, a file or an email. The model treats the hidden text as part of its task. The attacker never needs access to the model or to the user's prompt.

How is indirect prompt injection different from direct prompt injection?

In a direct attack, the person typing the prompt is the attacker. In an indirect attack, the user is innocent and the instruction arrives inside content the model was asked to read. Indirect attacks are harder to notice because the user usually never sees the text that changed the model's behaviour.

Why are AI agents exposed to indirect prompt injection?

Agents read content from many sources and then act with tools. A chatbot that reads a poisoned page can only write a wrong answer. An agent that reads the same page can run a command, open a file or send data, using the access of the employee who started it.

How do you reduce the risk of indirect prompt injection?

Use several layers. Mark outside content as untrusted, give agents the least access they need, and ask a person to approve high-risk actions. AgentHarness from AIBound enforces allow, ask or deny rules inside the agent, which limit what a hijacked agent can do on an employee's device.

Stop the risky AI your employees already run.

AIBound blocks the high-risk AI on every employee device, in real time. The 14-day trial needs no proof of concept.

Book a Demo