CVE-2026-25536: @modelcontextprotocol/sdk has cross-client data leak via shared server/transport instance reuse

Published Feb 4, 2026
·
Updated

Summary

Cross-client data leak via two distinct issues: (1) reusing a single StreamableHTTPServerTransport across multiple client requests, and (2) reusing a single McpServer/Server instance across multiple transports. Both are most common in stateless deployments.

Impact

This advisory covers two related but distinct vulnerabilities. A deployment may be affected by one or both.

Issue 1: Transport re-use

What happens: When a single StreamableHTTPServerTransport instance handles multiple client requests, JSON-RPC message ID collisions cause responses to be routed to the wrong client's HTTP connection. The transport maintains an internal requestId → stream mapping, and since MCP client SDKs generate message IDs using an incrementing counter starting at 0, two clients produce identical IDs. The second client's request overwrites the first client's mapping entry, routing the response to the wrong HTTP stream.

What is affected: All request types — tools/call, resources/read, prompts/get, etc. No server-initiated features are required to trigger this.

Conditions: - A single StreamableHTTPServerTransport instance is reused across multiple client requests (most common in stateless mode without sessionIdGenerator) - Two or more clients send requests concurrently - Clients generate overlapping JSON-RPC message IDs (the SDK's default client uses an incrementing counter starting at 0)

Issue 2: Server/Protocol re-use

What happens: When a single McpServer (or Server) instance is connect()ed to multiple transports (one per client), the Protocol's internal this.transport reference is silently overwritten. The final response to a request is routed correctly (the Protocol captures the transport reference at request time), but any server-to-client messages sent during request handling use the shared this.transport reference, which may point to a different client's transport.

What is affected: This depends on what features your server uses:

- Final responses (the return value from a tool/resource/prompt handler): Affected in most cases. The Protocol captures this.transport at request-handling time, not the transport that delivered the request. This means: - If a request is already in-flight when a second connect() occurs (i.e., the request arrived before the transport was overwritten), the captured reference is correct and the response routes properly. - If a request arrives on the old transport after a second connect() has overwritten this.transport, the captured reference points to the new transport, and the response is mis-routed. The requesting client will time out. - Progress notifications sent during tool execution via sendNotification: Affected. These are dispatched through this.transport. When the transport has been overwritten and message IDs collide on the new transport, notifications are routed to the wrong client's HTTP stream. - Sampling (createMessage) and elicitation requests sent during tool execution via sendRequest: Affected. Same mechanism — the request is sent to the wrong client. - Spontaneous server-initiated notifications (outside any request handler): Affected. These are sent to whichever client's transport was most recently connected.

Conditions: - A single McpServer/Server instance is connect()ed to multiple transports across requests or sessions - Two or more clients connect concurrently - For in-request notifications/requests: message ID collision on the other transport is required for silent data leaking (the SDK's default client uses an incrementing counter starting at 0). Without collision, the transport will throw an error rather than misroute. - For spontaneous notifications: no collision needed, messages are always sent to the last-connected client's transport

How to tell if you're affected

- You use sessionIdGenerator (stateful mode) with a new McpServer per session → not affected by either issue. Each session has its own transport and server instance. - You use sessionIdGenerator but share a single McpServer across sessions → not affected by Issue 1 (transport re-use), but affected by Issue 2 (server re-use) if your tools send progress notifications, sampling, or elicitation during execution. - You are in stateless mode and reuse both a transport and a server across requests → affected by both issues; all request types can leak. - You are in stateless mode and create a new transport per request, but reuse the server → affected by Issue 2 only; safe if your tools only return results without sending progress notifications, sampling, or elicitation during execution. - You create a new server + transport per request → not affected. - Single-client environments (e.g., local development with one IDE) → not affected.

Patches

The fix (v1.26.0) adds runtime guards that turn silent data misrouting into immediate, actionable errors:

1. Protocol.connect() now throws if the protocol is already connected to a transport, preventing silent transport overwriting (addresses Issue 2) 2. Stateless StreamableHTTPServerTransport.handleRequest() now throws if called more than once, enforcing one-request-per-transport in stateless mode (addresses Issue 1) 3. In-flight request handler abort controllers are cleaned up on close(), and sendNotification/sendRequest in handler extras check the abort signal before sending, preventing messages from leaking after a transport is replaced

Servers that were incorrectly reusing instances will now receive a clear error message directing them to create separate instances per connection.

Workarounds

If you cannot upgrade immediately, ensure your server creates fresh McpServer and transport instances for each request (stateless) or session (stateful):

typescript // Stateless mode: create new server + transport per request app.post('/mcp', async (req, res) => { const server = new McpServer({ name: 'my-server', version: '1.0.0' }); // ... register tools, resources, etc. const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined }); await server.connect(transport); await transport.handleRequest(req, res); });

// Stateful mode: create new server + transport per session const sessions = new Map(); app.post('/mcp', async (req, res) => { const sessionId = req.headers['mcp-session-id']; if (sessions.has(sessionId)) { await sessions.get(sessionId).transport.handleRequest(req, res); } else { const server = new McpServer({ name: 'my-server', version: '1.0.0' }); // ... register tools, resources, etc. const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID() }); await server.connect(transport); sessions.set(transport.sessionId, { server, transport }); await transport.handleRequest(req, res); } });

Other sources

MCP TypeScript SDK is the official TypeScript SDK for Model Context Protocol servers and clients. From version 1.10.0 to 1.25.3, cross-client response data leak when a single McpServer/Server and transport instance is reused across multiple client connections, most commonly in stateless StreamableHTTPServerTransport deployments. This issue has been patched in version 1.26.0.

NVD

Affected Software

2 affected componentsFixes available
npm/@modelcontextprotocol/sdk>=1.10.0<=1.25.3
1.26.0
Lfprojects Mcp Typescript Sdk>=1.10.0<1.26.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 1.26.0
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.26.0
  3. Configuration

    If you cannot upgrade immediately, ensure your server creates fresh McpServer and StreamableHTTPServerTransport instances for each request (stateless) or session (stateful); do not reuse a single McpServer/Server across multiple client transports.

    MCP TypeScript SDK (server/transport instance management) instance reuse policy = create fresh McpServer and transport instances per request (stateless) or per session (stateful)
  4. Compensating control

    In stateless mode, avoid reusing a single StreamableHTTPServerTransport instance across multiple client requests; use one request-per-transport (stateless) to prevent cross-client response/notification routing errors.

Event History

Feb 4, 2026
Advisory Published
via GitHub·08:04 PM
Data Sourced
via GitHub·08:04 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:29 PM
Data Sourced
via MITRE·09:29 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·10:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-25536?

CVE-2026-25536 is considered a medium severity vulnerability due to its potential for cross-client response data leakage.

2

How do I fix CVE-2026-25536?

To remediate CVE-2026-25536, upgrade to version 1.26.0 or later of the @modelcontextprotocol/sdk package.

3

Who is affected by CVE-2026-25536?

Any deployment of the MCP server using the TypeScript SDK versions between 1.10.0 and 1.25.3 is affected by CVE-2026-25536.

4

What is the nature of the CVE-2026-25536 vulnerability?

The nature of CVE-2026-25536 revolves around a cross-client response data leak in stateless StreamableHTTPServerTransport deployments.

5

When was CVE-2026-25536 reported?

CVE-2026-25536 was reported in late 2026 as a notable security vulnerability in the SDK.

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