Descrizione
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.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.3% (percentile 26).
Versioni da aggiornare
- modelcontextprotocol python-sdk: vulnerabile la versione
>= 1.9.1, < 1.30.0→ installare l'ultima release supportata dal vendor. - modelcontextprotocol python-sdk: vulnerabile la versione
>= 2.0.0a1, < 2.2.0→ installare l'ultima release supportata dal vendor.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ruotare credenziali e chiavi, limitare l'accesso di rete al servizio e verificare accessi effettuati con credenziali predefinite.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| modelcontextprotocol | python-sdk | >= 1.9.1, < 1.30.0 | — |
| modelcontextprotocol | python-sdk | >= 2.0.0a1, < 2.2.0 | — |
Riferimenti
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/commit/3eed7ce0a6aba76e8d94c4cfb9b266f41935392c
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/commit/979208c1157661eac0151f90974a1f96528003fa
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/commit/d060b36e1d095ef6e93e07ba5d59bb69b2ad449a
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/pull/3398
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/pull/3431
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/pull/3435
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0
- Riferimentohttps://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-qx49-fqc8-xw99