Guide · November 23, 2026
Python MCP SDK OAuth flaw (CVE-2026-115563): check your version, upgrade, rotate
If your app or agent uses the official Python MCP SDK (mcp on PyPI) as an OAuth client over HTTP, a hostile MCP server could route your OAuth credentials to a token endpoint it controls. It would then receive your client_secret, the authorization code and the PKCE code_verifier, or a signed client assertion if you use private-key JWT. GitHub added the advisory to its database on Nov 19, 2026 as GHSA-qx49-fqc8-xw99 / CVE-2026-115563, rated high (CVSS 7.5). It's fixed in mcp 1.30.0 and 2.2.0.
Quick check: run pip show mcp (or search your lockfile for mcp). Versions 1.9.1 to 1.29.x and 2.0.0a1 to 2.1.x are affected. Then search your code for OAuthClientProvider, ClientCredentialsOAuthProvider, PrivateKeyJWTOAuthProvider or RFC7523OAuthClientProvider. If you see both, upgrade today.
What went wrong
According to the advisory, the SDK's OAuth client (mcp.client.auth) let the MCP server it connected to decide where the client's credentials went:
- it didn't validate the authorization server's
issueron every discovery path, and - it didn't tie stored or pre-provisioned client credentials to the authorization server they belong to.
A malicious or compromised MCP server could name its own authorization server in its protected resource metadata. Or it could publish none and serve metadata that names your real authorization server as the issuer. Either way, your client sends the credentials meant for the real server to the attacker's token endpoint.
Are you affected?
Only if both of these are true:
- Your code 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 don't fully trust while it holds credentials for a real 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. Agent setups that let users paste in any MCP server URL are the riskiest case.
The 7.5 score is for the unattended providers (client credentials, private-key JWT). With the interactive OAuthClientProvider a person has to start the sign-in, and the advisory scores that case 6.5.
1. Find the version you actually run
# installed in this environment
pip show mcp | grep -i '^version'
# pinned in the repo
grep -RniE '^\s*"?mcp(\[[^]]*\])?\s*[=<>~]' requirements*.txt pyproject.toml 2>/dev/null
grep -A1 -E '^name = "mcp"$' poetry.lock uv.lock 2>/dev/null
# uses an OAuth provider?
grep -RnE 'OAuthClientProvider|ClientCredentialsOAuthProvider|PrivateKeyJWTOAuthProvider|RFC7523OAuthClientProvider' --include='*.py' .
2. Upgrade
pip install -U "mcp>=1.30.0" # 1.x line
# or, if you're on 2.x:
pip install -U "mcp>=2.2.0"
# uv / poetry users: uv lock --upgrade-package mcp · poetry update mcp
Commit the updated lockfile and redeploy. In the fixed versions the client works out which issuer it expects before fetching authorization server metadata, refuses metadata whose issuer doesn't match (OAuthFlowError), and binds stored registrations to that issuer.
3. Set issuer= if you use client credentials or private-key JWT
This is the step people will miss. The advisory says upgrading changes nothing for ClientCredentialsOAuthProvider or PrivateKeyJWTOAuthProvider until you also pass issuer=. Without it they still follow whichever authorization server the MCP server advertises.
auth = ClientCredentialsOAuthProvider(
server_url=server_url,
storage=storage,
client_id=os.environ["MCP_CLIENT_ID"],
client_secret=os.environ["MCP_CLIENT_SECRET"],
issuer="https://auth.example.com", # your real authorization server
)
On 1.30.0, leaving it out only raises a DeprecationWarning, which Python hides by default, so you won't see a warning. The advisory says it becomes required in 3.0. RFC7523OAuthClientProvider has no issuer option, so move to one of the two providers above.
4. Clear old registrations and rotate
- Stored registrations: anything stored without an issuer stays unbound after the upgrade, including everything 1.x saved before 1.30.0. Clear the stored OAuth client information once so the client registers again. If you put a pre-registered client in storage yourself, set
issueron that record instead. - Past exposure: if the client may have connected to an MCP server you don't control, rotate its client secret and revoke its tokens at the authorization server.
- Can't upgrade yet? The advisory lists no workaround other than connecting OAuth-enabled clients only to MCP servers you trust.
Running a local MCP server over HTTP?
A related advisory published the same day: when the Todoist MCP server ran in its optional HTTP mode, a malicious website could use DNS rebinding to reach it on 127.0.0.1 and call its tools (GHSA-833v-v58w-294h, CVE-2026-76807, fixed in @doist/todoist-mcp 10.3.3). If you run your own local HTTP MCP server, check the Host and Origin headers and require a token, even on localhost.
Building an agent or app with AI tools? Run the free live-site check to see whether it serves a .env, leaks keys in its JavaScript, or exposes data while logged out. Our paid repo report now flags affected mcp pins in requirements files, pyproject.toml and lockfiles.
Source: MCP Python SDK security advisory GHSA-qx49-fqc8-xw99 (fix releases v1.30.0, v2.2.0).
The VibePreflight team