What happened
In the Model Context Protocol Python SDK from 1.9.1 to <1.30.0 and in 2.2.0, the OAuth client support in mcp.client.auth can send credentials to an authorization server chosen by an untrusted MCP server. The client providers (ClientCredentialsOAuthProvider, PrivateKeyJWTOAuthProvider, OAuthClientProvider, deprecated RFC7523OAuthClientProvider) forward client credentials, authorization code, PKCE verifier, or signed client assertion to an arbitrary server (CWE-345/CWE-522, CVSS 7.5). Fixed in 1.30.0 and 2.2.0.
Why it matters
This is the official Python SDK for MCP servers and clients, so it underpins a large share of agent integrations. A malicious or compromised MCP server can redirect the client's stored OAuth secret/refresh token to an attacker-controlled host — an MCP 'transport trust gap'. Because the fix requires also setting an explicit issuer binding, upgrading the version alone leaves many deployments exposed.
Attack vector
MCP client connects to a server that selects a rogue authorization endpoint; the client forwards its OAuth client credentials, authorization code/PKCE verifier, or signed assertion to that attacker host
Affected systems
Model Context Protocol Python SDK (mcp) 1.9.1 to <1.30.0 and 2.2.0
Mitigation
Upgrade to mcp 1.30.0 or 2.2.0+ AND set an explicit expected issuer on every OAuth provider holding a client secret/signing key; rotate any credentials already sent to an untrusted server