---
id: "CVE-2026-111770"
kind: "vulnerability"
aliases: ["CVE-2026-111770", "GHSA-jm63-cq47-j5jp"]
title: "MCP  TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another"
severity: "high"
cvss: 7.699999809265137
epss: null
exploited: false
status: "open"
category: "ai-tooling"
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"]
published_at: "2026-10-20T20:07:29+00:00"
first_seen_at: "2026-10-23T19:11:32+00:00"
updated_at: "2026-10-23T20:56:07+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-jm63-cq47-j5jp", "first_seen_at": "2026-10-23T19:11:32+00:00"}]
---

# MCP  TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@modelcontextprotocol/server affected >= 2.0.0, < 2.3.0 fixed 2.3.0

## 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.
Check the installed version: npm ls @modelcontextprotocol/server
Affected 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.
After upgrading, a shared instance fails with ALREADY_CONNECTED or a rejected second request, so the code change is required.

## Timeline

- 2026-10-23T19:11:32+00:00 ghsa https://github.com/advisories/GHSA-jm63-cq47-j5jp

## From the sources

### Summary
In 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.

Messages were matched to a connection by JSON-RPC `id` alone. SDK clients number requests from 0, so ids collide in normal use.

### Am I affected?
Yes, 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.

Affected versions: `@modelcontextprotocol/server` 2.0.0 through 2.2.0.

Not affected:

- `createMcpHandler()` with a factory that builds a new server on every call
- stdio servers
- `@modelcontextprotocol/sdk` 1.26.0 and later

### Fix
Upgrade to `@modelcontextprotocol/server` 2.3.0 or later.

**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.

Change to one of these:

- **`createMcpHandler()`:** pass a factory that builds a new `McpServer` on every call.
- **Per request:** build a new `McpServer` and a new transport inside the request handler.
- **Per session:** set `sessionIdGenerator` and keep one `McpServer` and one transport per session.

If you cannot upgrade yet, the same change fixes affected versions.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
