The confused deputy is a class of security flaw in which a component that holds authority performs an action for a caller without verifying that the caller is entitled to it. The deputy is confused about who it is acting for, and so lends its own privilege to whoever asks.
Why it matters
Agents are natural deputies. An agent holds credentials, calls tools and APIs, and acts on behalf of a principal — often across trust boundaries, and often without a human watching. If the agent does not check who asked for an action, any party able to send it a request can borrow its authority. The confused deputy is therefore one of the defining failure modes of agentic systems, not a historical curiosity.
The original formulation
Norm Hardy described the problem in 1988, in The Confused Deputy (or why capabilities might have been invented), using the example of a compiler that wrote its billing file using its own privilege: a user could manipulate the compiler into overwriting a file it was never authorised to touch. Hardy’s point was that ambient authority — a component acting with its own broad rights — creates exactly this hazard, and that capability-based design avoids it by passing explicit, unforgeable rights with each request.
The flaw is catalogued today as CWE-441, Unintended Proxy or Intermediary (‘Confused Deputy’), and appears in OWASP’s attack taxonomy.
How it appears with agents
In an agentic flow the deputy is typically the agent or an MCP-style tool server that holds privileged access. Common shapes:
- A tool server that uses its own service credential to reach a resource, without propagating the requesting user’s identity.
- An agent that accepts a task from an untrusted caller and executes it with the authority it holds for a different principal.
- A delegation that collapses the principal and the agent into one credential, so the resource cannot tell who is really asking.
OWASP’s Top 10 for Agentic Applications names identity and privilege abuse, with the confused deputy among the identified failure modes.
The defence
Two controls cut against it. First, identity propagation: carry both the principal and the acting agent through to the resource, rather than letting the agent act anonymously with its own credential — the principle behind delegation and delegation chains. Second, per-action authorisation: check the caller’s authority at each action against a scoped credential, not once at the edge. Least authority limits the blast radius even when a check is missed. See How to verify an agent and What is Know Your Agent?.
Related terms
Sources
- N. Hardy, The Confused Deputy (or why capabilities might have been invented), ACM SIGOPS Operating Systems Review 22(4), 1988 (Accessed 2026-10-08)
- MITRE, CWE-441: Unintended Proxy or Intermediary (‘Confused Deputy’) (Accessed 2026-10-08)
- OWASP, Cornucopia: confused-deputy-attack (Accessed 2026-10-08)
- OWASP, Top 10 for Agentic Applications (2026) (Accessed 2026-10-08)
Know Your Agent (KYA) explains agent identity, verification and accountability. This is an explainer, not legal or compliance advice — see our Sources & methodology. New to KYA? Start with What is Know Your Agent? and the glossary.