{"id":"CVE-2026-111770","kind":"vulnerability","aliases":["CVE-2026-111770","GHSA-jm63-cq47-j5jp"],"related":[],"title":"MCP  TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another","description":"### 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.","summary":"The MCP TypeScript server SDK matched responses to HTTP clients by JSON-RPC id alone, so when one transport or server instance was shared, one client could receive another client's responses and notifications. An attacker who can reach the endpoint can read other clients' MCP traffic.","severity":"high","cvss":7.699999809265137,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"@modelcontextprotocol/server","fixed":["2.3.0"],"affected":">= 2.0.0, < 2.3.0","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["ai-tooling","cwe-362","express","fastify","hono","http-servers","mcp","node","typescript"],"not_affected_if":["createmcphandler-with-factory","per-request-server","sdk-1.26.0-or-later","stdio-servers"],"how_to_check":"Check whether your code creates the MCP transport or McpServer once at startup and reuses it across requests, e.g. a top-level transport or server object used by Express, Hono, Fastify or node handlers.\nCheck the installed version: npm ls @modelcontextprotocol/server\nAffected versions are @modelcontextprotocol/server 2.0.0 through 2.2.0.","fix":"Upgrade @modelcontextprotocol/server to 2.3.0 or later, then change code so a new McpServer and transport are built per request, per session (with sessionIdGenerator), or via a createMcpHandler() factory.\nAfter upgrading, a shared instance fails with ALREADY_CONNECTED or a rejected second request, so the code change is required.","status":"open","published_at":"2026-10-20T20:07:29+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","triaged_at":"2026-10-23T20:56:07+00:00","updated_at":"2026-10-23T20:56:07+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-10-23T20:56:07Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade @modelcontextprotocol/server to 2.3.0 or later, then change code so a new McpServer and transport are built per request, per session (with sessionIdGenerator), or via a createMcpHandler() factory.\nAfter upgrading, a shared instance fails with ALREADY_CONNECTED or a rejected second request, so the code change is required.","reach":"internet","impact":"medium","summary":"The MCP TypeScript server SDK matched responses to HTTP clients by JSON-RPC id alone, so when one transport or server instance was shared, one client could receive another client's responses and notifications. An attacker who can reach the endpoint can read other clients' MCP traffic.","category":"ai-tooling","who_cares":["mcp","typescript","node","http-servers","express","hono","fastify"],"confidence":0.8,"needs_auth":"no","worst_case":"Other clients' MCP responses and notifications can be delivered to an attacker","analyst_note":"","how_to_check":"Check whether your code creates the MCP transport or McpServer once at startup and reuses it across requests, e.g. a top-level transport or server object used by Express, Hono, Fastify or node handlers.\nCheck the installed version: npm ls @modelcontextprotocol/server\nAffected versions are @modelcontextprotocol/server 2.0.0 through 2.2.0.","needs_analyst":false,"not_affected_if":["stdio-servers","createmcphandler-with-factory","sdk-1.26.0-or-later","per-request-server"],"user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000615,"input_tokens":3349,"output_tokens":561,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-111770':20A,28A '-2026':19A,27A '-362':34B '0':144C '1.26.0':223C '2.0.0':203C '2.2.0':205C '2.3.0':230C 'affect':94C,153C,200C,207C,249C,323C 'ai':31B 'ai-tool':30B 'alon':59B,138C 'alreadi':260C 'also':234C 'anoth':17A,73B,111C 'app':250C 'attack':80B 'build':213C,280C,289C 'call':219C,286C 'cannot':316C 'chang':237C,270C,321C 'client':13A,53B,70B,74B,89B,105C,112C,116C,140C,159C 'code':167C,239C 'collid':147C 'connect':132C,257C,261C 'could':71B,102C 'cq47':24A 'creat':168C 'createmcphandl':208C,275C 'cve':18A,26A 'cwe':33B 'deliv':10A,103C 'endpoint':85B,164C 'everi':218C,285C 'exampl':190C 'express':35B,193C 'factori':211C,278C 'fail':251C 'fastifi':36B,194C 'fix':226C,322C 'ghsa':22A 'ghsa-jm63-cq47-j5jp':21A 'handler':300C 'happen':114C 'hono':37B 'http':12A,39B,52B,101C,163C 'http-server':38B 'id':58B,137C,146C 'insid':297C 'instanc':9A,66B,126C 'instead':177C 'j5jp':25A 'jm63':23A 'json':56B,135C 'json-rpc':55B,134C 'keep':306C 'later':225C,232C 'match':49B,129C 'mcp':1A,41B,45B,90B,97C 'mcpserver':123C,283C,292C,308C 'messag':15A,127C 'modelcontextprotocol/hono':192C 'modelcontextprotocol/sdk':222C 'modelcontextprotocol/server':29A,202C,229C 'need':235C 'new':215C,282C,291C,295C 'node':42B,196C 'normal':149C 'notif':78B,109C 'number':141C 'one':11A,62B,69B,104C,118C,122C,158C,272C,307C,310C 'pass':276C 'pattern':199C 'per':180C,183C,287C,301C,312C 'reach':83B,99C,161C 'read':87B 'readm':189C 'receiv':72B 'refus':243C 'reject':258C,266C 'releas':187C 'request':142C,181C,252C,269C,288C,299C 'respons':50B,76B,107C 'rpc':57B,136C 'sdk':4A,48B,139C,241C 'second':256C,268C 'server':3A,8A,40B,47B,65B,98C,125C,173C,216C,221C 'session':184C,302C,313C 'sessionidgener':304C 'set':303C 'share':5A,68B,117C,246C 'show':197C 'startup':176C 'stateless':119C,264C 'stdio':220C 'summari':92C 'tool':32B 'traffic':91B 'transport':6A,63B,120C,170C,265C,296C,311C 'typescript':2A,43B,46B 'upgrad':227C,254C,317C 'use':150C 'version':95C,201C,324C 'yes':154C 'yet':318C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-20T20:07:29+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-jm63-cq47-j5jp","url":"https://github.com/advisories/GHSA-jm63-cq47-j5jp","severity":"high","published_at":"2026-10-20T20:07:29+00:00","modified_at":"2026-10-20T20:08:02+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","fetched_at":"2026-10-23T19:11:32+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}