{"id":"CVE-2026-111770","aliases":["GHSA-jm63-cq47-j5jp"],"title":"MCP  TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another","summary":"MCP  TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another","severity":"high","cvss":7.7,"cwe":["CWE-362"],"vendor":"modelcontextprotocol","product":"@modelcontextprotocol/server","ecosystem":"npm","affected":["@modelcontextprotocol/server >= 2.0.0, < 2.3.0"],"patched":["@modelcontextprotocol/server 2.3.0"],"published":"2026-10-20","updated":"2026-10-20","sourceUpdated":"2026-10-20T20:08:02Z","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-jm63-cq47-j5jp","references":[{"url":"https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-jm63-cq47-j5jp"},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/pull/2918"},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/commit/84804c22e45a662675a198f853b7f00063838a8d"},{"url":"https://github.com/advisories/GHSA-jm63-cq47-j5jp"}],"tags":["ghsa","npm"],"ingestedAt":"2026-10-20T20:18:14.522Z","slug":"CVE-2026-111770","body":"## Overview\n\n### Summary\nIn affected versions, an MCP server reached over HTTP could deliver one client's responses and notifications to another client. This happened when clients shared one stateless transport, or one `McpServer` or `Server` instance.\n\nMessages were matched to a connection by JSON-RPC `id` alone. SDK clients number requests from 0, so ids collide in normal use.\n\n### Am I affected?\nYes, if more than one client can reach your HTTP endpoint and your code creates the transport or the server once at startup, instead of once per request or per session. Until this release, the README examples of `@modelcontextprotocol/hono`, `express`, `fastify` and `node` showed that pattern.\n\nAffected versions: `@modelcontextprotocol/server` 2.0.0 through 2.2.0.\n\nNot affected:\n\n- `createMcpHandler()` with a factory that builds a new server on every call\n- stdio servers\n- `@modelcontextprotocol/sdk` 1.26.0 and later\n\n### Fix\nUpgrade to `@modelcontextprotocol/server` 2.3.0 or later.\n\n**You also need to change your code.** The SDK now refuses to be shared, so an affected app fails requests after upgrading: a second `connect()` rejects with `ALREADY_CONNECTED`, and a stateless transport rejects its second request.\n\nChange to one of these:\n\n- **`createMcpHandler()`:** pass a factory that builds a new `McpServer` on every call.\n- **Per request:** build a new `McpServer` and a new transport inside the request handler.\n- **Per session:** set `sessionIdGenerator` and keep one `McpServer` and one transport per session.\n\nIf you cannot upgrade yet, the same change fixes affected versions.\n\n## Affected packages\n\n- `@modelcontextprotocol/server >= 2.0.0, < 2.3.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `@modelcontextprotocol/server 2.3.0`","depth":"twilight","depthScore":42,"depthScoreParts":{"impact":42.4,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}