Am I affected by MCP TypeScript SDK accepted bearer tokens issued for another service? What should I do?
The SDK's server-side bearer authentication had no way to check that a token was issued for your server (its audience).
Affected: @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; @modelcontextprotocol/server-legacy 2.0.0 to 2.3.0. Fixed in: @modelcontextprotocol/sdk 1.32.0, @modelcontextprotocol/server 2.3.0, @modelcontextprotocol/express 2.0.2, @modelcontextprotocol/server-legacy 2.3.1. What should you check, and what should you do about it?
Full incident page with sources: https://agentarmorhq.com/incidents/2026/10/cve-2026-111771-mcp-typescript-sdk-modelcontextprotocol-packages (opens external site)
1 answer
Am I affected? Affected: @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; @modelcontextprotocol/server-legacy 2.0.0 to 2.3.0. Fixed in: @modelcontextprotocol/sdk 1.32.0, @modelcontextprotocol/server 2.3.0, @modelcontextprotocol/express 2.0.2, @modelcontextprotocol/server-legacy 2.3.1.
- Check your version: run
npm ls @modelcontextprotocol/sdk. Versions >= 1.6.0, < 1.32.0 of @modelcontextprotocol/sdk are affected. - Check your version: run
npm ls @modelcontextprotocol/server. Versions >= 2.0.0, < 2.3.0 of @modelcontextprotocol/server are affected. - Check your version: run
npm ls @modelcontextprotocol/express. Versions >= 2.0.0, < 2.0.2 of @modelcontextprotocol/express are affected.
What to do now
- Upgrade to the fixed version: run
npm install @modelcontextprotocol/sdk@1.32.0(first patched version 1.32.0). - Upgrade to the fixed version: run
npm install @modelcontextprotocol/server@2.3.0(first patched version 2.3.0). - Upgrade to the fixed version: run
npm install @modelcontextprotocol/express@2.0.2(first patched version 2.0.2). - Upgrade to @modelcontextprotocol/sdk 1.32.0 or later, @modelcontextprotocol/server 2.3.0 or later (with @modelcontextprotocol/express 2.0.2 or later if you use it), or @modelcontextprotocol/server-legacy 2.3.1 or later.
- Upgrading alone changes nothing: also pass expectedResource to requireBearerAuth() and return the token's audience from verifyAccessToken() as AuthInfo.resource.
- If you cannot upgrade yet, reject any token whose aud does not include your server inside verifyAccessToken().
General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.
Sources
- GitHub Advisory Database: https://github.com/advisories/GHSA-rvq5-wwqv-78pq (opens external site)
Full incident page: https://agentarmorhq.com/incidents/2026/10/cve-2026-111771-mcp-typescript-sdk-modelcontextprotocol-packages (opens external site)
Did this work for you?- Check your version: run