MCP Python SDK exposed an OAuth vulnerability; a fixed version has been released
Start here
On September 28, 2026, Cycode publicly disclosed Yuval Elbar's coordinated disclosure research, pointing out that Anthropic's official MCP Python SDK has a complete account takeover vulnerability: a malicious MCP server can hijack the SDK's OAuth login flow, obtain the victim's client secret, authorization code and PKCE proof key, and then exchange them with the real identity provider for a valid access token. Affected versions are mcp 1.9.1 to 1.29.1 and 2.0.0 to 2.1. CSA Labs Research reported that the vulnerability has a CVSS score of 7.5, and the root cause is that the legacy fallback discovery path lacks issuer validation—when the server returns HTTP 404 to the standard authorization server discovery request, the SDK directly requests the OAuth configuration from that untrusted server and accepts it as-is; the fixed versions are 1.30.0 and 2.2.0. Subsequently, the MCP Python SDK released v2.3.0, which is mainly fixes and adds three configuration options: tools with invalid x-mcp-header annotations now throw InvalidSignature at registration, whereas previously the server would start normally but the 2026-07-28 client would silently discard the tool; empty _meta and params are no longer sent with requests, avoiding rejection by some servers; a new max_sse_event_size option is added, with the default still 1 MiB per SSE event.
Generated by AI from reports · Updated 2026-10-19
Storyline
- · 3 reports· Attention43
MCP Python SDK exposed an OAuth vulnerability; a fixed version has been releasedThis event
- · 1 reports· Attention37MCP Python SDK cross-origin redirects leak custom request headers
Latest developments
- · 1 reportMCP Python SDK releases v2.3.0
- · 2 reportsMCP Python SDK OAuth flaw causes credential redirection
Progress timeline
- MCP Python SDKMCP Python SDK v2.3.0 released: primarily fixes, three new configuration options
MCP Python SDK released v2.3.0, primarily fixes with three new options. Tools with invalid x-mcp-header annotations now raise InvalidSignature at registration time; previously the server would start normally but the 2026-07-28 client would silently drop the tool. Empty _meta and params are no longer sent with requests, avoiding rejection by some servers. Added max_sse_event_size option (default remains 1 MiB per SSE event), MCPServer(subscriptions=False) can stop offering subscriptions/listen, and Client.call_tool re-lists tools and retries once after HeaderMismatch (-32020).
- CSA Labs ResearchSelectedMCP Python SDK Exposes OAuth Credential Redirect Vulnerability, Fixed in 1.30.0 and 2.2.0
The official MCP Python SDK has a high-severity OAuth vulnerability (CVSS 7.5). A malicious MCP server can redirect the client's OAuth client secret, authorization code, and PKCE proof key to an attacker-controlled endpoint, thereby taking over the downstream identity provider session. The root cause is a missing issuer check in the legacy fallback discovery path: when the server returns HTTP 404 for the standard authorization server discovery request, the SDK directly requests OAuth configuration from that untrusted server and accepts it as-is.
- WebThe Hacker News· Media coverageOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth Credentials(opens the original post in a new tab)
- Date not givenal-ice.aiSelectedCycode discloses Anthropic MCP Python SDK OAuth account takeover vulnerability; fixed versions released
Cycode publicly disclosed Yuval Elbar's coordinated disclosure research on September 28, 2026, pointing out a full account takeover vulnerability in Anthropic's official MCP Python SDK. A malicious MCP server can hijack the SDK's OAuth login flow, obtain the victim's client secret, authorization code, and PKCE proof key, and then exchange them for valid access tokens at the real identity provider. Affected versions are mcp 1.9.1 through 1.29.1 and 2.0.0 through 2.1.1; fixed versions 2.2.0 and 1.30.0 were released on September 7. The attack mechanism is that the server returns 404 to discovery requests, triggering a fallback path where the SDK does not obtain the authorization server URL, issuer validation is skipped, and credential binding and authorization code audience restrictions are based on the same unverified configuration, so all of them fail. Cycode verified with three test groups—attack, control, and escape—and only the attack configuration caused real credentials to leave the local machine.
Related discussion
- Older than 72 hours · Not included in the 72-hour figures
- WebThe Hacker NewsOfficial MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth Credentials(opens the original post in a new tab)