Indirection prompt injection is a prompt injection attack that uses a separate source of text, such as a retrieved document, web page or tool output, to smuggle malicious instructions into an AI system. The model then follows the embedded instructions instead of the user's intent, which can change outputs, disclose data or trigger unsafe tool use.
What Indirection Prompt Injection Means in Practice
Indirection prompt injection is dangerous because the malicious instruction does not have to arrive in the user’s prompt. It can be hidden inside retrieved content, page text, tool output, or another indirect source that the AI system trusts enough to process.
That makes the attack harder to spot during normal review. The injected text can appear legitimate to the model while still changing the system’s behaviour, such as altering an answer, steering a tool call, or exposing data that should have stayed inside the original task boundary.
For a broader reference on this attack class and its defences, see the Prompt Injection Guide.
How the Attack Path Works
The core mechanism is instruction smuggling through indirect content. A retrieval pipeline, browser, connector, or plugin delivers text to the model, and the model treats part of that text as higher-priority instruction instead of untrusted input.
This is especially risky when the AI system merges user queries with retrieved documents or tool output in a single context window. If the model cannot reliably separate provenance, relevance, and authority, a malicious string can compete with, override, or redirect the intended user request.
The same pattern can appear across search results, knowledge bases, tickets, emails, webpages, markdown files, logs, and other content sources. The danger comes from trust transitivity, where content that should only inform the answer is allowed to influence the agent’s actions.
For agentic systems that combine retrieval with tools and delegated actions, the Agentic AI Security Guide explains why prompt injection becomes more severe once the model can act beyond text generation.
Why Indirection Is Hard to Defend Against
Indirection prompt injection exploits the fact that many AI systems are designed to be helpful, flexible, and context-sensitive. That same flexibility makes it difficult to know which parts of the context are safe to obey and which parts are adversarial.
The problem becomes more complex when the injected content arrives through ordinary business workflows, such as retrieval-augmented generation, support tooling, or administrative assistants. The attacker does not need direct access to the system prompt if they can influence a source that the model reads later.
Modern agent and assistant designs also expand the blast radius. If the model can search, summarise, write, send, or execute, then a successful injection can move from bad output to unsafe action, which is why OWASP LLM Top 10 LLM01 Prompt Injection Guide is relevant to any team evaluating layered defences.
Security Consequences and What Good Defences Try to Preserve
The main consequences are integrity loss and, in some cases, confidentiality loss. The system may follow the attacker’s embedded instruction, produce manipulated content, reveal sensitive context, or invoke tools in a way the user never intended.
A robust design tries to preserve instruction hierarchy, limit what retrieved text can influence, and reduce the authority of any single content source. It also treats retrieved or tool-sourced text as data first, not as trusted commands, even when the source appears benign or internal.
Defenders should also assume that the first visible symptom may be a subtle change in behaviour rather than an obvious crash. A model that seems merely “off” may already be following hostile instructions embedded in a downstream source.
Risk and Threat Considerations
Indirection prompt injection creates a realistic path from untrusted content to unsafe model behaviour, especially in systems that retrieve external text or consume tool output automatically. The risk is not limited to bad answers, because the same mechanism can lead to data disclosure, tool misuse, or policy bypass once the model treats injected instructions as authoritative.
Failure mechanism: The model fails to preserve a hard boundary between content it should read and instructions it should obey, so attacker-controlled text gains influence through retrieval, summarisation, or tool mediation.
Impact: Organisations can see corrupted outputs, inadvertent exposure of context or secrets, and unsafe downstream actions that look like normal model behaviour until the misuse is investigated.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATLAS address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Indirection prompt injection can redirect agent authority and actions. |
| ASI02 — Tool Misuse | The attack often causes the model to misuse tools based on hidden instructions. | |
| ASI01 — Agent Goal Hijack | Indirect instructions can hijack the agent’s intended objective. | |
| Recommendation — Constrain agent privileges so injected instructions cannot escalate access or trigger unsafe actions. Gate tool calls so retrieved text cannot directly steer sensitive tool use. Detect and block attempts to redirect the agent away from the user’s task. | ||
| NIST AI RMF | GOVERN | AI governance should address prompt-injection risk in deployed AI systems. |
| Recommendation — Assign ownership for prompt-injection controls and review them as part of AI governance. | ||
| MITRE ATLAS | Adversarial Machine Learning Techniques | Prompt injection is an adversarial technique against AI systems and their context handling. |
| Recommendation — Map observed attacks to ATLAS techniques and use that mapping in red-team detection. | ||
Practitioner Guidance
What to watch for: Treat any AI workflow that reads documents, webpages, emails, tickets, logs, or tool output as an instruction-filtering problem, not just a content-generation problem. The governance question is whether the system can reliably separate untrusted text from permitted control signals.
Practitioner takeaway: If a source can influence the model’s behaviour, it needs a trust boundary, a validation path, and a clear rule for what the model is allowed to do with that content.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org