Rightshold™ Sign up

Answers · MCP security

Our MCP server is built on the official TypeScript SDK and the October 2026 advisories just reached NVD (shared transports leaking between clients, tokens for other services accepted, memory exhaustion). Which version fixes them, and is bumping the package enough?

Last updated

TL;DR: Upgrade to @modelcontextprotocol/sdk 1.32.0 or later on 1.x, or @modelcontextprotocol/server 2.3.0 or later on 2.x (plus @modelcontextprotocol/express 2.0.2 if you use it), but for three of the four server-side fixes the version bump alone doesn't close the hole. The shared-transport fix (GHSA-jm63-cq47-j5jp, CVE-2026-111770) makes the SDK refuse to be shared, so an app that built one transport or McpServer at startup starts failing with ALREADY_CONNECTED until you build one per request or per session. The token-audience fix (GHSA-rvq5-wwqv-78pq, CVE-2026-111771) adds an expectedResource setting that is off by default, and the memory-exhaustion fix (GHSA-46jr-4wx8-v453, CVE-2026-111768) adds a maxToolInputElements option that is also off by default; each advisory says in bold that upgrading alone changes nothing. Only the request size and batch limits (GHSA-f897-62hf-6gxq, fixed in sdk 1.30.1 and server 2.1.0) switch on by themselves: bodies over 4 MiB get 413 and batches over 100 messages get 400. stdio-only servers aren't affected by any of the four.

What should I check, step by step?

1. Run npm ls @modelcontextprotocol/sdk @modelcontextprotocol/server @modelcontextprotocol/express @modelcontextprotocol/node @modelcontextprotocol/hono @modelcontextprotocol/server-legacy and write down every version you actually ship, including ones pulled in by other packages.

  1. Upgrade to sdk 1.32.0 or later (1.x), or server 2.3.0 or later with express 2.0.2, node 2.1.0 and hono 2.0.1 or later for whichever of those you have installed (2.x). server-legacy needs 2.3.1 or later for the audience fix.
  2. Search your code for a transport or McpServer created once at module level and reused across HTTP requests. Replace it with createMcpHandler() and a factory that builds a new McpServer on every call, a new server and transport inside the request handler, or one server and transport per session with sessionIdGenerator set.
  3. Turn on the audience check in two places at once: pass expectedResource (the URL your authorization server puts in tokens for your server) to requireBearerAuth(), and return the token's audience from verifyAccessToken() as AuthInfo.resource. With only the first change, every request gets 401.
  4. If you can't upgrade yet, reject any token whose aud doesn't include your server inside verifyAccessToken(). The advisory says that closes the audience issue on every version.
  5. Set maxToolInputElements just above the largest input your tools need, for example new McpServer(info, { maxToolInputElements: 10_000 }). It counts array elements and object keys in a call's arguments; a call over the limit gets an isError: true result.
  6. Lower maxRequestBodySize to what your tools need, on the transport or createMcpHandler(). If you parse the body yourself with express.json() or Fastify, set that parser's limit too, and remember a body parser doesn't limit JSON-RPC batch length.
  7. Add a test that sends two clients' requests with the same JSON-RPC id at the same time and checks each gets only its own response, a test that a token minted for another service gets 401, and a test that an oversized array argument is refused.

What do the October 2026 MCP TypeScript SDK server advisories fix, and which fixes are off by default?

GHSA-jm63-cq47-j5jp (CVE-2026-111770, high, published October 15, 2026) affects @modelcontextprotocol/server 2.0.0 through 2.2.0. An HTTP server could deliver one client's responses and notifications to another when clients shared one stateless transport or one McpServer or Server instance, because messages were matched to a connection by JSON-RPC id alone and SDK clients number requests from 0, so ids collide in normal use. The advisory notes that the README examples for the hono, express, fastify and node packages showed that pattern until this release. Not affected: createMcpHandler() with a factory that builds a new server per call, stdio servers, and @modelcontextprotocol/sdk 1.26.0 and later.

Why does an MCP server fail with ALREADY_CONNECTED after upgrading the TypeScript SDK?

After the shared-transport fix, a second connect() on the same server rejects with ALREADY_CONNECTED and a stateless transport rejects its second request. That's deliberate: the advisory says the SDK now refuses to be shared, so an affected app fails requests after upgrading instead of silently crossing clients' data.

How do you test that the MCP SDK audience check and input limits are actually enabled?

A green dependency scan only proves the version. For the audience fix, send a token issued by your authorization server for a different service and expect 401; if you get 200, expectedResource or AuthInfo.resource is missing. For the input bound, call a tool with an array argument larger than maxToolInputElements and expect an isError result, not a crash or a slow response.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “I just upgraded my MCP server to the patched TypeScript SDK and switched to building a server per request. Check what my server serves now: has its tool list changed from what was recorded, and does any tool definition carry hidden text?”

One-click setup

{
  "tool": "precall_check",
  "arguments": {
    "url": "<your server's https MCP URL>"
  }
}

Rightshold reports what an MCP endpoint serves and what it has on record about it. It doesn't scan your code, dependencies or configuration, and an unchanged answer isn't a finding that a server is patched. Advisory details are as published by the MCP TypeScript SDK maintainers on GitHub and read on November 11, 2026; advisories get updated, so confirm fixed versions on the linked pages before you upgrade.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'