What Is the Confused Deputy Problem
The confused deputy problem was formally defined by Norm Hardy in 1988 to describe a specific failure mode in privilege-separated systems: a program that holds more authority than the party requesting an action is manipulated into misusing that authority on the requester's behalf. The deputy is not compromised in the traditional sense. It executes exactly the operation it was built to perform, but does so based on an input it should not have trusted. This distinction matters. Confused deputy failures are authorization failures, not code-execution failures, and patching a software defect does not resolve them. The fix requires correcting how authority is delegated, scoped, and verified between a caller and the intermediary holding elevated privilege on that caller's behalf.
How Tool-Calling Agents Recreate the Pattern
AI agent architectures reproduce this structure at machine speed. An agent that executes tool calls, queries APIs, or invokes downstream services typically holds a single credential, API key, or service token that spans many unrelated requests. This is the ambient-authority pattern that made the original confused deputy problem possible: one broad grant of privilege used across many tasks, with no mechanism confirming that a given action was authorized for the specific caller making it.
Untrusted inputs compound the risk. A retrieved document, a tool response, or content returned by a third-party service can function as an indirect instruction to the agent. When the agent treats that content as sufficient basis for invoking a privileged tool, it becomes the deputy, correctly performing its function while extending authority to an input that was never entitled to it.
Governance and Audit Implications
Least-privilege enforcement for AI agents is an access-control governance requirement, not solely a matter of model behavior or prompt design. Organizations running multi-agent workflows should document which party, whether the end user, a service, or the agent itself, is accountable for authorizing each class of tool-call action. Third-party components and sub-agents introduced into a chain warrant the same permission-scoping review applied to any external API integration rather than default trust because they operate inside the agent framework.
Audit trails matter as much as prevention. Because confused deputy failures involve an authorized action executed on behalf of the wrong party, reconstructing after the fact which identity actually authorized a privileged action depends on logging that preserves the original requester's identity through every hop of a delegation chain.