# Two-Step AI Agent Privilege Escalation: Contact Mutation Chains & Fail-Open MCP Tools

> Source: <https://dev.to/naditu/two-step-ai-agent-privilege-escalation-contact-mutation-chains-fail-open-mcp-tools-2pnf>
> Published: 2026-12-06 20:05:33+00:00

**Recommendation:** Treat agent-written fields as unverified session taint that cannot satisfy downstream recipient checks, and replace fail-open confirmation callbacks with fail-closed HMAC nonces withheld from LLM responses.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

*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)**.
