A malicious MCP server could decide where the MCP Python SDK sent your OAuth credentials. The flaw, CVE-2026-115563 (GHSA-qx49-fqc8-xw99), is rated high (CVSS 7.5). If you build or run an MCP client on the mcp package that connects to remote servers over HTTP with OAuth, upgrade to mcp 1.30.0 or 2.2.0, set issuer= on the machine-to-machine providers, and clear stored registrations.
| Question | Short answer |
|---|---|
| Am I affected? | Yes, if your app uses mcp 1.9.1 to 1.29.1 or 2.0.0 to 2.1.1 as an HTTP client with an OAuth provider and may meet an MCP server you do not fully trust |
| Is there a fix? | Yes: mcp 1.30.0 (1.x) and 2.2.0 (2.x) |
| Is upgrading enough? | No. Also pass issuer= to two providers, clear unbound stored registrations, rotate if exposed |
| Are servers or stdio clients affected? | No, per the advisory |
| Does data leave my machine? | Only if your client connected to an untrusted server, which is the attack |
| Is it exploited? | The advisory describes no exploitation in the wild |
What the advisory says
The GitHub advisory was first published on the python-sdk repository on September 28, 2026, reached NVD on November 16 and was added to the GitHub Advisory Database on November 19, 2026. It is also tracked as CVE-2026-115563 at NVD. It covers the OAuth client support in mcp.client.auth. Two things went wrong in affected versions:
- The
issuerin the authorization server metadata was not validated on every discovery path. - Stored or pre-provisioned client credentials were not bound to the authorization server they belong to.
Put together, the MCP server a client connected to could influence where that client's credentials were sent. The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N: network reachable, low complexity, no privileges, no user interaction, confidentiality impact only. The advisory notes that this rating is scored for the unattended providers. With the interactive OAuthClientProvider, a person has to start the sign-in, and scored that way it is 6.5 (UI:R).
This is the Python sibling of an earlier flaw in the TypeScript SDK. We covered that one in MCP TypeScript SDK OAuth flaw CVE-2026-104850, and the Python SDK's earlier advisories in three advisories fixed in 1.30.0 and 2.2.0. The Beam CVE database tracks the package under the MCP Python SDK tool page.
How the attack works, step by step
In the MCP authorization flow, an MCP server tells the client where its authorization server lives, using protected resource metadata. The client then fetches metadata from that authorization server (token endpoint, registration endpoint and the issuer value) and runs the OAuth exchange against it. The client should check that the issuer in the metadata matches the server it expected. In affected versions it did not always do so, and credentials it already held were not tied to any issuer.
The advisory describes two routes for a malicious or compromised MCP server:
- Name its own authorization server. The server lists an authorization server it controls in its protected resource metadata. The client follows it and sends credentials to that token endpoint.
- Impersonate the real one. The server publishes no protected resource metadata, so the client falls back to legacy discovery, and then serves metadata that presents the user's real authorization server as the
issuerwhile pointing the token endpoint somewhere else. The client has nothing recorded to compare against and accepts it.
In both cases the attacker's endpoint receives what the client sends to a token endpoint: the client_secret, the authorization code and the PKCE code_verifier meant for the real server, or, with PrivateKeyJWTOAuthProvider, a signed client assertion. A code plus its verifier, or a signed assertion, can be replayed at the legitimate authorization server, so the attacker can end up with access that works against the real service.
Why the second route is nasty: the user's configuration looks right. The authorization server they registered with is the one named in the metadata. Only the token endpoint is wrong, and without binding the client had no reason to doubt it.
Who is affected
| Line | Affected versions | Condition | Fixed |
|---|---|---|---|
| 1.x | 1.9.1 through 1.29.1 | No issuer check and no credential binding on any path | 1.30.0 |
| 2.x | 2.0.0 through 2.1.1 | Both missing when the server publishes no protected resource metadata (legacy fallback) or answers 403 insufficient_scope | 2.2.0 |
| Both | Every version before the fix | ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider had no way to name the authorization server their credentials belong to | See below |
You are exposed if both of these hold, according to the advisory:
- 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.
Not affected: MCP servers built with the SDK, stdio clients, and clients that attach their own tokens or headers.
What this means if you run AI coding agents
Most people who use Claude Code or Codex do not call mcp.client.auth directly. The exposure is for anyone who builds MCP clients, agent harnesses, internal agent platforms or automation in Python, or who runs a Python tool that embeds the SDK. The advisory does not name off-the-shelf agents that ship it, so check what you build or install, and watch vendor release notes for the tools you use.
Concrete steps:
- Find the version. In the environment your client runs in, run
pip show mcp. For a project, check the lockfile orpip list | grep mcp. - Upgrade to
mcp2.2.0 on the 2.x line or 1.30.0 on the 1.x line, or later. - Set
issuer=if you useClientCredentialsOAuthProviderorPrivateKeyJWTOAuthProvider, for exampleissuer="https://auth.example.com". The advisory is explicit that upgrading changes nothing for these two providers until you do: without it they still follow whichever authorization server the MCP server advertises. Omitting it now emits a deprecation warning and becomes required in 3.0. On 1.30.0 it is aDeprecationWarning, which Python hides by default, so enable warnings in a test run to find unconfigured providers. - Move off
RFC7523OAuthClientProvider. The deprecated 1.x provider has noissueroption. Switch to one of the two providers above. - Clear stored registrations once. A registration saved without an issuer stays unbound, including everything 1.x stored before 1.30.0. Clear the stored OAuth client information so the client registers again. If you pre-registered a client in storage yourself, set
issueron that record instead. - Rotate if there is any doubt. If such a client may have connected to an untrusted MCP server, rotate its client secret and revoke its tokens at the authorization server.
If you cannot upgrade, the advisory says there is no workaround other than connecting OAuth-enabled clients only to MCP servers you trust.
What the fixed versions do
According to the advisory, the patched client:
- works out which issuer it expects before fetching any authorization server metadata, on every path;
- refuses metadata whose
issuerdiffers, raisingOAuthFlowError; - binds stored registrations to that issuer, and discards one bound to a different issuer so the client registers again.
The fix is spread over the linked pull requests (3398, 3431 and 3435) and shipped in the v1.30.0 and v2.2.0 releases.
How to tell whether you were hit
The advisory does not describe in-the-wild exploitation, and it gives no indicator list. Reasonable checks, based on how the attack works:
- Look at your client's outbound HTTPS logs or proxy for token-endpoint requests to hosts that are not your authorization server, especially right after connecting to a newly added or recently changed MCP server.
- Review your authorization server's logs for token use, refresh or code exchange from unfamiliar IP addresses after such a connection.
- Review which remote MCP servers your Python clients were configured to reach since 1.9.1, and treat any you cannot vouch for as a reason to rotate.
These are our reading of the mechanism, not a published detection recipe.
Why the residual risk matters
Two parts of the fix are your responsibility, not the library's. First, the machine-to-machine providers hold credentials the SDK did not obtain itself, so only you can say which authorization server they belong to. That is why issuer= is a parameter and not something the SDK can infer. Second, stored registrations created before the fix have no binding, so the SDK cannot tell whether they were issued by the server it is now talking to. Clearing them is the only safe default.
The unattended providers matter most. A long-lived agent harness that uses a client secret or a signing key to authenticate to many MCP servers, with no human in the loop, has the highest exposure: the first connection to a hostile server can leak a credential that works elsewhere. A desktop tool where a person approves each sign-in to a server they chose is much less exposed, which is what the 6.5 versus 7.5 rating reflects. The advisory does not rank risk by product type, so that comparison is our reading.
This also repeats a lesson from OpenCode's MCP OAuth flaw and the TypeScript SDK issue: a remote MCP server is untrusted input that now sits on an authentication path. Treat every server entry as a trust decision, as described in reviewing MCP servers before you connect an agent.
What Beam can and cannot do here
Beam watches what agents do on your machine and scans MCP configs; it does not read the OAuth code of a client you build. It will not flag this CVE by observing an agent. For your own dependency tree, beam cve check . reads lockfiles, sends only package names and versions, and matches them against AgentBeam's CVE database, exiting with code 2 when a finding meets --fail-on so it can gate CI (see Check dependencies against known CVEs in CI). Whether a given advisory is covered depends on the database; look it up in the CVE database. For the pre-connect habit, beam scan .mcp.json --mcp checks an MCP config against its heuristics and a version-pin check without launching the servers, which helps you notice unfamiliar remote servers before an agent connects. That scan is heuristic: it cannot judge a server's runtime behaviour or decide whether its OAuth metadata is honest. See the practical MCP security guide for the review process.
Frequently asked questions
What is CVE-2026-115563?
It is a high-severity (CVSS 7.5) flaw in the OAuth client of the MCP Python SDK. A malicious or compromised MCP server could direct the client to a token endpoint of its choosing and receive the client secret, authorization code and PKCE code verifier, or a signed client assertion.
Which versions of the mcp package are affected?
Versions 1.9.1 through 1.29.1 on the 1.x line, and 2.0.0 (including alphas) through 2.1.1 on the 2.x line (on 2.x only when the server publishes no protected resource metadata or answers 403 insufficient_scope). Fixed in 1.30.0 and 2.2.0.
Is upgrading enough?
Not for ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider: you must also pass issuer= or they still follow whichever authorization server the MCP server advertises. Stored registrations without an issuer stay unbound and should be cleared.
Are MCP servers or stdio clients affected?
No. The advisory lists servers built with the SDK, stdio clients and clients that attach their own tokens or headers as not affected.
How do I check my version?
Run pip show mcp in the environment your client uses, or pip list | grep mcp. Anything below 1.30.0 on 1.x or below 2.2.0 on 2.x needs the update.
Can Beam detect this vulnerability?
Not by watching agents. Beam's beam cve check can match your lockfile against its CVE database, and its MCP config scan is heuristic and does not read your own client code.
Related reading
- MCP TypeScript SDK OAuth flaw CVE-2026-104850
- MCP Python SDK: three advisories fixed in 1.30.0 and 2.2.0
- OpenCode MCP OAuth flaw on Windows and WSL
- MCP security: review servers before connecting your agent
- MCP security practical guide
- Sources: GitHub advisory, NVD record, python-sdk repository advisory
Versions and advisory details are accurate as of November 19, 2026, the day the advisory was added to the GitHub Advisory Database. Check the advisory for later changes.

