Model Context Protocol Python SDKで認証情報が想定外の認可サーバーに送られる脆弱性
Summary
信頼できないMCPサーバーが選んだ認可サーバーに、OAuthクライアントの認証情報が送られるおそれがあります。影響を受けるのは1.9.1から1.30.0より前、および2.2.0より前のPython SDKで、1.30.0と2.2.0で修正されています。ClientCredentialsOAuthProviderなどを使う場合は、アップグレード後にissuerを設定してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
信頼できないMCPサーバーが選んだ認可サーバーに、OAuthクライアントの認証情報が送られるおそれがあります。影響を受けるのは1.9.1から1.30.0より前、および2.2.0より前のPython SDKで、1.30.0と2.2.0で修正されています。ClientCredentialsOAuthProviderなどを使う場合は、アップグレード後にissuerを設定してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| modelcontextprotocolpython-sdk | — | Not listed |
| PyPImcp |
≥ 1.9.1, < 1.30.0→ 1.30.0 |
1.30.0 |
| pipmcp |
< 1.30.0→ 1.30.0 |
1.30.0 |
Original description The description as published by the source.
Summary
In affected versions, the SDK's OAuth client support (mcp.client.auth) let the MCP server a client connected to decide where the client's OAuth credentials were sent:
- the authorization server metadata
issuerwas not validated on every discovery path, and - stored or pre-provisioned client credentials were not bound to the authorization server they belong to.
A malicious or compromised MCP server could therefore direct them to a token endpoint of its choosing:
- by naming its own authorization server in its protected resource metadata, or
- by publishing none and serving metadata that presents the user's real authorization server as the
issuer.
It would then receive the client_secret, authorization code and PKCE code_verifier meant for that real server (or, with PrivateKeyJWTOAuthProvider, a signed client assertion).
Am I affected?
Yes, if both of these hold:
- your application uses the SDK as an MCP client over HTTP with
OAuthClientProvider,ClientCredentialsOAuthProvider,PrivateKeyJWTOAuthProvideror the deprecated 1.xRFC7523OAuthClientProvideras the transport'sauthhandler; - it may connect to an MCP server you do not fully trust while holding credentials for a legitimate authorization server (a pre-provisioned secret or signing key, or a stored client registration).
Affected versions:
- 1.9.1 through 1.29.1: no
issuercheck and no credential binding on any path. - 2.0.0 through 2.1.1: both missing whenever the server pu…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com