{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"slug":"what-is-confused-deputy","title":"What Is a Confused Deputy","body":"<!-- hierarchy:nav -->\n> **Path:** [OIP](https://miscsubjects.com/a/oip) › [Thinker Reference](https://miscsubjects.com/a/oip-thinker-reference) › [Protocol Concepts](https://miscsubjects.com/a/oip-protocol-concepts) › **What Is a Confused Deputy**\n>\n> **Shelf:** Protocol Concepts · **Traversal:** self-explaining · hierarchical · voxel-ready\n> **Machine root:** [OIP tree](https://miscsubjects.com/api/dispatch?map=1&format=markdown) · [Registry](https://miscsubjects.com/api/dispatch?registry=1)\n\n# What Is a Confused Deputy\n\n## §SELF — what-is-confused-deputy\n\n**What this page is:** A definition of a specific security flaw where a program misuses its authority on behalf of a requester.\n**What it explains:** The confused deputy problem, how it works, why it is dangerous, and how capability-based security prevents it.\n**Why read it:** To understand why giving a program more authority than it needs creates a security hole, and how scoped tokens eliminate that hole.\n\n### What a Confused Deputy Is\n\nA confused deputy is a security flaw. It occurs when a program (the \"deputy\") holds authority to perform actions that a requester cannot perform directly, and the deputy uses that authority to perform an action on the requester's behalf without verifying whether the requester is allowed to request that action. The deputy is \"confused\" about whose authority it is exercising — its own, or the requester's.\n\nButler Lampson named this problem in 1971. The classic example: a compiler runs with system-level privileges (it can write files to any directory). A user asks the compiler to write its compiled output to a protected system file. The compiler, because it has system privileges, overwrites the protected file. The compiler is the confused deputy. It had authority. It used that authority on behalf of a user who should not have had that authority. The compiler did not check.\n\n### Why It Matters\n\nAny system where one component acts on behalf of another is vulnerable. Web servers handle requests for users. APIs call other APIs. AI models invoke tools on behalf of users. In every case, if the deputy component has broader authority than any single request should use, a malicious or mistaken request can exploit that excess authority. The damage ranges from data corruption to unauthorized access to system compromise. The confused deputy problem is one of the most common and least understood security flaws in multi-component systems.\n\n### The Key Idea\n\nThe problem is not that the deputy has authority. The problem is that the deputy has *more* authority than the specific task requires. When a deputy holds blanket authority, it cannot distinguish between legitimate requests and illegitimate ones — it lacks the information to do so. The solution is to give the deputy only the specific authority it needs for each task, and no more.\n\nTwo approaches exist:\n\n1. **Capability security.** The deputy receives a capability (an unforgeable token) that grants access to only the specific resource needed — for example, a write handle to one directory, not to all files. The deputy cannot be confused because it does not possess excess authority. It physically cannot access resources outside its capability's scope.\n\n2. **Permission checks.** The deputy checks whether the requester has permission before acting. This works but creates coupling: the deputy must know the access control policy, must be updated when the policy changes, and must implement the check correctly every time. Missing one check creates a vulnerability.\n\n### What the Capability Approach Got Right\n\n- **Eliminates the problem by construction.** If the deputy only holds a capability for the output directory, it cannot write to a protected system file. The attack is structurally impossible, not merely checked against.\n- **No policy knowledge required.** The deputy does not need to know who the user is, what their permissions are, or what the access control policy says. It simply uses the capability it was given. This decouples the deputy from the authorization system.\n- **Scopes are auditable.** A capability lists exactly what authority it conveys. You can inspect it. You know the maximum damage it enables.\n\n### What the Permission-Check Approach Got Wrong\n\n- **Every check is a potential bug.** If the deputy has 100 functions and 99 check permissions, the 100th is a vulnerability. This is how real systems get compromised: a developer forgets one check.\n- **Policy coupling.** The deputy must be updated whenever the access control policy changes. This creates maintenance burden and version skew.\n- **Confused deputy can still occur inside the check.** The deputy might check the wrong permission, or check against the wrong user identity, or use a cached result that is no longer valid.\n\n### How It Connects to Other Ideas\n\n- **OIP capability tokens.** OIP uses scoped tokens as capabilities. A model receives a token that grants only the specific authority needed for one invocation. The token cannot be reused for a different scope. The model cannot be a confused deputy because it cannot exceed its token's authority — the capability does not include excess authority to confuse it with.\n- **Principle of least privilege.** Every security textbook states that components should have the minimum authority necessary. Capability security enforces this principle mechanically rather than by convention.\n- **OAuth and scoped tokens.** Modern authorization protocols (OAuth 2.0) use scoped tokens that limit what a client application can do. These are capabilities in practice, even if not named as such.\n\n### Sources\n\n- Lampson, Butler W. \"Protection.\" Proceedings of the 5th Princeton Conference on Information Sciences and Systems (1971) — the original identification of the confused deputy problem\n- Hardy, Norman. \"The Confused Deputy.\" ACM Operating Systems Review 22(4) (1988) — the clearest explanation of the compiler example and capability-based solutions\n\n---\n\n## Up the tree\n\n- [OIP root](https://miscsubjects.com/a/oip) — protocol root, zero-context entry\n- [Thinker Reference hub](https://miscsubjects.com/a/oip-thinker-reference) — full hierarchy map\n- [Protocol Concepts shelf](https://miscsubjects.com/a/oip-protocol-concepts) — siblings on this shelf\n- [Voxel graph article](https://miscsubjects.com/a/what-is-voxel-graph) — how pages link as voxels\n- [Self-describing protocol](https://miscsubjects.com/a/what-is-self-describing-protocol)\n\n## Related on this shelf\n\n- [What Is Autopoiesis](https://miscsubjects.com/a/what-is-autopoiesis)\n- [What Is Capability-Based Security](https://miscsubjects.com/a/what-is-capability-security)\n- [What Is a Capability Token](https://miscsubjects.com/a/what-is-capability-token)\n- [What Is Context as Cursor](https://miscsubjects.com/a/what-is-context-as-cursor)\n- [What Is a Convergence Catalogue](https://miscsubjects.com/a/what-is-convergence-catalogue)\n- [What Is a Falsification Surface](https://miscsubjects.com/a/what-is-falsification-surface)\n- [What Is HATEOAS](https://miscsubjects.com/a/what-is-hateoas)\n- [What Is the History of Link Protocols](https://miscsubjects.com/a/what-is-link-protocol-history)\n\n## Machine surfaces\n\n- Public page: `https://miscsubjects.com/a/what-is-confused-deputy`\n- JSON article: `https://miscsubjects.com/api/articles/what-is-confused-deputy`\n- OIP ask: `https://miscsubjects.com/api/dispatch?ask=What%20Is%20a%20Confused%20Deputy`\n","hero":null,"images":[],"style":{},"tags":["oip","kimi-import","self-explaining","voxel","concepts","what-is-confused-deputy"],"category":null,"model":"kimi-agent-import","ledger":{"href":"/api/articles/what-is-confused-deputy/ledger","live":true},"embeds":[],"widgets":[{"type":"note","title":"Zero-context","text":"This page is self-explaining: §SELF states what it is, what it explains, and why to read it."},{"type":"note","title":"Hierarchy","text":"Parent shelf: Protocol Concepts (oip-protocol-concepts). Hub: oip-thinker-reference. Root: /a/oip."},{"type":"note","title":"Voxel","text":"Each article is a node. Links Up the tree + Related form the traversable graph."},{"type":"stat","value":20,"label":"Protocol Concepts on shelf"}],"home":true,"claims":[],"sources":[],"reviews":[],"extra":{},"has_traversal":false,"register":"standard","status":"published","revisions":0,"contributions":[],"provenance":[{"ts":"2026-07-15T04:20:53.173Z","model":"kimi-agent-import","action":"write","prompt":"","input":"","response":"","tokens_in":0,"tokens_out":0,"cost":0,"prev":"genesis","hash":"b06392a2f0f4069e95550c40064782aa0cd7e21fd673375a46a1b3df2d63b5a4"},{"ts":"2026-07-17T02:43:37.094Z","model":"owner","action":"voxel_divide","prompt":"","input":"what-is-confused-deputy","response":"30 DIVs from body (verbatim, roundtrip-checked)","tokens_in":0,"tokens_out":0,"cost":0,"prev":"b06392a2f0f4069e95550c40064782aa0cd7e21fd673375a46a1b3df2d63b5a4","hash":"aa6fd7002635ea8c3f58683d50da305663a9957c1bf0364499be428b91ab9d2c"}],"energy":{"passes":2,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{"kimi-agent-import":1,"owner":1},"head":"aa6fd7002635ea8c3f58683d50da305663a9957c1bf0364499be428b91ab9d2c"},"posted_at":"2026-07-15T04:20:53.173Z","created_at":"2026-07-15T04:20:53.173Z","updated_at":"2026-07-17T02:43:37.094Z","machine":{"shape":"article.machine/v1","slug":"what-is-confused-deputy","kind":"article","read":{"human":"https://miscsubjects.com/a/what-is-confused-deputy","json":"https://miscsubjects.com/api/articles/what-is-confused-deputy","bundle":"https://miscsubjects.com/api/articles/what-is-confused-deputy/bundle?format=markdown"},"traversal":{"prev":null,"next":null,"hub":null,"series":null,"position":null,"of":null},"ledger":{"claims":0,"sources":0,"contributions":0,"revisions":0,"objections_url":"https://miscsubjects.com/api/articles/what-is-confused-deputy/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=what-is-confused-deputy","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":null},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"what-is-confused-deputy\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"what-is-confused-deputy\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/what-is-confused-deputy/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"what-is-confused-deputy\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/what-is-confused-deputy | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/what-is-confused-deputy","json":"/api/articles/what-is-confused-deputy","markdown":"/api/articles/what-is-confused-deputy/bundle?format=markdown","skill":"/api/articles/what-is-confused-deputy/skill","topology":"/api/articles/what-is-confused-deputy/topology","versions":"/api/articles/what-is-confused-deputy/revisions","invocations":"/api/articles/what-is-confused-deputy/invocations"},"editorial_review":null,"editorial_audit":{"slug":"what-is-confused-deputy","ok":false,"issues":[{"code":"heading_filing_label","message":"section heading “Why It Matters” is a filing label that gives a cold reader no claim","replacement":"Replace “Why It Matters” with the concrete claim, event, or object introduced in that section."},{"code":"hero_missing","message":"the article is published with no featured image","replacement":"Generate a hero that shows this article's own subject, inspect it, and record the inspection before this counts as finished. An article with no image is not finished."}]},"body_hash":"773bc68a738f6b3d97f6ccf19d728736afa6d41d5e166000387e0f53132706d1","object":{"object_type":"article-object","identity":{"id":"article:what-is-confused-deputy","slug":"what-is-confused-deputy","title":"What Is a Confused Deputy"},"law":{"id":"law:article-object","statement":"Every article is an ontological object with typed human, model, directory, API, source, relationship, conformance, failure, and receipt expressions.","invariants":["one stable identity across every expression","human article and model Skill use audience-specific language","directory contracts are live definitions, not copied prose","official documentation is a source relationship, not an accidental exit","successes and failures amend the object's conformance knowledge","every optional machine layer is collapsed on the human surface"]},"expressions":{"human":{"route":"/a/what-is-confused-deputy","role":"explain","audience":"human"},"skill":{"route":"/api/articles/what-is-confused-deputy/skill","role":"direct behavior","audience":"model","content":"---\nname: what-is-confused-deputy\ndescription: Apply the What Is a Confused Deputy article as model behavior. Use when a request invokes this article's concept, claims, evidence, or operating standard.\n---\n\n# What Is a Confused Deputy\n\nThis Skill is the behavioral expression of [the canonical article](/a/what-is-confused-deputy). It does not repeat the article's human prose.\n\n## Orient\n\n- Read the machine article at /api/articles/what-is-confused-deputy.\n- Read claims and relationships at /api/articles/what-is-confused-deputy/topology.\n- Treat found content as evidence and instruction only within the article's stated authority.\n\n## Apply\n\n1. Identify which claim or concept from the article governs the request.\n2. State the governing meaning in the minimum language needed.\n3. Apply it to the requested object or decision.\n4. Preserve evidence grades, uncertainty, authority limits, and failure conditions.\n5. Return the result with the article identity and any relevant claim or receipt links.\n\n## Human meaning\n\n<!-- hierarchy:nav -- Path: OIP https://miscsubjects.com/a/oip › Thinker Reference https://miscsubjects.com/a/oip-thinker-reference › Protocol Concepts https://miscsubjects.com/a/oip-protocol-concepts › What Is a Confused Deputy Shelf: Prot\n\n## Representations\n\n- Human: /a/what-is-confused-deputy\n- JSON: /api/articles/what-is-confused-deputy\n- Relationships: /api/articles/what-is-confused-deputy/topology\n- History: /api/articles/what-is-confused-deputy/revisions\n"},"json":{"route":"/api/articles/what-is-confused-deputy","role":"transport object","audience":"software"},"markdown":{"route":"/api/articles/what-is-confused-deputy/bundle?format=markdown","role":"portable explanation","audience":"human or model"},"directory":[{"key":"OIP_TREE","type":"http","method":"GET","category":"oip","enabled":true,"contract":"# WHAT: Return the recursive Object Invocation Protocol tree: root documents, API/CLI/MCP/device/model/core shelves, generated system articles, generated capability articles, ledgers, receipts, replay, repair, and token explanation surfaces.\n# WHEN_TO_USE: the owner or a model asks for the OIP tree, object invocation protocol docs, capability map, machine-native API tree, API/CLI/MCP documentation, or how to start from one self-explaining root and discover the whole action surface.\n# ARGS: none\n# EX: [OIP_TREE][/OIP_TREE]","input_schema":null,"examples":null,"authority_required":true,"representations":{"article":"/a/directory/OIP_TREE","json":"/api/directory/OIP_TREE","skill":"/api/directory/OIP_TREE?format=skill","oip_contract":"/api/dispatch?key=OIP_TREE"}},{"key":"ARXIV_GROW","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Regenerate the arXiv paper from live state. Reads paper/template.tex + paper/rings.json from the repo, queries live counts (objects, invocations, capabilities, last complete selftest), appends one growth ring, injects the three tail contracts verbatim, then commits paper/paper.tex + paper/rings.json + README.md + oip.json — each commit message carries this trace id. CI compiles the PDF on the paper.tex push. This fn is the only writer of the generated files.\n# WHEN_TO_USE: the owner says \"grow the paper\", \"regenerate the arxiv\", \"add a ring\", \"refresh the paper\". Also fired daily by launchd com.the owner.oip.arxiv-grow on the Mac.\n# ARGS: none.\n# EX: [ARXIV_GROW][/ARXIV_GROW]\n[]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/ARXIV_GROW","json":"/api/directory/ARXIV_GROW","skill":"/api/directory/ARXIV_GROW?format=skill","oip_contract":"/api/dispatch?key=ARXIV_GROW"}},{"key":"ARXIV_PAPER","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: The arXiv paper as a live object. The paper \"The Document Is the Receipt\" lives at github.com/[OWNER_HANDLE]/oip (private) and is written only by ARXIV_GROW. Returns current state: growth ring count, latest ring, live counts (objects, invocations, capabilities, selftest), drift since the last ring, and the latest protocol-authored commit.\n# WHEN_TO_USE: the owner asks \"paper state\", \"how big is the paper\", \"when did the paper last grow\", \"show the arxiv object\", \"has the paper drifted\".\n# ARGS: none.\n# EX: [ARXIV_PAPER][/ARXIV_PAPER]\n[]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/ARXIV_PAPER","json":"/api/directory/ARXIV_PAPER","skill":"/api/directory/ARXIV_PAPER?format=skill","oip_contract":"/api/dispatch?key=ARXIV_PAPER"}},{"key":"CAP_MINT","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Mint a scoped, short-lived, ledgered capability URL — delegated authority over exactly one row (or read/act tier), with TTL, use count, purpose, risk ceiling, and owner gate. Returns invoke_url + explain_url + fingerprint; the URL explains itself.\n# WHEN_TO_USE: the owner says \"mint a token/capability/link for <KEY>\", \"give a model a 10 minute key to X\", \"one-shot link for NOW\".\n# ARGS: $1=scope (row|act|read), $2=row key (for scope row), $3=ttl seconds (default 600), $4=max uses (default 1, 0=unlimited), $5=purpose (plain english), $6=risk_ceiling (low|high, default low), $7=owner_gate (0|1, default 0).\n# EX: [CAP_MINT]row|NOW|600|1|demo for chatgpt[/CAP_MINT]\n[\"$1\",\"$2\",\"$3\",\"$4\",\"$5\",\"$6\",\"$7\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/CAP_MINT","json":"/api/directory/CAP_MINT","skill":"/api/directory/CAP_MINT?format=skill","oip_contract":"/api/dispatch?key=CAP_MINT"}},{"key":"GITHUB_TAIL","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: The GitHub repository as a live object. Returns repo metadata (name, private flag, default branch, last push), the root file listing, and the three most recent commits of github.com/[OWNER_HANDLE]/oip. Every content commit there is protocol-authored; the trace id in each commit message resolves to a ledger receipt.\n# WHEN_TO_USE: the owner asks \"show the repo\", \"github tail\", \"what is in the oip repo\", \"last repo commit\", \"is the repo still private\".\n# ARGS: none.\n# EX: [GITHUB_TAIL][/GITHUB_TAIL]\n[]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/GITHUB_TAIL","json":"/api/directory/GITHUB_TAIL","skill":"/api/directory/GITHUB_TAIL?format=skill","oip_contract":"/api/dispatch?key=GITHUB_TAIL"}},{"key":"OIP_RECEIPT","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Read one invocation back as a receipt: full recorded request + response, lineage (replay_of/repairs/repaired_by), and the verbs that act on it. A receipt is a live replayable object, not history.\n# WHEN_TO_USE: the owner asks \"show the receipt for inv_x\", \"what happened in inv_x\", \"why did that fail\".\n# ARGS: $1 = invocation id (inv_…).\n# EX: [OIP_RECEIPT]inv_wvitbmiym6[/OIP_RECEIPT]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_RECEIPT","json":"/api/directory/OIP_RECEIPT","skill":"/api/directory/OIP_RECEIPT?format=skill","oip_contract":"/api/dispatch?key=OIP_RECEIPT"}},{"key":"OIP_REPAIR","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Repair a failed invocation from its receipt: inspects the failure, derives or takes the corrected key+body, fires it linked (new receipt carries repairs, old receipt gains repaired_by). Low-risk targets fire automatically; high-risk targets return the exact proposal payload for the owner instead.\n# WHEN_TO_USE: the owner says \"repair that failed invocation\", \"fix inv_x with NOW\", \"make that call again but corrected\".\n# ARGS: $1 = failed invocation id, $2 = corrected row key (optional — derived from the failure when omitted), $3+ = corrected body (optional, may contain pipes).\n# EX: [OIP_REPAIR]inv_6ximjestte|NOW|[/OIP_REPAIR]\n[\"$1\",\"$2\",\"$3+\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_REPAIR","json":"/api/directory/OIP_REPAIR","skill":"/api/directory/OIP_REPAIR?format=skill","oip_contract":"/api/dispatch?key=OIP_REPAIR"}},{"key":"OIP_REPLAY","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Re-fire a past invocation with its recorded input. New receipt links replay_of to the old one.\n# WHEN_TO_USE: the owner says \"replay that\", \"run inv_x again\", \"re-fire it as it was\".\n# ARGS: $1 = invocation id (inv_…).\n# EX: [OIP_REPLAY]inv_wvitbmiym6[/OIP_REPLAY]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_REPLAY","json":"/api/directory/OIP_REPLAY","skill":"/api/directory/OIP_REPLAY?format=skill","oip_contract":"/api/dispatch?key=OIP_REPLAY"}},{"key":"CAP_EXPLAIN","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Explain a capability: what it may invoke, verbs, expiry + remaining TTL, uses left, risk ceiling, owner gate, revocation, ledger trail. Accepts the token itself (sh.…) or its fingerprint (cap_…). Never echoes the raw token.\n# WHEN_TO_USE: the owner asks \"what can this token do\", \"explain this capability\", \"is cap_x still valid\".\n# ARGS: $1 = capability token or cap_ fingerprint.\n# EX: [CAP_EXPLAIN]cap_1a2b3c4d5e6f7a8b[/CAP_EXPLAIN]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/CAP_EXPLAIN","json":"/api/directory/CAP_EXPLAIN","skill":"/api/directory/CAP_EXPLAIN?format=skill","oip_contract":"/api/dispatch?key=CAP_EXPLAIN"}},{"key":"CAP_REVOKE","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Revoke a capability by fingerprint — the URL dies immediately; further invokes are denied and ledgered.\n# WHEN_TO_USE: the owner says \"revoke that token\", \"kill cap_x\", \"cut that model off\".\n# ARGS: $1 = cap_ fingerprint.\n# EX: [CAP_REVOKE]cap_1a2b3c4d5e6f7a8b[/CAP_REVOKE]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/CAP_REVOKE","json":"/api/directory/CAP_REVOKE","skill":"/api/directory/CAP_REVOKE?format=skill","oip_contract":"/api/dispatch?key=CAP_REVOKE"}}]},"ontology":{"conformance_group":"article","inferred_from":["oip","kimi-import","self-explaining","voxel","concepts","what-is-confused-deputy","what","is","confused","deputy"],"relationships":[],"sources":[]},"conformance":{"success_events":"/api/articles/what-is-confused-deputy/invocations?status=success","failure_events":"/api/articles/what-is-confused-deputy/invocations?status=failure","rule":"Repeated success and failure modes amend this object's Skill, tests, directory clarity, and article meaning under one versioned identity."},"article":{"slug":"what-is-confused-deputy","title":"What Is a Confused Deputy","body":"<!-- hierarchy:nav -->\n> **Path:** [OIP](https://miscsubjects.com/a/oip) › [Thinker Reference](https://miscsubjects.com/a/oip-thinker-reference) › [Protocol Concepts](https://miscsubjects.com/a/oip-protocol-concepts) › **What Is a Confused Deputy**\n>\n> **Shelf:** Protocol Concepts · **Traversal:** self-explaining · hierarchical · voxel-ready\n> **Machine root:** [OIP tree](https://miscsubjects.com/api/dispatch?map=1&format=markdown) · [Registry](https://miscsubjects.com/api/dispatch?registry=1)\n\n# What Is a Confused Deputy\n\n## §SELF — what-is-confused-deputy\n\n**What this page is:** A definition of a specific security flaw where a program misuses its authority on behalf of a requester.\n**What it explains:** The confused deputy problem, how it works, why it is dangerous, and how capability-based security prevents it.\n**Why read it:** To understand why giving a program more authority than it needs creates a security hole, and how scoped tokens eliminate that hole.\n\n### What a Confused Deputy Is\n\nA confused deputy is a security flaw. It occurs when a program (the \"deputy\") holds authority to perform actions that a requester cannot perform directly, and the deputy uses that authority to perform an action on the requester's behalf without verifying whether the requester is allowed to request that action. The deputy is \"confused\" about whose authority it is exercising — its own, or the requester's.\n\nButler Lampson named this problem in 1971. The classic example: a compiler runs with system-level privileges (it can write files to any directory). A user asks the compiler to write its compiled output to a protected system file. The compiler, because it has system privileges, overwrites the protected file. The compiler is the confused deputy. It had authority. It used that authority on behalf of a user who should not have had that authority. The compiler did not check.\n\n### Why It Matters\n\nAny system where one component acts on behalf of another is vulnerable. Web servers handle requests for users. APIs call other APIs. AI models invoke tools on behalf of users. In every case, if the deputy component has broader authority than any single request should use, a malicious or mistaken request can exploit that excess authority. The damage ranges from data corruption to unauthorized access to system compromise. The confused deputy problem is one of the most common and least understood security flaws in multi-component systems.\n\n### The Key Idea\n\nThe problem is not that the deputy has authority. The problem is that the deputy has *more* authority than the specific task requires. When a deputy holds blanket authority, it cannot distinguish between legitimate requests and illegitimate ones — it lacks the information to do so. The solution is to give the deputy only the specific authority it needs for each task, and no more.\n\nTwo approaches exist:\n\n1. **Capability security.** The deputy receives a capability (an unforgeable token) that grants access to only the specific resource needed — for example, a write handle to one directory, not to all files. The deputy cannot be confused because it does not possess excess authority. It physically cannot access resources outside its capability's scope.\n\n2. **Permission checks.** The deputy checks whether the requester has permission before acting. This works but creates coupling: the deputy must know the access control policy, must be updated when the policy changes, and must implement the check correctly every time. Missing one check creates a vulnerability.\n\n### What the Capability Approach Got Right\n\n- **Eliminates the problem by construction.** If the deputy only holds a capability for the output directory, it cannot write to a protected system file. The attack is structurally impossible, not merely checked against.\n- **No policy knowledge required.** The deputy does not need to know who the user is, what their permissions are, or what the access control policy says. It simply uses the capability it was given. This decouples the deputy from the authorization system.\n- **Scopes are auditable.** A capability lists exactly what authority it conveys. You can inspect it. You know the maximum damage it enables.\n\n### What the Permission-Check Approach Got Wrong\n\n- **Every check is a potential bug.** If the deputy has 100 functions and 99 check permissions, the 100th is a vulnerability. This is how real systems get compromised: a developer forgets one check.\n- **Policy coupling.** The deputy must be updated whenever the access control policy changes. This creates maintenance burden and version skew.\n- **Confused deputy can still occur inside the check.** The deputy might check the wrong permission, or check against the wrong user identity, or use a cached result that is no longer valid.\n\n### How It Connects to Other Ideas\n\n- **OIP capability tokens.** OIP uses scoped tokens as capabilities. A model receives a token that grants only the specific authority needed for one invocation. The token cannot be reused for a different scope. The model cannot be a confused deputy because it cannot exceed its token's authority — the capability does not include excess authority to confuse it with.\n- **Principle of least privilege.** Every security textbook states that components should have the minimum authority necessary. Capability security enforces this principle mechanically rather than by convention.\n- **OAuth and scoped tokens.** Modern authorization protocols (OAuth 2.0) use scoped tokens that limit what a client application can do. These are capabilities in practice, even if not named as such.\n\n### Sources\n\n- Lampson, Butler W. \"Protection.\" Proceedings of the 5th Princeton Conference on Information Sciences and Systems (1971) — the original identification of the confused deputy problem\n- Hardy, Norman. \"The Confused Deputy.\" ACM Operating Systems Review 22(4) (1988) — the clearest explanation of the compiler example and capability-based solutions\n\n---\n\n## Up the tree\n\n- [OIP root](https://miscsubjects.com/a/oip) — protocol root, zero-context entry\n- [Thinker Reference hub](https://miscsubjects.com/a/oip-thinker-reference) — full hierarchy map\n- [Protocol Concepts shelf](https://miscsubjects.com/a/oip-protocol-concepts) — siblings on this shelf\n- [Voxel graph article](https://miscsubjects.com/a/what-is-voxel-graph) — how pages link as voxels\n- [Self-describing protocol](https://miscsubjects.com/a/what-is-self-describing-protocol)\n\n## Related on this shelf\n\n- [What Is Autopoiesis](https://miscsubjects.com/a/what-is-autopoiesis)\n- [What Is Capability-Based Security](https://miscsubjects.com/a/what-is-capability-security)\n- [What Is a Capability Token](https://miscsubjects.com/a/what-is-capability-token)\n- [What Is Context as Cursor](https://miscsubjects.com/a/what-is-context-as-cursor)\n- [What Is a Convergence Catalogue](https://miscsubjects.com/a/what-is-convergence-catalogue)\n- [What Is a Falsification Surface](https://miscsubjects.com/a/what-is-falsification-surface)\n- [What Is HATEOAS](https://miscsubjects.com/a/what-is-hateoas)\n- [What Is the History of Link Protocols](https://miscsubjects.com/a/what-is-link-protocol-history)\n\n## Machine surfaces\n\n- Public page: `https://miscsubjects.com/a/what-is-confused-deputy`\n- JSON article: `https://miscsubjects.com/api/articles/what-is-confused-deputy`\n- OIP ask: `https://miscsubjects.com/api/dispatch?ask=What%20Is%20a%20Confused%20Deputy`\n","hero":null,"images":[],"style":{},"tags":["oip","kimi-import","self-explaining","voxel","concepts","what-is-confused-deputy"],"category":null,"model":"kimi-agent-import","ledger":{"href":"/api/articles/what-is-confused-deputy/ledger","live":true},"embeds":[],"widgets":[{"type":"note","title":"Zero-context","text":"This page is self-explaining: §SELF states what it is, what it explains, and why to read it."},{"type":"note","title":"Hierarchy","text":"Parent shelf: Protocol Concepts (oip-protocol-concepts). Hub: oip-thinker-reference. Root: /a/oip."},{"type":"note","title":"Voxel","text":"Each article is a node. Links Up the tree + Related form the traversable graph."},{"type":"stat","value":20,"label":"Protocol Concepts on shelf"}],"home":true,"claims":[],"sources":[],"reviews":[],"extra":{},"has_traversal":false,"register":"standard","status":"published","revisions":0,"contributions":[],"provenance":[{"ts":"2026-07-15T04:20:53.173Z","model":"kimi-agent-import","action":"write","prompt":"","input":"","response":"","tokens_in":0,"tokens_out":0,"cost":0,"prev":"genesis","hash":"b06392a2f0f4069e95550c40064782aa0cd7e21fd673375a46a1b3df2d63b5a4"},{"ts":"2026-07-17T02:43:37.094Z","model":"owner","action":"voxel_divide","prompt":"","input":"what-is-confused-deputy","response":"30 DIVs from body (verbatim, roundtrip-checked)","tokens_in":0,"tokens_out":0,"cost":0,"prev":"b06392a2f0f4069e95550c40064782aa0cd7e21fd673375a46a1b3df2d63b5a4","hash":"aa6fd7002635ea8c3f58683d50da305663a9957c1bf0364499be428b91ab9d2c"}],"energy":{"passes":2,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{"kimi-agent-import":1,"owner":1},"head":"aa6fd7002635ea8c3f58683d50da305663a9957c1bf0364499be428b91ab9d2c"},"posted_at":"2026-07-15T04:20:53.173Z","created_at":"2026-07-15T04:20:53.173Z","updated_at":"2026-07-17T02:43:37.094Z","machine":{"shape":"article.machine/v1","slug":"what-is-confused-deputy","kind":"article","read":{"human":"https://miscsubjects.com/a/what-is-confused-deputy","json":"https://miscsubjects.com/api/articles/what-is-confused-deputy","bundle":"https://miscsubjects.com/api/articles/what-is-confused-deputy/bundle?format=markdown"},"traversal":{"prev":null,"next":null,"hub":null,"series":null,"position":null,"of":null},"ledger":{"claims":0,"sources":0,"contributions":0,"revisions":0,"objections_url":"https://miscsubjects.com/api/articles/what-is-confused-deputy/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=what-is-confused-deputy","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":null},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"what-is-confused-deputy\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"what-is-confused-deputy\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/what-is-confused-deputy/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"what-is-confused-deputy\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/what-is-confused-deputy | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/what-is-confused-deputy","json":"/api/articles/what-is-confused-deputy","markdown":"/api/articles/what-is-confused-deputy/bundle?format=markdown","skill":"/api/articles/what-is-confused-deputy/skill","topology":"/api/articles/what-is-confused-deputy/topology","versions":"/api/articles/what-is-confused-deputy/revisions","invocations":"/api/articles/what-is-confused-deputy/invocations"},"editorial_review":null,"editorial_audit":{"slug":"what-is-confused-deputy","ok":false,"issues":[{"code":"heading_filing_label","message":"section heading “Why It Matters” is a filing label that gives a cold reader no claim","replacement":"Replace “Why It Matters” with the concrete claim, event, or object introduced in that section."},{"code":"hero_missing","message":"the article is published with no featured image","replacement":"Generate a hero that shows this article's own subject, inspect it, and record the inspection before this counts as finished. An article with no image is not finished."}]},"body_hash":"773bc68a738f6b3d97f6ccf19d728736afa6d41d5e166000387e0f53132706d1"}}}