The attack surface widens sharply because anyone who can write to that source can try to steer the agent once the text enters context. Public pages, open repositories, and customer-facing queues are especially risky because the attacker does not need direct access to the agent itself. Once the instruction is read, the model treats it like other context and may act on it.
Why This Matters for Security Teams
indirect prompt injection turns ordinary content channels into a control plane problem. If an AI agent can read public web pages, shared documents, issue threads, or inboxes that anyone can write to, then the attacker does not need a login to influence the agent. The risk is not just bad answers. It can include unsafe actions, data leakage, workflow manipulation, and unauthorized tool use once the injected text is treated as context. NIST’s NIST AI Risk Management Framework is useful here because it frames AI risk as a governance and lifecycle issue, not a single-model defect.
Security teams often miss the boundary shift: the source looks low trust, but the agent may grant it operational authority after retrieval or summarisation. That means traditional content moderation is not enough. The real question is whether the agent is allowed to read from that source, whether it can act on instructions found there, and whether outputs are checked before execution. In practice, many security teams encounter indirect prompt injection only after an external page, support ticket, or code comment has already influenced an automated action rather than through intentional testing.
How It Works in Practice
The attack usually follows a simple path. An attacker writes malicious instructions into a source that the agent is expected to ingest, such as a public post, a wiki page, a code review comment, or a customer queue. The agent retrieves that text, places it into context, and may misread the hostile instructions as task-relevant guidance. If the agent has tool access, the injected content can try to redirect searches, alter summaries, exfiltrate data, or trigger downstream actions.
What makes this dangerous is that the source does not need to be obviously malicious. It only needs to be reachable and accepted into the agent’s context window. Good controls usually focus on three layers:
- Source trust: limit which sources the agent can ingest, and treat open-write sources as hostile by default.
- Instruction separation: label retrieved text as untrusted content and keep it distinct from system and operator instructions.
- Action gating: require confirmation, policy checks, or human approval before the agent can use tools, send data, or change records.
Implementation also needs monitoring. Log which source was retrieved, what the agent decided, and which tool calls followed. That makes it possible to trace whether an output came from the user request, the model’s own reasoning, or an injected instruction embedded in external content. Frameworks such as the OWASP Agentic AI Top 10 and the MITRE ATLAS adversarial AI threat matrix are helpful for mapping these attack paths to concrete controls.
These controls tend to break down when the agent is allowed to browse broad, user-generated content at scale because retrieval quality, instruction hierarchy, and tool permissions all become difficult to enforce consistently.
Common Variations and Edge Cases
Tighter source controls often increase operational friction, requiring organisations to balance automation coverage against trust boundaries. That tradeoff becomes sharper when the business depends on open channels such as public forums, shared knowledge bases, or unmoderated ticket intake. Current guidance suggests that no universal standard exists for deciding which external text is safe to treat as advisory, so teams need policy rather than intuition.
One important edge case is retrieval-augmented generation. If the agent summarizes a document before acting, the injected instruction may survive even after the original text is shortened, making the compromise harder to spot. Another is agent chaining, where one agent produces output that becomes input to another. In that setup, a single poisoned source can cascade across multiple workflows. The CSA MAESTRO agentic AI threat modeling framework is useful for reasoning about those chained trust decisions.
For high-impact use cases, the safest pattern is to separate read, reason, and act stages, then apply policy checks before any external side effect. Where the source is public, user-editable, or continuously changing, treat it as an adversarial input surface and assume prompt injection attempts will be present.
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, MITRE ATLAS and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | GOVERN | Indirect prompt injection is a governance and lifecycle risk, not only a model issue. |
| OWASP Agentic AI Top 10 | Prompt Injection | This attack directly matches agent prompt injection through untrusted content. |
| MITRE ATLAS | T0016 | Adversarial input manipulation maps to prompt-based attack techniques against AI systems. |
| NIST AI 600-1 | SA-4 | GenAI profiles emphasise safe handling of external content before model use. |
| CSA MAESTRO | TR-2 | Agentic workflows need trust boundary modelling across read, reason, and act stages. |
Assign owners, define trusted inputs, and require review gates for AI actions driven by external text.
Related resources from NHI Mgmt Group
- What happens when prompt injection is used against an AI assistant connected through MCP?
- How should security teams reduce indirect prompt injection risk in AI systems?
- How should security teams prevent prompt injection in AI agent workflows?
- What breaks when prompt injection reaches a tool-using AI agent?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org