/

CVE-2026-115563

Severity:

HIGH RISK

(7.5)

OAuth Credential Disclosure (CWE-345) in MCP Python SDK

CVE-2026-115563

Received

Vulnerability type

Category:

Authorization Server Trust Validation

CWE:

CWE-345, CWE-522

Impact:

Disclosure of OAuth credentials and potential client impersonation

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Certain OAuth providers in the MCP Python SDK can send credentials to an authorization server selected through information advertised by an untrusted MCP server. For affected HTTP clients, this may disclose secrets or other OAuth material; interactive sign-in requires a person to initiate it, while unattended providers do not.

Affected context

The issue concerns OAuth client support in mcp.client.auth in affected SDK releases. It can arise when an affected HTTP client uses ClientCredentialsOAuthProvider, PrivateKeyJWTOAuthProvider, OAuthClientProvider, or the deprecated 1.x RFC7523OAuthClientProvider and follows an authorization server advertised by an MCP server without binding credentials to the intended issuer. MCP servers, stdio clients, and clients that attach their own tokens or headers are not affected. Stored client registration information without an issuer may remain unbound after upgrading.

Exploit preconditions

  • Attack surface: An affected HTTP client using one of the specified OAuth providers.
  • Required access: The attacker must be able to influence or control the MCP server whose authorization-server information the client uses.
  • Trigger point: The client performs an OAuth operation, such as obtaining or exchanging a token, using the selected authorization server.
  • Why exploitation is possible: The affected provider may not verify that the server receiving credentials is the issuer intended to own them. Interactive use requires a person to initiate sign-in; unattended provider use does not.

Why this happens

The OAuth providers do not consistently bind credentials to an authenticated, expected authorization-server identity. As a result, server-provided authorization information can influence where sensitive client material is sent. This is primarily a data-authenticity and source-validation weakness (CWE-345), with credential exposure also related to CWE-522: Insufficiently Protected Credentials.

Potential impact

  • An attacker-controlled authorization server may receive a client secret or signed client assertion.
  • An authorization code or PKCE code verifier could be disclosed during an OAuth flow.
  • Stolen credentials or OAuth material could enable client impersonation or unauthorized access, depending on the credential and surrounding controls.

General mitigation guidance

Defensive patterns focus on binding OAuth credentials to a trusted issuer rather than accepting an authorization server selected solely by an MCP server.

  • Configure and validate an expected issuer for providers that support issuer binding.
  • Replace providers that cannot express or enforce an issuer constraint with an alternative that can.
  • Clear unbound stored client registration data and register it again, or ensure manually maintained registration records include the intended issuer.
  • Prefer secure-by-default provider configurations that reject missing or mismatched issuer information.
  • Reduce trust in server-supplied OAuth metadata, and limit the privileges and scope of OAuth clients and credentials.

How teams detect issues like this

  • Review OAuth provider setup for missing issuer constraints and flows that use authorization-server metadata supplied by an MCP server.
  • Use static analysis or code review checks to identify credential-bearing requests whose destination is derived from untrusted input.
  • Audit stored OAuth registration records for missing or mismatched issuer values.
  • Enforce policies that require trusted issuer configuration and prevent sensitive OAuth material from being sent to unapproved hosts.
  • Monitor outbound requests from OAuth clients for unexpected authorization-server destinations.

Sources

SourceLink
github.comgithub.com/modelcontextprotocol/python-sdk/commit/3eed7ce0a6aba76e8d94c4cfb9b266f41935392c
github.comgithub.com/modelcontextprotocol/python-sdk/commit/979208c1157661eac0151f90974a1f96528003fa
github.comgithub.com/modelcontextprotocol/python-sdk/commit/d060b36e1d095ef6e93e07ba5d59bb69b2ad449a
github.comgithub.com/modelcontextprotocol/python-sdk/pull/3398
github.comgithub.com/modelcontextprotocol/python-sdk/pull/3431
github.comgithub.com/modelcontextprotocol/python-sdk/pull/3435
github.comgithub.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0
github.comgithub.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0
github.comgithub.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-qx49-fqc8-xw99

Frequently asked

questions

Affected HTTP clients using the specified OAuth providers may be in scope. MCP servers, stdio clients, and clients that attach their own tokens or headers are not affected.

Interactive OAuthClientProvider use requires a person to start sign-in. The unattended providers do not require that interaction. The key condition is that the client uses authorization-server information influenced by an untrusted MCP server.

Bind OAuth credentials to an explicitly trusted issuer and reject missing or mismatched issuer information. Replace providers that cannot enforce that binding.

Treat server-advertised authorization metadata as untrusted, enforce issuer and destination policies, and audit stored client registrations and outbound OAuth requests.

Find out what's already
exploitable in your codebase.