CVE-2026-25536 — @modelcontextprotocol/sdk
HIGHCVE-2026-25536 is a high-severity (CVSS 7.1) CWE-362 vulnerability in @modelcontextprotocol/sdk. A fix is available for @modelcontextprotocol/sdk — see the affected versions and patch details below.
@modelcontextprotocol/sdk has cross-client data leak via shared server/transport instance reuse
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-25536.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-25536 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@modelcontextprotocol/sdknpmDescription
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
StreamableHTTPServerTransportinstance is reused across multiple client requests (most common in stateless mode withoutsessionIdGenerator) - 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 throughthis._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 viasendRequest: 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/Serverinstance isconnect()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 newMcpServerper session → not affected by either issue. Each session has its own transport and server instance. - You use
sessionIdGeneratorbut share a singleMcpServeracross 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:
Protocol.connect()now throws if the protocol is already connected to a transport, preventing silent transport overwriting (addresses Issue 2)- Stateless
StreamableHTTPServerTransport.handleRequest()now throws if called more than once, enforcing one-request-per-transport in stateless mode (addresses Issue 1) - In-flight request handler abort controllers are cleaned up on
close(), andsendNotification/sendRequestin 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):
// 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);
}
});
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @modelcontextprotocol/sdk | ≥ 1.10.0&&< 1.26.0 | 1.26.0npm install @modelcontextprotocol/sdk@1.26.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @modelcontextprotocol/sdk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @modelcontextprotocol/sdk to 1.26.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-25536 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-25536 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-25536. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.6 | ansible-automation-platform-tech-preview/mcp-server-rhel9:1772196222 | RHSA-2026:3960 |
Frequently Asked Questions
Is CVE-2026-25536 in your dependencies?
O3 Security finds CVE-2026-25536 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.