Society · Protocols

ConfusedDeputy

Guard against privilege confusion by binding authority checks to the upstream caller, not the executing deputy

Definition

Mechanism

An Agent that holds Permission on behalf of one principal is tricked by a less-privileged caller into exercising that authority for the caller's benefit. The classic 1988 Hardy framing: a privileged compiler asked to write debug output to a billing file ends up corrupting the billing file because access was checked against the compiler's identity, not the requesting user's. In LLM systems the same shape appears as prompt injection: an Actor with tool access is induced by adversarial input to invoke its tools on the attacker's behalf, because permission was bound to the agent process, not to the upstream request that motivated each tool call.

Preconditions

  1. An Agent holds Permission broader than at least one of its callers.
  2. An untrusted input path can influence which action the agent takes with that permission.

Postconditions

  1. Either the action is authorized against the caller's identity, or the action is refused.
  2. An audit trail records both the deputy and the requesting caller, not just the deputy.

Invariants

  1. Authority must be checked against the upstream requester's identity, not against the running process's identity.
  2. Forwarded calls must carry, or re-derive, the authority of the original caller — never the deputy's.

Risks

Failure modes

  1. Prompt injection

    untrusted input redirects an LLM Agent's tool use toward the attacker's goals.

  2. Capability leak

    a holder of Permission forwards or exposes that capability without re-checking the requester.

  3. Classic Unix setuid

    a setuid binary writes to a path supplied by a caller without checking the caller has rights to that path.

  4. RPC authority confusion

    a service-account RPC accepts a target argument from an untrusted client and acts on it with the service account's broad privileges.

Relationships

Builds on

References

Infrastructure

Actor

A capability-bearing entity

Mind

Agent

Autonomous Goal-Directed Entity

Nothing in this library builds on this pattern yet.

Reference

Identity

Ref
ConfusedDeputy#119a
Sema ID
sema:ConfusedDeputy#mh:SHA-256:119aeab272e329eef56459a0d0fa7bcf46aab9b07dab2b3cf947034a63a5116f
Ring
2
Tier
1
Updated
2026-11-11
Supersedes
  • sema:ConfusedDeputy#mh:SHA-256:31db289ffbcd442a10cddc5c1d3460132fd073a680d436e364684e89c37a39c2
  • sema:ConfusedDeputy#mh:SHA-256:6eb586b85aa5ebf88afbd6b1e77c365c87e5f5d7ee3098479518066de00b331a
  • sema:ConfusedDeputy#mh:SHA-256:c6c91849305a72c909564056bd6940139ca01f2f127f83818cc3e844dfc8a165
  • sema:ConfusedDeputy#mh:SHA-256:bddfd921448570d015aedc6112828de15d44e9ec662f009cf81b989e3d77c47c