By NHI Mgmt Group Editorial TeamBased on WorkOS: “Securing agentic apps: How to contain AI agent prompt injection” (May 7, 2026)

TL;DR: Prompt injection in agentic systems is an action problem, not just an output problem: attackers can steer AI agents to query internal data, perform unauthorized actions, or propagate malicious instructions across other agents, and a January 2026 meta-analysis found adaptive attacks succeed against state-of-the-art defenses more than 85% of the time, according to WorkOS. The governing assumption has shifted from “can the model be tricked?” to “what can the agent do if it is tricked?”


At a glance

What this is: This is an analysis of how prompt injection changes in agentic systems, where the attack target is not just text generation but tool use, data access, and downstream actions.

Why it matters: It matters because identity scoping, tool policy, and execution controls now define whether a successful injection becomes a contained event or an operational incident across NHI and agentic AI programmes.


Context

Prompt injection becomes materially more dangerous when the target is an agent rather than a chatbot. In agentic systems, the same malicious instruction can turn into a database query, an email, a file write, or an API call, so the security question becomes what the agent is allowed to do, not just what it says.

That shifts the governance problem into identity and authorisation design. If scoped credentials, policy enforcement, and tool trust are weak, an injected instruction can move from context manipulation into real action across internal systems, code execution paths, and inter-agent communication.

The article treats this as a containment problem, not a model-quality problem. The core risk is typical for modern agent deployments that expose tools to untrusted or semi-trusted content sources.


Key questions

Q: What breaks when prompt injection reaches an agent framework instead of a chatbot?

A: When prompt injection reaches an agent framework, the problem is no longer limited to a bad answer. The injection can influence memory, planning, tool selection, and downstream actions, which turns content manipulation into control-flow abuse. That is why framework internals must be tested and protected as part of the security boundary.

Q: Why do indirect prompt injections create more risk than ordinary prompt errors?

A: Because the attack is embedded in content the agent is already expected to trust. The model can interpret a hidden instruction as part of the workflow and then act through legitimate permissions, which turns a text manipulation issue into a data, fraud, or compliance problem.

Q: What signs show that an agentic system is not containing prompt injection well enough?

A: Watch for tool calls that do not match the user's request, unusual read-then-send chains, unexpected destinations, destructive file operations, and sudden changes in tool volume or sequence. Those are behavioural indicators that the agent's action boundary is too wide or that a prompt has hijacked intent.

Q: How should teams govern agentic systems so one injected prompt does not spread?

A: Use least privilege for credentials, validate inter-agent messages, and require policy checks before any tool can pass instructions downstream. If multiple agents can relay hidden directives without authentication and inspection, a single injection can become a chain event rather than an isolated incident.


Technical breakdown

Why prompt injection becomes an action channel in agentic systems

A chatbot returns text, so prompt injection mainly affects output quality or safety. An agentic system can read, decide, and then invoke tools, which means a successful injection can translate into state-changing work. The important architectural difference is the presence of tool channels: search, email, file operations, code execution, and external APIs. Once an agent can call those tools, the attacker is no longer steering language alone, but workflow execution. That is why identity scope, invocation policy, and tool trust form the real security boundary. Practical implication: treat every tool the agent can reach as part of the attack surface, not as a separate integration.

Direct injection versus indirect injection

Direct injection happens when an attacker feeds malicious instructions straight into the agent, usually through a prompt field or chat interface. Indirect injection is more dangerous because the malicious instructions arrive inside content the agent is expected to trust, such as an email, document, webpage, calendar invite, or repository comment. The agent processes the content as data, but the embedded instructions can still alter behaviour. This is what makes zero-click attacks possible in agentic workflows. Practical implication: segregate trusted instructions from retrieved or user-supplied content, and assume any external content source can carry executable intent.

Practical implication: isolate untrusted content by source and enforce policy checks before that content can influence tool use.

How tool scope turns injected intent into real-world impact

The impact of prompt injection depends on the permissions behind the agent. If the agent can read mail but not send it, query tickets but not modify billing, or access files but not deploy code, then the injection's effect is constrained. If the agent holds broad credentials or can chain tools without validation, the same injected instruction can exfiltrate data, create malicious files, or trigger destructive actions. In multi-agent systems, compromised instructions can also propagate downstream through inter-agent messages. Practical implication: design least-privilege tool scope and authenticated inter-agent communication as containment controls, not as optional hardening.

Practical implication: scope every agent token to the smallest viable action set and validate any message passed to another agent.


Threat narrative

Attacker objective: The attacker wants the agent to perform actions or disclose data that the user never intended, while staying inside the agent's granted permissions.

  1. Entry occurs when a malicious instruction is delivered through direct prompt input or indirect content such as email, documents, web pages, or tool output. In the EchoLeak case, the attacker used a hidden instruction embedded in email content.
  2. Credentialed access is then abused when the agent processes the content with its legitimate permissions and calls tools it is authorised to use, such as enterprise search, file access, or code execution interfaces.
  3. Escalation follows when the injected instruction redirects the agent into exfiltration, destructive file operations, or inter-agent propagation, turning a single prompt event into broader system impact.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 150+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Agentic prompt injection is a control-plane problem, not a content-safety problem: the attack succeeds when language manipulation reaches tool invocation, not when the model merely says the wrong thing. That changes the governance unit from response text to permitted action scope. The practitioner conclusion is straightforward: security teams must measure what the agent can do after compromise, not only whether the model resists prompt abuse.

Identity scoping is the first containment boundary, but it only works if it is truly least privilege: a compromised agent can only cause bounded damage when its credentials, resource grants, and inter-agent permissions are narrow enough to matter. The article's examples show that broad tool access turns a single injection into multi-step abuse, which means least privilege must be defined at the tool and resource layer. The practitioner conclusion is to treat agent identity as an enforceable action boundary.

Indirect prompt injection exposes a trust assumption that was built for humans, not for autonomous execution: content systems assume the reader can distinguish data from instruction, yet agents process both as executable context. That assumption fails when emails, documents, and web pages can carry hidden operational directives. The implication is that content provenance, source tagging, and instruction/data separation must become part of the agent governance model.

Runtime policy matters because the attack often survives the first line of defence: prompt hardening can reduce easy wins, but the article's cited meta-analysis shows adaptive attacks still succeed at high rates. That means invocation policy, circuit breakers, and destructive-action approval gates are doing containment work, not prevention work. The practitioner conclusion is that governance should assume some injections will land and focus on limiting downstream consequence.

Prompt injection has created an identity blast radius concept that teams need to name explicitly: the real question is how far injected intent can travel across tools, credentials, and downstream agents before policy stops it. This aligns most closely with OWASP-AGENTIC ASI01 and ASI07 thinking, but the operational issue spans NHI scope, authorisation, and workflow trust. The practitioner conclusion is to define the blast radius before agents are allowed to act.

What this signals

Identity blast radius is the control question for agentic systems: the issue is not whether prompt injection exists, because it does. The issue is how far an injected instruction can travel across credentials, tools, and downstream agents before a policy boundary stops it.

Agentic governance has to assume partial compromise: prompt hardening helps, but it does not remove the need for scoped credentials, authenticated tool manifests, and approval gates for destructive operations. Security teams should design for containment first and prevention second.

Indirect prompt injection will keep surfacing in trusted content pipelines: any workflow that lets an agent consume email, documents, web pages, or repository comments is also exposing it to hidden instructions. The programme response is source-aware content handling, not blind trust in the input channel.


For practitioners

  • Scope agent credentials to tool-level least privilege Limit every agent token to the smallest usable set of actions and resources. Separate read, write, and destructive permissions so injected intent cannot move beyond the intended task boundary.
  • Separate trusted instructions from retrieved content Tag emails, documents, web pages, and tool output by source and treat external content as data first. Keep system instructions isolated from retrieved material so hidden directives have less chance of steering execution.
  • Validate every tool call before execution Use invocation policy to reject suspicious parameters, unexpected recipients, destructive file paths, and tool chains that do not match the user request. Add circuit breakers for high-volume or cross-domain operations.
  • Require human approval for destructive actions Block code writes, deletes, deployments, refunds, and other high-impact changes until a human approves the action. The approval gate should sit after generation and before execution.
  • Audit and baseline agent behaviour continuously Log every tool invocation, compare current behaviour to expected patterns, and investigate sudden shifts in tool sequence, destination, or volume. Use those signals to pause the agent before impact grows.

Key takeaways

  • Prompt injection in agentic systems is dangerous because it can become tool use, data access, or code execution, not just a corrupted response.
  • The article's central evidence is that adaptive attacks still succeed against many current defences, so containment matters more than model-only safety tuning.
  • Least privilege, invocation policy, and human approval are the controls that keep a successful injection from becoming a wider operational incident.

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 OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI01 — Agent Goal HijackPrompt injection is the core ASI01 threat pattern in this article.
ASI07 — Insecure Inter-Agent CommunicationThe article highlights injection propagation across agents and downstream messages.
ASI05 — Unexpected Code ExecutionThe article cites prompt injection leading to file creation and code execution.
Recommendation — Map prompt-injection scenarios to ASI01 and constrain the agent's reachable actions before execution. Authenticate and validate inter-agent messages before allowing one agent to influence another. Isolate code execution from production and require validation before any agent-generated code runs.
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIBroad agent permissions turn a successful injection into larger operational damage.
Recommendation — Reduce agent privilege to the minimum tool and resource set needed for the task.
NIST SP 800-53 Rev 5IA-9 — Identification and Authentication (Non-Organizational Users)Agent tools and services need authenticated machine-to-machine access controls.
Recommendation — Apply IA-9 to authenticate agent-to-tool and agent-to-agent access paths.

Key terms

  • Prompt Injection (Agentic): An attack where malicious instructions are embedded in content that an AI agent reads, causing the agent to execute unintended actions using its own legitimate credentials. A primary vector for agent goal hijacking and identity abuse.
  • Identity Blast Radius: The amount of damage a compromised identity can cause across systems, data, and infrastructure. In NHI environments, it is shaped by permissions, network reach, and administrative capability rather than by the credential alone. Reducing blast radius is a containment strategy that limits lateral movement and data exposure.
  • Indirect injection: A malicious instruction hidden inside data the AI system trusts, such as retrieved documents, tool output, or memory. The system later treats that data as guidance and follows the embedded command, which makes the payload dangerous because the harmful step happens after ingestion.
  • Invocation Policy: Invocation policy is the control layer that evaluates each tool call an agent tries to make. It checks whether the action, arguments, sequence, and destination fit the approved rules, helping prevent injected intent from becoming unbounded execution.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 5, 2026.
Updated on October 7, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org