Stockertim Dictionary · Artificial intelligence · Cybersecurity
Indirect prompt injection
Also called indirect injection
In short
Indirect prompt injection is an attack in which hidden instructions are planted in content an AI system reads, such as a web page, document or email.
- Advanced
- Attack or threat
- Checked
In detail
Indirect prompt injection targets AI tools that read material from outside. Instead of typing instructions into the assistant, an attacker hides them in content the assistant later processes: a web page it summarises, an email it triages, a shared document or a product review. The model cannot reliably tell the difference between the user's request and text that merely looks like an instruction.
The risk grows with what the tool can do. An assistant that only produces text for a person to read may give a misleading summary. One that can send messages, open links, search files or call other software could be steered into leaking data or taking an unwanted action. That is why the most damaging cases involve tools with broad access and no approval step.
Filtering incoming content helps but does not solve the problem, because instructions can be phrased in endless ways. Defence in depth works better: keep untrusted content clearly separated from instructions, give the tool the fewest permissions it needs, require a person to approve sensitive actions such as sending or paying, limit where outputs can go, and log activity so unusual behaviour is noticed.
At work, the practical habits are simple: treat anything an AI tool read from outside as untrusted, check summaries of external material against the source, and report odd behaviour.
Worked example
Lagoon Logistics reviews an AI assistant that summarises supplier emails, as a defensive design exercise.
- The team assumes any incoming email could contain text trying to redirect the assistant.
- It limits the assistant to reading and summarising, with no ability to send, forward or open links by itself.
- It labels external content in the assistant's input so staff and the system treat it as data, not instructions.
- It requires a person to approve any change to supplier bank details, whatever a summary says.
- It logs each summary and alerts on unusual requests, such as asking for other mailboxes.
Even if a planted instruction gets through, the assistant cannot act on it alone, and the attempt is visible in the logs.
In practice
Security teams list every source of external content an AI tool reads, restrict tool permissions, add human approval for sensitive actions and monitor logs. Staff are taught to treat AI summaries of outside material as unverified.
Watch out
- It is not the same as a jailbreak, where the user deliberately tries to break the rules; here the user is often the victim.
- No filter catches every case, so permissions and approvals matter more than detection alone.
Learn it properly
- Defending against prompt injection15 min lesson Free course: AI safety and security at work
- Prompt injection and other failure modes15 min lesson Free course: AI prompt engineering
- Connecting AI to tools and data: connectors and MCP explained15 min lesson Free course: Build AI automations and agents
Official sources
- Top 10 for large language model applications · OWASP Foundation
- Adversarial machine learning: a taxonomy and terminology of attacks and mitigations · National Institute of Standards and Technology
- AI and cyber security: what you need to know · National Cyber Security Centre
Facts last checked on 3 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.