Two-Step AI Agent Privilege Escalation: Contact Mutation Chains & Fail-Open MCP Tools A developer at Naditu documented a two-step privilege-escalation and exfiltration chain in enterprise MCP agent deployments, where individually safe tools like update_account_contact and send_customer_email compose into an attack when prompt injection appends an attacker-controlled address to a CRM account record. The writeup also catalogs fail-open MCP tool patterns, including confirmation callbacks that return true on timeout, directly callable side-effect tools, positional $search indexing that drifts under concurrency, and verbose 401 error hints. The proposed defense uses session taint marking agent-written fields as unverified, fail-closed HMAC nonces withheld from LLM responses, a closed ActionType catalog, and immutable object references with etag preconditions. Originally published at naditu.com/blog/two-step-ai-agent-privilege-escalation-and-fail-open-mcp-tools https://naditu.com/blog/two-step-ai-agent-privilege-escalation-and-fail-open-mcp-tools . Most enterprise MCP security reviews audit tools one at a time : "Does send customer email check that the recipient belongs to a verified CRM/ERP Account ?" If the answer is yes, the tool passes review. In production multi-turn agent loops, individually safe tools compose into a two-step privilege-escalation and exfiltration chain the moment the same catalog exposes a low-friction entity-update tool. Suppose an AP or sales operations agent has access to two routine MCP tools: update account contact account id, secondary email — treated as low-risk CRM hygiene and allowed without human sign-off. send customer email account id, recipient email, attachment report — restricted by a strict database check verifying recipient email is registered on account id . When an untrusted inbound vendor PDF or support email injects instructions into the agent's context window: update account contact to append audit-sync@external-drop.example onto the legitimate Account row. send customer email with AR aging, contract pricing tiers, or customer records addressed to The exact same composition flaw applies to supplier bank IBAN updates + treasury payout staging and ship-to consignee edits + dispatch release . catch { return true } : event call or webhook listeners that catch timeout or serialization exceptions and return true —turning network hiccups or stateless HTTP runs into silent auto-approvals. create draft gated, send email open : post webhook , dispatch einvoice directly callable without a cryptographic nonce. $search Positional Indexing: delete item search rank: 1 instead of an immutable entity id, etag sha256 pair—causing concurrent email or order arrivals to shift rank positions and mutate the wrong record. 401 Retry & Helpful Refusal Hints: HTTP 401 without an Authorization header hitting anonymous/demo fallbacks and verbose error hints | Attack Vector | Naive Single-Tool Guard | Governed Operational Ontology Defense | |---|---|---| | Contact / IBAN mutation - exfiltration | Checks current DB column value only | UNVERIFIED AGENT MUTATION session taint : agent-written fields cannot satisfy downstream verified recipient predicates without independent human approval | | Confirmation timeout / stateless runner | Client-side callback fail-open risk | Fail-closed out-of-context CSPRNG/HMAC nonce withheld from LLM JSON responses | | Direct side-effect tool invocation | Separate CRUD + outbound mail tools | Closed Declared ActionType catalog Draft - Human Evaluation - Official ERP API | | Concurrent $search rank drift | Positional index 1 , 2 , ... | Immutable canonical ObjectReference + snapshot etag precondition | Read the full engineering breakdown with interactive Architectural Plate attack/defense sequence diagrams and OWASP/NSA primary-source footnotes at naditu.com/blog/two-step-ai-agent-privilege-escalation-and-fail-open-mcp-tools https://naditu.com/blog/two-step-ai-agent-privilege-escalation-and-fail-open-mcp-tools .