GHSA-jm63-cq47-j5jp: Race Condition

Published Oct 20, 2026
·
Updated

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

1 affected componentFixes available
npm/@modelcontextprotocol/server>=2.0.0<2.3.0
2.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@modelcontextprotocol/server to a version that resolves this vulnerability.

    Fixed in 2.3.0
  2. Upgrade

    Upgrade @modelcontextprotocol/server to a version that resolves this vulnerability.

    Fixed in 2.3.0
  3. Configuration

    For each request, build a new McpServer and a new transport inside the request handler. For each session, set 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 lifecycle server/transport instantiation scope = per request or per session

Event History

Oct 20, 2026
Advisory Published
via GitHub·08:07 PM
Data Sourced
via GitHub·08:07 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

HTTP MCP endpoints are affected when more than one client can reach them and the application creates a transport or server once at startup rather than once per request or session. The documented startup-sharing pattern affected examples for the hono, express, fastify, and node integrations.

2

What does an attacker need to exploit this?

An attacker needs network access to the HTTP MCP endpoint. Exploitation depends on sharing a stateless transport or McpServer/Server instance with another client; normal SDK request IDs can collide because clients begin numbering requests at 0.

3

How can we determine whether our application is affected?

Check whether it uses @modelcontextprotocol/server versions 2.0.0 through 2.2.0 and inspect server and transport lifecycle code. An application is affected if a single instance is reused across requests or sessions and multiple clients can access the HTTP endpoint.

4

What should we do if we cannot immediately upgrade?

Avoid sharing the transport or server between clients by creating a new server for every request or session. Using createMcpHandler() with a factory that creates a new server on each call is listed as not affected.

5

What changes are required when upgrading?

Upgrade to @modelcontextprotocol/server 2.3.0 or later and change the application to stop sharing instances. After upgrading, affected sharing patterns fail requests because a second connect() is rejected with ALREADY_CONNECTED.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203