- A malicious or compromised MCP server could direct OAuth credentials to a token endpoint of its choosing.
- The affected SDK could send a client secret, authorization code and PKCE proof key to an attacker-controlled token endpoint.
- The maintainers fixed the flaw in MCP 2.2.0 and 1.30.0 or later.
Cycode disclosed on Sep 28, 2026, that a flaw in the MCP Python SDK could let a malicious or compromised MCP server redirect OAuth credentials to an attacker-controlled token endpoint.
The affected client configurations could expose a client secret, authorization code and PKCE proof key. The issue affected HTTP MCP clients using specified OAuth providers and access to legitimate authorization-server credentials.
The MCP Python SDK is the official Python SDK for building MCP servers and clients, The Hacker News said. The advisory and Cycode did not report attacks using the flaw, and The Hacker News said none had been reported elsewhere.
On this page
Missing issuer checks allowed credential redirection
The flaw resulted from missing issuer validation on some discovery paths and missing binding of stored credentials to their authorization server. A malicious MCP server could supply misleading authorization-server metadata and direct credentials to its chosen token endpoint.
In the interactive OAuth scenario, the victim could see the genuine login page before the resulting credentials were sent to the attacker. Cycode described the point this way: “The login page is real – that’s what makes it work”.
Provider type changed the CVSS score
The interactive OAuth provider scenario was rated 6.5 because a person must start the sign-in. The two unattended providers, ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider, were rated 7.5 because they run machine to machine without a login page.
The release now rejects authorization-server metadata when its issuer differs from the server for which the metadata was fetched. It also stops the OAuth flow instead of falling back to legacy endpoints when protected-resource metadata cannot be fetched because of a 5xx or 429 response.
Cycode published after coordinated disclosure
Cycode said it reported the issue through Anthropic’s MCP team security process and published after coordinated disclosure. The Hacker News said the issuer checks appeared in the 1.30.0 and 2.2.0 release notes on Sep 7, before Cycode’s Sep 28 publication and the advisory that followed that day.
The maintainers fixed the flaw in MCP versions 2.2.0 and 1.30.0 or later. Users of the two machine-to-machine providers must also pass issuer= because upgrading alone does not stop them from following the authorization server advertised by the MCP server.
The maintainers said users should clear stored OAuth client information after upgrading so the client registers again with an issuer binding. Users whose clients may have connected to an untrusted MCP server should rotate client secrets and revoke tokens at the authorization server.
What to do now
- Upgrade to mcp 2.2.0 or 1.30.0 or later.
- Clear stored OAuth client information once so the client registers again with an issuer binding.
- Rotate your client secret and revoke its tokens at the authorization server if your client may have connected to an untrusted MCP server.
FAQ
What happened to the MCP Python SDK?
A malicious or compromised MCP server could direct credentials to a token endpoint of its choosing.
Which MCP Python SDK clients were affected?
Affected configurations used HTTP MCP clients with specified OAuth providers and access to legitimate authorization-server credentials. MCP servers built with the SDK, local stdio clients and clients attaching their own tokens or headers were not affected.
Was the MCP Python SDK flaw exploited?
The advisory and Cycode did not report attacks using the flaw, and The Hacker News said none had been reported elsewhere.
How do I fix the MCP Python SDK flaw?
Upgrade to mcp 2.2.0 or 1.30.0 or later and clear stored OAuth client information after upgrading.
What credentials could the flaw expose?
The affected SDK could send a client secret, authorization code and PKCE proof key to an attacker-controlled token endpoint.
Sources
- OAuth client could send credentials to an authorization server chosen by the MCP server, GitHubPrimary
- Release v1.30.0 · modelcontextprotocol/python-sdk, GitHubPrimary
- Cycode Uncovers Account Takeover in MCP Python SDK - Cycode, CycodePrimary
- Official MCP Python SDK Flaw Can Let Malicious Servers Steal OAuth Credentials, The Hacker News
- Lunex Stealer Abuses AMD Driver to Disable Security Monitoring and Steal Browser Credentials, The Hacker News
- MCP Python SDK patches high-risk OAuth credential flaw, Arabian Post
How we checked this story
| Claim | Source | Status |
|---|---|---|
| Cycode said a malicious MCP server could trick the SDK into sending login credentials to an attacker instead of the real login provider. | Cycode | Confirmed |
| The flaw resulted from missing issuer validation on some discovery paths and missing binding of stored credentials to their authorization server. | MCP Python SDK maintainers, via GitHub | Confirmed |
| The interactive attack could show the victim the genuine login page before sending the resulting credentials to the attacker. | Cycode | Confirmed |
| The advisory and Cycode did not report attacks using the flaw, and The Hacker News said none had been reported elsewhere. | The Hacker News | Attributed |
| Cycode said it reported the issue through the MCP team’s security process and published after coordinated disclosure. | Cycode | Confirmed |
| The Hacker News said the flaw was rated high, with a score of 7.5, for two providers that run without a person present. | The Hacker News | Attributed |
| Arabian Post said the 7.5 CVSS score applies to unattended providers where exploitation requires no user interaction. | Arabian Post | Attributed |
| The OAuth client now rejects authorization-server metadata whose issuer differs from the server it was fetched for. | MCP Python SDK maintainers, via GitHub | Confirmed |
| The release stops the OAuth flow instead of using legacy endpoints when protected-resource metadata cannot be fetched because of a 5xx or 429 response. | MCP Python SDK maintainers, via GitHub | Confirmed |
| The release notes identify max_sessions= and session_idle_timeout= as new FastMCP settings. | MCP Python SDK maintainers, via GitHub | Confirmed |
| Ontinue said lunexStealer uses a vulnerable AMD Radeon Software driver affected by CVE-2023-20598 to escalate privileges and blind security processes. | Ontinue, via The Hacker News | Attributed |
| Ontinue said the malware targets seven Chromium-based browsers and exfiltrates cryptocurrency wallets. | Ontinue, via The Hacker News | Attributed |
| cycode.com published its report on Sep 28, 2026. | cycode.com | Confirmed |
Could not verify
- How many applications or users were affected is not established
- Whether the flaw was exploited in the wild is not established
- Whether any accounts were compromised outside Cycode’s demonstration is not established



