An open index of dependabot pull requests across open source projects.

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

GHSA-345p-7cg4-v4c7 CVE-2026-25536
Description:

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):

// 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 Versions Patched Version
npm @modelcontextprotocol/sdk >= 1.10.0, <= 1.25.3
1.26.0
Related Dependabot Pull Requests
chore(deps): bump the npm_and_yarn group across 1 directory with 9 updates
Open 22 days ago
RemyLoveLogicAI/mcp-unity #17
npm:axios npm:ws +7 more
RemyLoveLogicAI
Bump the npm_and_yarn group across 1 directory with 4 updates
Open about 1 month ago
rahmadkoko2024-boop/examples #1
npm:qs npm:path-to-regexp +2 more
rahmadkoko2024-boop
Bump the npm_and_yarn group across 1 directory with 13 updates
Open about 1 month ago
canstralian/MCPServerforRedTeamAgenticWorkflowszip #6
npm:uuid npm:qs +9 more
canstralian
Bump the npm_and_yarn group across 2 directories with 9 updates
Open about 2 months ago
krsjenmt/krsjenmt-openai-apps-sdk-examples #2
npm:vite npm:postcss +3 more
krsjenmt
ci(deps): bump the npm_and_yarn group across 1 directory with 10 updates
Closed 2 months ago
d0whc3r/egipci-mcp #49
npm:vitest npm:vite +8 more
d0whc3r
chore(deps): bump the npm_and_yarn group across 7 directories with 5 updates
Open 3 months ago
UraniumCorporation/maiar-ai #199
npm:axios npm:vite +3 more
UraniumCorporation
chore(deps): bump the npm_and_yarn group across 3 directories with 4 updates
Open 4 months ago
nastech-ai/nastech #8
npm:@anthropic-ai/claude-code npm:uuid +2 more
nastech-ai
chore(deps): bump the npm_and_yarn group across 7 directories with 11 updates
Closed 4 months ago
hvrcharon1/opencode #2
npm:astro npm:dompurify +9 more
hvrcharon1
chore(deps): bump the npm_and_yarn group across 6 directories with 9 updates
Closed 4 months ago
infrareactive/opencode #6
npm:astro npm:@astrojs/cloudflare +7 more
infrareactive
chore(deps): bump the npm_and_yarn group across 6 directories with 9 updates
Closed 4 months ago
fattain-naime/opencode #6
npm:astro npm:@astrojs/cloudflare +7 more
fattain-naime
chore(deps): Bump the npm_and_yarn group across 1 directory with 12 updates
Open 4 months ago
Sherlock999xxx/MCP-SuperAssistant #25
npm:vite npm:ws +5 more
Sherlock999xxx
chore(deps): bump the npm_and_yarn group across 7 directories with 22 updates
Open 4 months ago
Prekzursil/mcp-funnel #5
npm:vitest npm:react-router +20 more
Prekzursil
chore(deps): bump the npm_and_yarn group across 8 directories with 11 updates
Open 4 months ago
robertpelloni/TormentNexus #202
npm:vite npm:ws +4 more
robertpelloni
chore(deps): bump the npm_and_yarn group across 3 directories with 26 updates
Open 4 months ago
EmilynnJ/qwen-code #9
npm:vitest npm:undici +17 more
EmilynnJ
chore(deps): bump the npm_and_yarn group across 6 directories with 10 updates
Open 4 months ago
robertpelloni/TormentNexus #200
npm:ws npm:esbuild +4 more
robertpelloni
build(deps): Bump the npm_and_yarn group across 1 directory with 10 updates
Open 5 months ago
tabrezahmed51/jules #1
npm:vitest npm:vite +4 more
tabrezahmed51
chore(deps): bump the npm_and_yarn group across 9 directories with 15 updates
Open 5 months ago
stvn101/skillkit #8
npm:vitest npm:ws +5 more
stvn101
chore(deps): bump the npm_and_yarn group across 2 directories with 21 updates
Open 5 months ago
EmilynnJ/GitNexus #1
npm:vite npm:postcss +13 more
EmilynnJ
Bump the npm_and_yarn group across 2 directories with 19 updates
Open 5 months ago
EmilynnJ/Spiritual--chatgpt-prompts #1
npm:next npm:yaml +10 more
EmilynnJ
chore(deps): bump the npm_and_yarn group across 6 directories with 9 updates
Closed 5 months ago
EmilynnJ/opencode #1
npm:astro npm:@astrojs/cloudflare +7 more
EmilynnJ
chore(deps): bump the npm_and_yarn group across 7 directories with 9 updates
Closed 5 months ago
tristanaburns/opencode #4
npm:astro npm:dompurify +7 more
tristanaburns
chore(deps): bump the npm_and_yarn group across 7 directories with 10 updates
Closed 5 months ago
gemone/opencode #2
npm:astro npm:dompurify +8 more
gemone
chore(deps): bump the npm_and_yarn group across 4 directories with 7 updates
Closed 5 months ago
Surfndez/opencode #3
npm:astro npm:@astrojs/cloudflare +5 more
Surfndez
Bump the npm_and_yarn group across 1 directory with 3 updates
Closed 5 months ago
c6ai/stagehand #15
npm:uuid npm:fastify +1 more
c6ai
chore(deps): bump the npm_and_yarn group across 1 directory with 16 updates
Closed 5 months ago
Kaairofelipe/ext-apps #1
npm:vite npm:undici +13 more
Kaairofelipe
chore(deps): bump the npm_and_yarn group across 2 directories with 11 updates
Open 5 months ago
ComposioHQ/open-chatgpt-atlas #12
npm:vite npm:lodash +6 more
ComposioHQ
Bump the npm_and_yarn group across 3 directories with 10 updates
Open 5 months ago
ahump20/servers #7
npm:diff npm:path-to-regexp +5 more
ahump20
chore(deps): bump the npm_and_yarn group across 2 directories with 1 update
Open 5 months ago
Soapstone-Services/waldzell-mcp-servers #1
npm:@modelcontextprotocol/sdk
Soapstone-Services
chore(deps): bump the npm_and_yarn group across 4 directories with 20 updates
Closed 5 months ago
alexcolls/qwen-code #34
npm:vite npm:undici +12 more
alexcolls
chore(deps): bump @modelcontextprotocol/sdk from 1.25.2 to 1.26.0 in /packages/swarm-tools
Open 5 months ago
joelhooks/swarm-tools #193
npm:@modelcontextprotocol/sdk
joelhooks
chore(deps): bump @modelcontextprotocol/sdk from 1.25.2 to 1.26.0 in /packages/claude-code-swarm-plugin
Open 5 months ago
joelhooks/swarm-tools #192
npm:@modelcontextprotocol/sdk
joelhooks
chore(deps): bump the npm_and_yarn group across 10 directories with 12 updates
Closed 5 months ago
nikomatt69/nikcli #68
npm:astro npm:vite +10 more
nikomatt69
chore(deps): bump the npm_and_yarn group across 2 directories with 17 updates
Open 5 months ago
nilhemdot/OpenMemory #2
npm:fast-xml-parser npm:ajv +5 more
nilhemdot
chore(deps): bump the npm_and_yarn group across 3 directories with 24 updates
Open 5 months ago
anumethod/openai-agents-js #29
npm:astro npm:vite +4 more
anumethod
Bump the npm_and_yarn group across 2 directories with 7 updates
Open 5 months ago
GlacierEQ/mcp-server #4
npm:qs npm:path-to-regexp +5 more
GlacierEQ
chore(deps): bump the npm_and_yarn group across 1 directory with 12 updates
Open 5 months ago
GlacierEQ/context7 #2
npm:next npm:minimatch +6 more
GlacierEQ
build(deps): Bump the npm_and_yarn group across 1 directory with 11 updates
Open 5 months ago
GlacierEQ/chatcode #3
npm:@anthropic-ai/claude-code npm:minimatch +6 more
GlacierEQ
Bump the npm_and_yarn group across 1 directory with 22 updates
Closed 5 months ago
HarleyCoops/rowboat #2
npm:axios npm:next +16 more
HarleyCoops
chore(deps): bump the npm_and_yarn group across 8 directories with 10 updates
Closed 5 months ago
nikomatt69/nikcli #64
npm:wrangler npm:drizzle-orm +3 more
nikomatt69
chore(deps): bump the npm_and_yarn group across 3 directories with 12 updates
Closed 5 months ago
JT5D/openai-agents-js #25
npm:astro npm:vite +3 more
JT5D
chore(deps): bump the npm_and_yarn group across 3 directories with 8 updates
Closed 5 months ago
Metatronsdoob369/Domicile #32
npm:astro npm:vite +3 more
Metatronsdoob369
chore(deps): bump the npm_and_yarn group across 3 directories with 12 updates
Open 5 months ago
GlacierEQ/openai-agents-js #23
npm:astro npm:vite +3 more
GlacierEQ
Bump the npm_and_yarn group across 15 directories with 8 updates
Open 6 months ago
ahump20/remotion #19
npm:astro npm:vite +4 more
ahump20
chore(deps): bump the npm_and_yarn group across 3 directories with 8 updates
Open 6 months ago
Metatronsdoob369/Domicile #31
npm:astro npm:vite +3 more
Metatronsdoob369
chore(deps): bump the npm_and_yarn group across 4 directories with 19 updates
Closed 6 months ago
alexcolls/qwen-code #31
npm:vite npm:undici +13 more
alexcolls
build(deps): bump the npm_and_yarn group across 1 directory with 8 updates
Open 6 months ago
aleph23/andrea-novel-helper #2
npm:fast-xml-parser npm:uuid +6 more
aleph23
Bump the npm_and_yarn group across 3 directories with 19 updates
Open 6 months ago
danielbodnar/web-ai.studio #2
npm:@angular/core npm:@angular/compiler +7 more
danielbodnar
chore(deps): bump the npm_and_yarn group across 1 directory with 6 updates
Closed 6 months ago
nssuwan186-dev/anthropic-sdk-typescript #3
npm:qs npm:fast-uri +3 more
nssuwan186-dev
Bump the npm_and_yarn group across 12 directories with 8 updates
Closed 6 months ago
cpfcoaching/mcp-for-security #2
npm:qs npm:path-to-regexp +4 more
cpfcoaching
Bump the npm_and_yarn group across 1 directory with 3 updates
Open 6 months ago
GlacierEQ/stagehand #10
npm:multer npm:fast-uri +1 more
GlacierEQ
Advisory Details
Published: February 04, 2026 9 months ago
Updated: October 14, 2026 10 days ago
CVSS Score: 7.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
EPSS: 0.38% 31th percentile
Source: Github
Classification: GENERAL
UUID: GSA_kwCzR0hTQS0zNDVwLTdjZzQtdjRjN84ABR9a
PR Statistics
PR Status
Open 559 (46.3%)
Merged 0 (0.0%)
Closed 648 (53.7%)
Update Types
Major 746 (9.7%)
Minor 4223 (55.2%)
Patch 2597 (33.9%)