CVE-2026-115563
OAuth client can leak credentials to untrusted MCP‑chosen auth server.
- CVSS 7.5
- CWE-345
- Authentication, Authorization, and Session Management
- Remote
The Model Context Protocol Python SDK is the official Python SDK for Model Context Protocol servers and clients. From 1.9.1 until 1.30.0 and 2.2.0, OAuth client support in mcp.client.auth can send credentials to an authorization server chosen by an untrusted MCP server. ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider cannot identify the authorization server that owns their credentials. Affected HTTP clients using those providers, OAuthClientProvider, or the deprecated 1.x RFC7523OAuthClientProvider can disclose a client_secret, authorization code, PKCE code_verifier, or signed client assertion. 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, while the unattended providers do not. For ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider, callers must configure issuer= after upgrading because omission still follows the MCP server's advertised authorization server, and the deprecated RFC7523OAuthClientProvider must be replaced because it has no issuer option. A stored client registration without an issuer remains unbound after upgrading, so stored OAuth client information must be cleared once to register again or a manually pre-registered record must be updated with its issuer. This issue is fixed in versions 1.30.0 and 2.2.0.
- CWE
- CWE-345
- CVSS base score
- 7.5
- Published
- 2026-11-16
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Interface
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- Model Context Protocol Python SDK
- Fixed by upgrading
- Yes
Solution
Upgrade the SDK to version 1.30.0 (or 2.2.0 for the v2 line) to apply the fix.
Vulnerable code sample
import mcp.client.auth as auth
def obtain_token():
# VULNERABLE: uses authorization server advertised by untrusted MCP server
provider = auth.ClientCredentialsOAuthProvider(
client_id="my-client-id",
client_secret="my-secret"
)
token = provider.fetch_token()
return tokenPatched code sample
import mcp.client.auth as auth
def obtain_token():
# FIX: bind provider to known authorization server
provider = auth.ClientCredentialsOAuthProvider(
client_id="my-client-id",
client_secret="my-secret",
issuer="https://auth.example.com"
)
token = provider.fetch_token()
return tokenPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- [v1.x] Validate the authorization server metadata issuer on every discovery path (#3431) (modelcontextprotocol/python-sdk)
src/mcp/client/auth/extensions/client_credentials.py,src/mcp/client/auth/extensions/client_credentials.py · ClientCredentialsOAuthProvider._exchange_token_client_credentials,src/mcp/client/auth/extensions/client_credentials.py · ClientCredentialsOAuthProvider.__init__,src/mcp/client/auth/extensions/client_credentials.py · PrivateKeyJWTOAuthProvider._exchange_token_client_credentials,src/mcp/client/auth/extensions/client_credentials.py · PrivateKeyJWTOAuthProvider.__init__,src/mcp/client/auth/extensions/client_credentials.py · RFC7523OAuthClientProvider.__init__,src/mcp/client/auth/extensions/client_credentials.py · static_assertion_provider,src/mcp/client/auth/oauth2.py,src/mcp/client/auth/oauth2.py · OAuthClientProvider.async_auth_flow,src/mcp/client/auth/utils.py,src/mcp/client/auth/utils.py · extract_resource_metadata_from_www_auth,src/mcp/client/auth/utils.py · handle_registration_responseand 1 more - Deprecate constructing the pre-provisioned OAuth clients without an issuer (#3435) (modelcontextprotocol/python-sdk)
examples/stories/oauth_client_credentials/client.py,examples/stories/oauth_client_credentials/client.py · build_auth,src/mcp/client/auth/extensions/client_credentials.py,src/mcp/client/auth/extensions/client_credentials.py · ClientCredentialsOAuthProvider.__init__,src/mcp/client/auth/extensions/client_credentials.py · PrivateKeyJWTOAuthProvider.__init__,src/mcp/client/auth/extensions/client_credentials.py · _checked_issuer - Validate the authorization server metadata issuer on every discovery path (#3398) (modelcontextprotocol/python-sdk)
docs_src/oauth_clients/tutorial002.py,src/mcp/client/auth/extensions/client_credentials.py,src/mcp/client/auth/extensions/client_credentials.py · ClientCredentialsOAuthProvider._exchange_token_client_credentials,src/mcp/client/auth/extensions/client_credentials.py · ClientCredentialsOAuthProvider.__init__,src/mcp/client/auth/extensions/client_credentials.py · PrivateKeyJWTOAuthProvider._exchange_token_client_credentials,src/mcp/client/auth/extensions/client_credentials.py · PrivateKeyJWTOAuthProvider.__init__,src/mcp/client/auth/oauth2.py,src/mcp/client/auth/oauth2.py · OAuthClientProvider.async_auth_flow,src/mcp/client/auth/utils.py,src/mcp/client/auth/utils.py · credentials_match_issuer,src/mcp/client/auth/utils.py · extract_resource_metadata_from_www_auth
Cite this entry
@misc{vaitp:cve2026115563,
title = {{OAuth client can leak credentials to untrusted MCP‑chosen auth server.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-115563},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-115563/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
