CVE-2026-111771: MCP TypeScript SDK Accepts Invalid Bearer Tokens from Other Services
Summary
CVE-2026-111771: MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service. Affects @modelcontextprotocol/sdk versions >= 1.6.0, < 1.32.0. Fixed in 1.32.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The MCP TypeScript SDK is a software development kit designed to facilitate the integration of various services within the Model Context Protocol ecosystem. It provides functionalities for server-side operations, including authentication and authorization. However, certain versions of the SDK have a vulnerability that allows unauthorized access due to improper validation of bearer tokens, which can lead to significant security risks.
Vulnerability Detail
In affected versions of the MCP TypeScript SDK, the server-side bearer authentication does not verify that a token was issued specifically for the intended server. This means that if an authorization server issues tokens for multiple services, a valid token from one service could be accepted by another service's server. This vulnerability can lead to unauthorized access, allowing attackers to exploit the system using tokens not meant for the target service.
How To Fix
Minimum fixed version
1.32.0
This is the first release that contains the fix.
npm install @modelcontextprotocol/sdk@1.32.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading is not immediately possible, implement a check in the verifyAccessToken function to reject any token whose audience (aud) does not include your server. Example code:
function verifyAccessToken(token) {
const decodedToken = decodeToken(token);
if (!decodedToken.aud.includes('https://mcp.example.com/mcp')) {
throw new Error('Unauthorized');
}
// Continue with the verification process
}
Conclusion
The MCP TypeScript SDK has a significant vulnerability that allows unauthorized access through improperly validated bearer tokens. It is crucial to upgrade to the patched versions and implement the necessary configurations to secure your application. If immediate upgrades are not feasible, a workaround can be applied to mitigate the risk.
See every vulnerability recorded for @modelcontextprotocol/sdk →
FAQ
CVE-2026-111771 is a vulnerability in the MCP TypeScript SDK that allows unauthorized access due to improper validation of bearer tokens.
Affected versions include @modelcontextprotocol/sdk 1.6.0 to 1.31.0, @modelcontextprotocol/server 2.0.0 to 2.2.0, @modelcontextprotocol/express 2.0.0 to 2.0.1, and @modelcontextprotocol/server-legacy 2.0.0 to 2.3.0.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application against this vulnerability using the Vulert playground without any signup.
The CVSS score for this vulnerability is 6.8, indicating a moderate level of severity.
If you cannot upgrade, implement a workaround by rejecting tokens with an audience that does not include your server in the verifyAccessToken function.
References
Related vulnerabilities
Recent vulnerabilities recorded for @modelcontextprotocol/sdk.