By NHI Mgmt Group Editorial TeamDomain: Agentic AI & NHIsSource: Bishop FoxPublished May 8, 2026

TL;DR: AI agents can be tricked into executing attacker-controlled instructions from tickets, email, or calendar invites using their own privileges, with EchoLeak, ConfusedPilot, and Copilot incidents showing how the pattern scales across enterprise workflows, according to Bishop Fox. The core failure is not broken authorization but a broken trust boundary between data and instructions, so governance must assume untrusted input can steer privileged action.


At a glance

What this is: This is an analysis of confused deputy attacks against AI agents, where attacker-controlled content steers an agent into using legitimate privileges for malicious actions.

Why it matters: It matters because identity teams must govern not only who can access tools, but what content can influence privileged execution across agentic, NHI, and human-facing workflows.

By the numbers:

👉 Read Bishop Fox's analysis of confused deputy attacks in AI agents


Context

Confused deputy is an identity and authorisation failure mode, not a simple application bug. In agentic systems, the problem appears when a software agent reads attacker-controlled content and treats it as instructions, then acts with the privileges of the user or workload that invoked it. That creates an access problem for AI agent governance, not just a prompt-safety problem.

For IAM and NHI programmes, the central issue is trust boundaries. Ticket comments, email bodies, calendar invites, and MCP-connected tools can all become instruction channels if the agent cannot reliably separate content from command. Once that boundary collapses, the audit trail still looks legitimate while the decision path is compromised.

The article's examples are typical of the emerging pattern rather than one-off edge cases. The same mechanism can apply anywhere an agent has tool access, broad read scope, and enough write or export capability to turn untrusted input into privileged action.


Key questions

Q: How should security teams prevent AI agents from acting on malicious input?

A: Security teams should treat every external prompt, email, ticket, or chat message as untrusted input until it is validated against policy. The strongest control is runtime enforcement at the point of tool invocation, where the system can block risky actions before they reach CRM, email, or other sensitive tools.

Q: Why do confused deputy attacks matter for IAM and NHI governance?

A: They show that valid credentials are not enough if the system cannot tell trusted intent from malicious instruction. IAM teams must govern not only the account or token, but also the paths by which external content can steer privileged action. That expands governance from access control to instruction provenance.

Q: What do teams get wrong about least privilege for AI agents?

A: They often stop at permission scope and ignore behavioural scope. An agent can have narrow access and still be risky if it can independently select targets, chain tool calls, and trigger irreversible actions. Least privilege is necessary, but it does not describe the agent's freedom to act.

Q: Who is accountable when an AI agent exfiltrates data after being manipulated by attacker content?

A: Accountability usually spans the team that granted the agent its privileges, the owners of the connected tools, and the programme that failed to constrain instruction channels. The user attribution in logs may be misleading, so governance must assign responsibility based on how the agent was authorised and what trust boundaries were missing.


Technical breakdown

How confused deputy attacks hijack agent tool access

A confused deputy attack happens when a trusted system performs an action on behalf of a user but cannot distinguish the user's intent from attacker-supplied instructions embedded in content. In AI agents, the danger rises because the model can parse natural language, accept multimodal inputs, and decide which tool to invoke next. If the agent is allowed to follow instructions from tickets, emails, or calendar events without strong instruction provenance checks, attacker content becomes an execution trigger. The agent is not necessarily compromised in the classic sense. It is functioning as designed while applying valid privileges to an untrusted directive.

Practical implication: Restrict which content sources can influence tool execution and require explicit provenance separation between data and instructions.

MCP access expands the trust boundary beyond the model

The article notes that direct MCP communication can bypass the AI layer entirely. That matters because MCP is a tool and data access layer, not a security boundary by itself. If an attacker can reach the server or influence a connected workflow, they may issue privileged actions without needing to manipulate the model at all. In practice, the risk is not only prompt injection but also command execution through exposed integrations, overbroad tool registration, or weak per-task authorisation. Once the protocol layer trusts the caller too broadly, the agent becomes only one path to misuse.

Practical implication: Treat MCP-connected tools as privileged interfaces and apply caller authentication, per-task scoping, and destination restrictions.

Why least privilege must be per task, not per agent

Confused deputy mitigation fails when an agent receives more tools than a single task requires. A better model is to scope registrations and permissions to the narrowest workflow, then separate read-only actions from write or destructive operations. Human-in-the-loop approval still matters for high-risk actions, but it is not enough if the agent can already assemble the attack chain from permitted tools. The architectural lesson is that privilege is not just about access level. It is also about which inputs can reach which action paths and whether those paths are constrained by task context.

Practical implication: Separate tool sets by task realm and remove write or exfiltration capability from agents that only need to read.


Threat narrative

Attacker objective: The attacker wants to turn a trusted agent into an unknowing proxy that exposes data or performs actions under legitimate user attribution.

  1. Entry occurs when the attacker places malicious instructions into a ticket comment, email, calendar invite, or other content that the agent is authorised to read.
  2. Escalation follows when the agent interprets the attacker-controlled content as instructions and uses its own legitimate privileges to access private data or create actions on the user's behalf.
  3. Impact is achieved when confidential data is exposed, deceptive activity is created, or the agent is coerced into exfiltrating results through approved channels.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Confused deputy is an authorisation failure caused by poisoned instruction channels. The key break is not that the agent lacked permission, but that permission was exercised against attacker-controlled input. That changes the governance problem from access issuance to instruction provenance, which traditional IAM design does not model well. Practitioners should treat content channels as part of the identity perimeter.

Least privilege is incomplete unless it is paired with action-context isolation. An agent with read-only intent can still become dangerous if the same trust domain gives it write, export, or messaging capability. The article's case studies show that the risky behaviour emerges after the agent has already been authorised, which means entitlement review alone is insufficient. The practical conclusion is that task scope must be bounded as tightly as privilege scope.

MCP widens the blast radius when tool registration is broader than the task. Direct protocol access allows abuse even when the model layer is not the primary weakness, so security teams must govern the tool plane as a privileged surface. This is a classic NHI lesson applied to agentic systems: the control point is not just the model, but every credentialed path that can move data or trigger action.

Agentic identity governance needs a separate trust model for instructions, not just credentials. The same account can be safe in one context and unsafe in another if it can be steered by external content. That means the field must move beyond static permission sets and classify which inputs are allowed to influence which actions. The practitioner takeaway is clear: trust boundaries must be enforced at the content, tool, and workflow layers together.

Instruction provenance is the named concept security teams should adopt. In confused deputy scenarios, the decisive question is not who authenticated, but where the instruction originated and whether the agent is allowed to act on it. Without provenance controls, valid credentials can be redirected into attacker-chosen outcomes. Teams should use this concept to reframe agent governance reviews around source trust, not just login trust.

From our research:

  • NHIs now outnumber human identities by 144:1 in enterprise environments, a 44% increase year-over-year driven by AI agents, CI/CD automation, and third-party integrations, according to The NHI and Secrets Risk Report.
  • Nearly half of all exposed secrets reside outside code repositories, in CI/CD logs, collaboration tools, and messaging platforms.
  • Forward-looking governance needs to treat 52 NHI Breaches Analysis as the breach-pattern reference point for identity sprawl and secret exposure.

What this signals

Instruction provenance is becoming a governance requirement, not a research curiosity. When AI agents can turn calendar invites, emails, and ticket comments into privileged execution, the control problem shifts from authentication to source trust, and that shift aligns closely with the access-sprawl patterns documented in The NHI and Secrets Risk Report.

Security teams should expect their agent controls to fail first at the workflow layer, then at the tool layer. If a system can read attacker-controlled content and reach MCP-connected actions, the programme needs a separate review for content influence, task scoping, and egress constraints before broader rollout.

The practical signal is simple: if a privileged action can be triggered by untrusted text, your identity model is missing a boundary. That boundary will matter as much for agentic AI as it already does for other non-human identities, especially where breach case studies show how fast exposed trust becomes enterprise impact.


For practitioners

  • Separate data channels from instruction channels Classify ticket text, email bodies, calendar content, and other untrusted inputs as data only unless they pass explicit provenance checks. Do not let those inputs directly shape privileged tool calls or action selection.
  • Scope tools to individual task realms Register only the tools needed for a single workflow and keep read, write, and destructive operations in separate permission sets. Avoid giving one agent a universal tool catalogue across unrelated tasks.
  • Require human approval for irreversible actions Place approval gates before data export, external messaging, account changes, or any action that could create a durable side effect. Approval should happen after the agent has proposed the action, not before untrusted input is interpreted.
  • Constrain egress destinations for agent outputs Allow agents to send results only to approved destinations and block arbitrary outbound delivery paths. This limits the ability of a poisoned workflow to exfiltrate data through the channels the agent can already reach.

Key takeaways

  • Confused deputy attacks exploit valid privileges by corrupting the instruction source, which makes them an identity governance problem as much as an AI safety problem.
  • The article's incident examples show that attacker-controlled content can trigger enterprise-scale data exposure when agents are allowed to act on untrusted inputs.
  • The strongest control pattern is layered: isolate instructions from data, scope tools by task, and gate irreversible actions before the agent can complete the workflow.

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 CSF 2.0, NIST SP 800-53 Rev 5 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10Agent instruction hijacking and tool misuse are central to this confused deputy pattern.
OWASP Non-Human Identity Top 10NHI-01The attack abuses non-human privileges and credentialed tool access.
NIST CSF 2.0PR.AC-4Least-privilege access and access restrictions are directly implicated by the attack path.
NIST SP 800-53 Rev 5AC-6Least privilege is the core control family affected by overbroad agent authority.
NIST Zero Trust (SP 800-207)Zero Trust principles support continuous verification of content and action paths.

Audit non-human identities that can be steered by untrusted content and reduce their effective blast radius.


Key terms

  • Confused Deputy: A confused deputy is a privileged system that is tricked into performing an action on behalf of an untrusted requester. In agentic AI, the agent may misread malicious input as legitimate intent and then use its own authority to act, which turns a logic problem into a security incident.
  • Identity Provenance: Identity provenance is the record of how an agent was created, what authority it received, and what actions it performed over time. It turns agent activity into an auditable chain of trust that supports compliance, incident response, and post-event accountability.
  • Task Realm: A task realm is the narrow operational scope within which an agent is allowed to act, including the specific tools, data sources, and output destinations needed for one workflow. Keeping task realms small reduces the chance that a poisoned input can trigger unrelated privileged behaviour.

What's in the full article

Bishop Fox's full blog covers the operational detail this post intentionally leaves for the source:

  • A walk-through of the otto-support CTF exploitation path, including reconnaissance, IDOR abuse, and privilege escalation into support-agent access
  • A deeper look at the multi-turn and multi-session behaviours that made the confused deputy scenario exploitable
  • Specific mitigation layering, including per-task tool registration, read versus write separation, and approved-destination egress controls
  • The case-study breakdowns behind EchoLeak, ConfusedPilot, and the Copilot calendar incidents

👉 Bishop Fox's full post covers the case studies, exploitation path, and layered mitigations in more detail.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an identity security programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 11, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org