AI GLOSSARY · SAFETY, ETHICS AND GOVERNANCE

Confused deputy (agents)

Markdown version · Wikidata Q5160310

Definition

A confused deputy is a program with legitimate authority that another party tricks into misusing it. With AI agents, an agent holding a user's or service's permissions is manipulated into performing actions the manipulator could not perform directly.

Also called: confused deputy, confused deputy problem, confused deputy attack, confused deputy AI agent, confused deputy prompt injection.

In plain language

A deputy is someone who carries a boss's authority. A confused deputy is one who is tricked into using that authority for a stranger. Picture an assistant with the office master key who lets in a caller because the caller's note looked official. An AI agent can be in the same position: it holds your access to email, files or code, and text it reads from a web page or message can steer it into acting. The weakness is confusing the caller’s authority with authority legitimately held by the deputy. Excessive access can increase the impact, but is not necessary for this confusion; scope authority and enforce authorization outside the model.

Technical definition

The confused deputy problem is described in Norman Hardy's 1988 paper in ACM SIGOPS Operating Systems Review as a program with more privilege being tricked by a program with less into misusing its authority; Wikipedia notes it is often cited as a reason for capability-based security. In agent systems, the deputy is the agent or tool server acting with a user's credentials. The Model Context Protocol security guidance applies the term to MCP proxy servers that use a static OAuth client ID, and requires per-client consent. OWASP's LLM06 entry on excessive agency recommends running actions in the user's context and enforcing authorization in downstream systems.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Guide · Illustrative, not executed

    Autonomous AI Agents: Risks and Guardrails

    What you see
    What goes wrong when an AI agent acts unattended, and the limits, approvals and stopping rules that contain it. It cites OWASP's causes of excessive agency: excessive functionality, permissions and autonomy.
    Why it exercises the concept
    A confused deputy misapplies its own authority for a caller; the authority can be legitimate rather than excessive. The guide’s least-privilege and approval measures can reduce impact, alongside caller-specific authorization.
  2. Skill by Skill Almanac · Illustrative, not executed

    coding-agent-guardrails 60/100 · grade CScored · Method v0.2 · How we score

    What you see
    A pre-action checklist for coding agents plus a read-only audit of a repo's guardrail setup.
    Why it exercises the concept
    Actual file, shell and credential access depends on the host’s permissions, sandbox and configured grants. This illustrative checklist can flag risky requests, but does not enforce those boundaries.
  3. Skill by Skill Almanac · Illustrative, not executed

    skill-safety-audit 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Scans a third-party agent skill folder and returns a JSON risk table with evidence lines before you install it.
    Why it exercises the concept
    An installed skill runs with the agent's authority. Auditing it first reduces the chance of lending that authority to untrusted instructions.
  4. Coding tool · Illustrative, not executed

    Claude Code

    What to try
    /permissions
    What you see
    Claude Code shows the permission rules that decide which tool calls it may make without asking.
    Why it exercises the concept
    Narrow permission rules limit how much authority a manipulated agent can spend.

How it shows up when you use agents

An agent acts with authority granted by its host. In a coding environment, actual file, shell and credential access depends on permissions, sandbox boundaries and configured grants; it is not automatically every resource available to the user. An MCP server may hold credentials for a ticket tracker or cloud account. When one of these is steered by text it should not trust, such as a web page, an issue comment or a tool result, it can spend that authority on someone else's goal. That is a confused deputy, and prompt injection is a common way to cause it.

The MCP security guidance gives a precise case: a proxy server that fronts a third-party API with one fixed client ID can let a malicious client obtain authorization codes without proper user consent. Its stated fix is per-client consent before forwarding to the third party.

OWASP's excessive-agency page names three root causes: excessive functionality, excessive permissions and excessive autonomy. Its mitigations include minimal permissions, human approval for high-impact actions and authorization enforced in downstream systems instead of by the model.

What breaks when this is misunderstood: people try to fix it with a better system prompt. A prompt is advice to the model, not an access control.

Next action: review what each agent and server can reach, remove what the task does not need, require approval for destructive steps, and read the guide on autonomous agent risks.

Common confusions

  • Confused deputy versus prompt injection. Prompt injection is a way to deliver hostile instructions. The confused deputy is the resulting misuse of authority. Injection can cause it, but so can a flawed OAuth flow with no model involved.
  • Confused deputy versus jailbreak. A jailbreak pushes a model past its own safety rules. A confused deputy abuses permissions the system granted.
  • Myth: a smarter model removes the problem. OWASP advises enforcing authorization downstream rather than relying on the model to decide.
  • Agent versus user privileges. An agent holding a broad shared identity can reach more than the user could. Running actions in the user's context, as OWASP suggests, narrows that.

More in Safety, ethics and governance

Next steps

  1. Autonomous AI Agents: Risks and Guardrails The long-form guide.
  2. coding-agent-guardrails A skill that exercises it.
  3. AI agent Related term.
  4. Model Context Protocol (MCP) Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft); OpenAI Codex (bounded factual repairs); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Corrected explicit MCP-server anchor; link-only verification does not assert complete content approval.
  • : Bounded source repairs: Distinguished caller/deputy authority confusion from excessive-permission impact; scoped actual host/sandbox/grant access and advisory checklist; added checked author-paper provenance. Pending independent re-review.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.