CVE-2026-111770: Race Condition
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 ALREADYCONNECTED, 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/@modelcontextprotocol/serverto a version that resolves this vulnerability.Fixed in 2.3.0 - Upgrade
Upgrade
@modelcontextprotocol/serverto a version that resolves this vulnerability.Fixed in 2.3.0 - Configuration
Change the code so each request builds a new McpServer and transport, or configure sessionIdGenerator and keep one McpServer and one transport per session. When using createMcpHandler(), pass a factory that builds a new McpServer on every call.
MCP server and transport server/transport lifecycle = Create per request or per session
Event History
Frequently Asked Questions
Which deployments are exposed to cross-client message delivery?
HTTP MCP endpoints are affected when more than one client can reach them and the application creates a transport, McpServer, or Server once at startup rather than per request or session. The README examples for @modelcontextprotocol/hono, express, fastify, and node used this affected pattern until this release.
What does an attacker need to exploit this issue?
An attacker needs network access to the HTTP MCP endpoint as a client. No privileges or user interaction are required; request IDs can collide during normal SDK client use because clients begin numbering requests at 0.
Are any configurations known not to be affected?
stdio servers are not affected. HTTP applications using createMcpHandler() with a factory that creates a new server for every call are also not affected, and @modelcontextprotocol/sdk 1.26.0 and later is listed as not affected.
What should be changed during remediation?
Upgrade @modelcontextprotocol/server to 2.3.0 or later and change the application to create a distinct server or transport per request or session. Upgrading without changing affected shared-instance code will cause requests to fail: a second connect() is rejected with ALREADY_CONNECTED, and a stateless transport rejects its second request.