An attack on applications built on large language models, where crafted text in a prompt or in content the model reads, such as a document, web page or email, overrides the intended instructions. OWASP lists it as LLM01:2025. It becomes most dangerous when an agent can call tools, because the injected instruction can run actions using the agent's own legitimate credentials.
What Prompt Injection Means in Agentic Systems
Prompt injection is dangerous because the attacker is not trying to “break” the model in a traditional sense. Instead, they exploit the fact that the model treats input as instruction-like text, so hidden or malicious content inside a document, web page, email or other source can redirect the agent’s behaviour toward the attacker’s objective.
In an agentic workflow, that is more than a bad answer. The model may continue into tool use, data retrieval or task execution, which means a successful injection can become an action path rather than a simple content manipulation problem.
How Indirect Injection Works Across Inputs
Prompt injection can be direct, where the attacker places instructions in the user-visible prompt, or indirect, where the model reads adversarial text embedded in content it has been asked to process. The second form is especially important for agents because the attacker can seed the instruction in a location the user does not notice, such as a document body, a web page, a ticket, or an email thread.
The core failure is boundary confusion. The system is supposed to treat retrieved or observed content as data, but the model may follow it as if it were higher-priority instruction. That makes the attack hard to spot with ordinary content review alone, because the malicious instruction can be subtle, contextual, or only activated when the agent reaches a particular step.
Why Tool-Using Agents Make It More Severe
The primary risk jump happens when the model can call tools, act on behalf of a user, or access connected systems. At that point, a successful injection can turn into unauthorized search, data exposure, workflow manipulation, external requests, or other side effects executed under the agent’s legitimate authority.
This is why agentic prompt injection is often discussed alongside identity and privilege concerns. The injected instruction is not valuable because it “changes the text” alone, but because it can steer a tool-capable agent into doing something the user did not intend, while still appearing to operate normally from the platform’s point of view. NHI Management Group’s Agentic AI Security Guide frames that broader threat model across inputs, memory, tools, orchestration and identity.
That is also why separation of duties matters. A model that merely summarises untrusted content is exposed to a different risk profile than an agent that can browse, send messages, edit records or trigger downstream automation. The more authority the agent has, the more a successful injection can propagate into real-world impact.
Defensive Controls for Agentic Prompt Injection
Defence starts with treating all external or retrieved content as untrusted. The practical goal is not to “trust the model less” in the abstract, but to constrain what the model can do with instructions that arrive through content channels. That includes narrowing tool scope, limiting what actions require confirmation, and designing the system so that reading content is not the same as accepting its instructions.
Strong controls also include tracing and review. Logs need to show which source text the agent consumed, which tool calls followed, and whether a suspicious instruction influenced the action path. For teams building or operating agents, NHI Management Group’s AI Agent Observability, Audit and Incident Response Guide is useful because prompt injection is often only visible once you can attribute an unexpected action back to a specific prompt or content source.
For broader design and governance patterns, Zero Trust for AI Agents is a helpful companion reference because the same “verify before action” principle applies to each tool call and delegated step. External references such as the OWASP Agentic AI Top 10 and CSA MAESTRO agentic AI threat modeling framework both reinforce this model of prompt injection as a control-boundary problem, not just a content-safety problem.
Detection, Response and Recovery After Exposure
Prompt injection is often discovered indirectly, through strange tool usage, unexpected retrieval, unusual outbound requests, or behaviour that contradicts the user’s intent. Because the injected instruction may have already executed, post-event review should focus on what the agent accessed, what it changed, and whether the action was constrained by policy or simply by luck.
Recovery is usually less about “removing the bad text” and more about revoking any authority that was exercised during the incident, then checking for secondary effects. If the agent touched external systems, sent messages, created records or exposed data, those side effects need to be assessed and, where necessary, rolled back. The same guidance in the AI Agent Observability, Audit and Incident Response Guide applies here because incident handling depends on understanding the agent’s action trail, not just the malicious prompt text.
For deeper threat analysis, the MITRE ATLAS adversarial AI threat matrix and the OWASP Agentic AI Top 10 are both useful because they help teams map prompt injection to adjacent attack behaviours such as tool misuse, memory poisoning and agent hijacking.
Risk and Threat Considerations
Prompt injection becomes materially riskier when the agent can take actions, not just generate text. In that setting, a malicious instruction can abuse the agent’s trusted position to expose data, trigger workflows or manipulate downstream systems in ways the user did not authorise.
Failure mechanism: The model cannot reliably distinguish attacker-supplied instructions from legitimate task content, so it follows adversarial text that was embedded in an otherwise ordinary input source.
Impact: The agent may execute harmful tool calls or disclose information under legitimate credentials, creating a real compromise path rather than a simple answer-quality failure.
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 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI01 — Agent Goal Hijack | Prompt injection redirects agent goals through hostile instructions. |
| ASI02 — Tool Misuse | Injected text can steer an agent into unsafe or unauthorized tool actions. | |
| ASI03 — Identity & Privilege Abuse | Injected actions exploit the agent's legitimate authority and credentials. | |
| Recommendation — Constrain tool use so injected instructions cannot replace the agent's intended task. Require explicit policy checks before each high-impact tool call. Limit delegated privilege so compromised instructions cannot act with broad authority. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | Prompt injection is most harmful when the agent has excess action authority. |
| AU-6 — Audit Record Review, Analysis, and Reporting | Detection and attribution depend on reviewing agent actions and source context. | |
| Recommendation — Apply least privilege so agent actions are bounded to the minimum required access. Review logs for unusual source-to-action chains and alert on suspicious tool use. | ||
Practitioner Guidance
Why practitioners should care: Prompt injection should be treated as a design-time and runtime control problem, not just a red-teaming curiosity. If an agent can read external content and act on it, the team must decide which actions are allowed, which require confirmation, and which must never be delegated to the model alone.
What to watch for: Look for situations where the agent’s tool use, retrieval pattern or output changes after consuming untrusted content. That is often the first sign that the system has crossed from passive analysis into instruction following.
Practitioner takeaway: The safest agent designs assume that any content source can be hostile, and they make the action boundary stricter than the language boundary.
Related resources from NHI Mgmt Group
- What is the difference between prompt injection and excessive privilege in agentic AI?
- What is the difference between prompt injection and tool poisoning in agentic systems?
- How should security teams contain prompt injection in agentic systems?
- Why do agentic apps make prompt injection more dangerous than chatbots?
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