Redbot Labs / Attack Intelligence

MCP OAuth Confused Deputy

Record ID
RB-089
Severity
High
Category
MCP
Confidence Score
95

Summary

MCP OAuth Confused Deputy occurs when an MCP proxy incorrectly treats a user’s approval of its third-party connection as approval for a different MCP client. A malicious client can exploit missing client-specific consent to obtain access the user did not knowingly authorize. The weakness lies in the proxy’s authorization flow and does not require manipulating an AI model.

Executive Summary

An MCP proxy can connect multiple AI clients to an external service while presenting one application identity to that service. The proxy must distinguish approval of its upstream connection from approval of each client requesting access through it.

MCP security guidance documents a confused-deputy scenario involving a shared upstream client identity, dynamic client registration, remembered upstream consent and missing client-specific approval.

The security failure is a mismatch between the user’s intended delegation and the client that receives access. Successful authentication does not establish that the user approved that delegation.

Validation should examine both sides of the proxy, including the relationship among the user, requesting client, consent decision, authorization transaction and resulting access.

Attack Overview

Primary objective

Acquire access through a trusted MCP integration without the user approving the requesting client.

Relevant architecture

An MCP proxy brokers access to a third-party API. The documented scenario applies to implementations with the vulnerable registration and consent conditions; it is not an inherent flaw in every MCP server.

Distinction from related techniques

MCP Server Trust Abuse concerns a rogue or compromised server. Here, the proxy may be legitimate but mishandle authorization.

AI Tool Authorization Bypass concerns enforcement when an action is invoked. This narrative focuses on establishing the client’s access in the first place.

Attack Flow

  1. A user legitimately connects through an MCP proxy.
  2. The upstream service remembers approval for the proxy.
  3. A different client initiates an authorization flow.
  4. The proxy fails to obtain the required client-specific consent.
  5. The client receives access outside the user’s intended delegation.

Subsequent access depends on the issued permissions and available integration functions.

Affected Systems

  • MCP proxies connecting AI clients to external APIs.
  • OAuth authorization and callback handlers.
  • Client-registration services.
  • Consent interfaces and approval stores.
  • Token issuance and refresh workflows.
  • Enterprise applications exposed through the affected integration.

Business Impact

Incorrectly delegated MCP access can expose enterprise services through a connection the user recognizes and trusts.

Potential consequences include:

  • Unauthorized access to information available through the integration.
  • Changes to business records where granted permissions allow them.
  • Continued access through valid credentials until expiration or revocation.
  • Difficulty attributing activity when client identity is not preserved.
  • Investigation and reauthorization of affected integrations.

Impact depends on the permissions actually granted and the functions exposed through the proxy. Obtaining access to one integration does not establish compromise of the user’s entire account or other connected services.

Testing Methodology

Map the delegation

Identify which component authenticates the user, registers clients, records consent and issues credentials. Document what each approval is intended to authorize.

Establish separate test clients

Use two clearly distinguishable clients and a test user. Keep their identifiers, credentials and permitted destinations separate throughout the assessment.

Compare fresh and returning sessions

Evaluate authorization before and after the test user has approved a legitimate connection. Determine whether previously established browser state changes the approval requirements for another client.

Validate denied and interrupted flows

Confirm that cancelling consent, declining permissions or abandoning authorization does not leave a usable grant. Include direct callback requests and expired transactions within the approved test scope.

Check transaction binding

Verify that authorization responses are associated with the correct initiating session and client. Test rejection of mismatched, reused or missing transaction information.

Assess resulting access

Use synthetic records to establish what an issued credential permits. Record token issuance separately from demonstrated access to the external service.

Verify revocation

Confirm that withdrawing client approval prevents further use according to the system’s documented token and revocation behavior.

Use test accounts and controlled destinations. Do not involve unsuspecting users or production authorization codes.

Detection Guidance

Maintain an authorization audit trail

Record the user, client identifier, requested permissions, consent outcome and grant identifier. Avoid recording raw authorization codes or tokens.

Identify incomplete approval histories

Investigate credentials issued without the corresponding successful approval event expected by the application’s policy.

Review new clients

Monitor unexpected registrations, changes to client metadata and newly introduced callback destinations.

Correlate grants with activity

Associate subsequent MCP operations with the client and authorization that enabled them. Investigate access inconsistent with the recorded delegation.

Monitor transaction failures

Repeated callback mismatches, expired-state errors or attempted reuse can indicate probing, implementation defects or malicious activity.

A new client or unfamiliar destination is an investigation signal, not proof of compromise.

Mitigation Guidance

Make delegation explicit

Require client-specific approval where the proxy architecture calls for it. Clearly show the requesting client and the access being requested.

Protect authorization transactions

Follow current OAuth security guidance for redirect validation, CSRF protection and authorization-code flows. Use PKCE where required or supported by the applicable protocol.

PKCE protects code exchange; it does not replace a missing consent decision.

Validate destinations

Enforce registered redirect destinations according to the applicable OAuth rules. Avoid permissive matching that allows authorization responses to reach unintended locations.

Restrict granted authority

Request only the permissions needed for the integration. Broad access increases the consequences of an incorrectly issued grant.

Manage registration

Apply an explicit policy to client registration and metadata changes. Remove unsupported or unnecessary registration paths rather than leaving them available by default.

Protect credentials

Keep issued credentials out of logs, analytics and browser-visible diagnostics. Apply appropriate expiration, revocation and refresh-token protections.

Revalidate changes

Retest authorization when changing identity providers, proxy implementations, client-registration behavior or session handling.

MITRE Mapping

MITRE ATT&CK T1528: Steal Application Access Token Relevant when the authorization failure enables an attacker-controlled client to obtain application credentials outside the user’s intended consent. An intercepted authorization code alone is not proof that a usable access token was obtained. Record the demonstrated stage and resulting access separat

OWASP Mapping

OWASP LLM06:2025: Excessive Agency Related where the affected integration grants an AI client excessive permissions or enables actions beyond the intended delegation. This is contextual alignment. The underlying weakness is an OAuth consent and authorization failure, and it can occur without an LLM generating or executing instructions.

Technical References

Model Context Protocol: Security Best Practices
Documents the MCP proxy confused-deputy scenario, vulnerable conditions and client-specific consent requirements.
https://modelcontextprotocol.io/docs/2025-11-25/tutorials/security/security_best_practices

IETF RFC 9700: Best Current Practice for OAuth 2.0 Security
Guidance on authorization flows, redirect protection, token security and privilege restriction.
https://www.rfc-editor.org/rfc/rfc9700.html

MITRE ATT&CK T1528: Steal Application Access Token
https://attack.mitre.org/techniques/T1528/

OWASP LLM06:2025: Excessive Agency
https://genai.owasp.org/llmrisk/llm062025-excessive-agency/

Related Attack Intelligence