CVE-2026-116684: Model Context Protocol Python SDK: Server bearer-token authentication accepts tokens issued for a different resource server
The MCP Python SDK (mcp on PyPI) accepted bearer tokens that were issued for a different service. Its server-side auth never checked the token's audience. If your authorization server issues tokens for several services, a token meant for another one works against your MCP server. Fixed in mcp 1.30.0 and 2.2.0, but you must also turn the check on.
Published Oct 27, 2026 · Analysis Oct 28, 2026
What an attacker can do
In affected versions, a server that uses auth=AuthSettings(...) with a token_verifier= relies on the verifier to say whether a token is valid. The SDK had no built-in step to confirm the token was minted for this MCP server (its aud claim). A token that is valid for service A on the same authorization server therefore passes on service B.
The attacker needs a valid token from that authorization server for some other resource, so this is a confused-deputy problem rather than anonymous access. The CVSS vector (network, high complexity, low privileges) reflects that. In practice, anyone holding a legitimate token for a sibling service, or a malicious sibling service that receives user tokens, can replay it against your MCP server and use its tools with the original user's identity. MCP servers often front files, databases or SaaS accounts, so the exposure depends on what your tools can do.
You are not exposed if your own TokenVerifier already rejects tokens whose aud does not include your server, or if your authorization server issues tokens for your server only.
Who is affected
Affected: mcp 1.10.0 through 1.29.1, and mcp 2.0.0 through 2.1.1. You are affected only if your HTTP server uses the SDK's bearer authentication (AuthSettings with token_verifier), the authorization server also issues tokens for other services, and your TokenVerifier does not check aud itself.
Check the installed version:
pip show mcpThen review your TokenVerifier.verify_token() implementation for an audience check.
mcp
- Ecosystem
- PyPI
- Affected
- >= 2.0.0, < 2.2.0
- Fixed in
- 2.2.0
- Check
pip show mcp
mcp
- Ecosystem
- PyPI
- Affected
- >= 1.10.0, < 1.30.0
- Fixed in
- 1.30.0
- Check
pip show mcp
How to fix it
Upgrade to mcp 1.30.0 or later on 1.x, or mcp 2.2.0 or later on 2.x:
pip install --upgrade "mcp>=1.30.0,<2"Upgrading alone changes nothing. The new validate_token_resource setting is off by default. Turn the check on with two changes together:
- Set validate_token_resource=True in AuthSettings, with resource_server_url set to the audience your authorization server puts in tokens for your server.
- Return the token's audience from verify_token() as AccessToken.resource.
With only the first change, every request gets 401. If your verifier already checks aud, set validate_token_resource=False to silence the new deprecation warning; the default becomes True in 3.0. If you cannot upgrade, reject any token whose aud does not include your server inside verify_token(). That closes the issue on every version.
How to tell if you were hit
Compare the aud claim of tokens your server accepted with your server's own resource URL. Log the audience in verify_token() if you do not already. Any accepted token whose aud names another service points to cross-service reuse. Also check your authorization server's logs for tokens issued to other resources that later show up in requests to your MCP endpoint.
After the upgrade, a DeprecationWarning appears at startup when resource_server_url is set and validate_token_resource is not, which helps find servers you have not configured yet.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
In affected versions, the SDK's server-side bearer authentication had no way to check that a token was issued for your server (its audience). Where one authorization server issues tokens for several services, a valid token for another service was also accepted by your MCP server.
Am I affected?
Yes, if your HTTP server uses the SDK's bearer authentication (auth=AuthSettings(...) with token_verifier=), its authorization server also issues tokens for other services, and your TokenVerifier does not check the token's audience (aud) itself.
Affected versions:
mcp1.10.0 through 1.29.1mcp2.0.0 through 2.1.1
Fix
Upgrade to:
- 1.x:
mcp1.30.0 or later - 2.x:
mcp2.2.0 or later
Upgrading alone changes nothing. The patched versions add a validate_token_resource setting that is off unless you set it. To turn the check on, make both of these changes together:
- Set
validate_token_resource=TrueinAuthSettings, withresource_server_urlset to the audience your authorization server puts in tokens for your server. - Return the token's audience from
verify_token()asAccessToken.resource.
A token for another service then gets 401. With only the first change, every request gets 401.
If your TokenVerifier already checks the audience, set validate_token_resource=False to silence the deprecation warning. The setting will default to True in 3.0.
If you cannot upgrade yet, reject any token whose aud does not include your server inside verify_token(). That closes the issue on every version.
Credited to u-ktdi.
Questions
- I upgraded to mcp 1.30.0. Am I protected?
Not yet. The check is opt-in. You must set validate_token_resource=True in AuthSettings and return the audience from verify_token() as AccessToken.resource.
- Why does every request return 401 after I set validate_token_resource=True?
Your TokenVerifier is not populating AccessToken.resource. The server compares it with resource_server_url, so the verifier must return the token's audience.
- Does this affect stdio MCP servers?
The advisory covers HTTP servers that use the SDK's bearer authentication. It does not describe stdio servers, which do not use bearer tokens.
- Is there a workaround without upgrading?
Yes. Reject any token whose aud does not include your server inside verify_token(). The advisory says this closes the issue on every version.
References
Read for this analysis:
- https://github.com/advisories/GHSA-w4fh-qvv9-3v23
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0
- https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-w4fh-qvv9-3v23
- https://github.com/modelcontextprotocol/python-sdk/pull/3447
- https://github.com/modelcontextprotocol/python-sdk/pull/3451
- https://github.com/modelcontextprotocol/python-sdk/commit/0c9136841ff092987a20700ff9c2c9789bda2f40
- https://github.com/modelcontextprotocol/python-sdk/commit/8c2fa6eabacde869d75568e33b9d466b58c2f512
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More MCP Python SDK vulnerabilities
All MCP Python SDK entriesCVE-2026-115563
Model Context Protocol Python SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
high7.5Nov 19, 2026CVE-2026-116685
Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carrying custom headers and bodies
medium5.9Oct 27, 2026CVE-2026-116686
Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool results against output schemas
medium6.5Oct 27, 2026CVE-2026-59951
MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion
medium7.5Oct 15, 2026CVE-2026-52869
MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
high7.1Jul 16, 2026CVE-2026-52870
MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks
high7.6Jul 16, 2026
