# GHSA-w2fm-25vw-vh7f: mcp-handler has a tool response leak across concurrent client sessions ('Race Condition')

> A race condition in the MCP handler library allows low-privileged attackers to read other clients' session data and authentication context via concurrent requests.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Apr 2026

## What is GHSA-w2fm-25vw-vh7f?

GHSA-w2fm-25vw-vh7f is a vulnerability in mcp-handler, published on 1 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

`mcp-handler` versions prior to 1.1.0 accepted `@modelcontextprotocol/sdk` < 1.26.0 as a peer dependency. That SDK version contains a vulnerability [[CVE-2026-25536](https://nvd.nist.gov/vuln/detail/CVE-2026-25536)] that causes concurrent requests from different clients to share server-side state including authentication context and tool execution results when a `StreamableHTTPServerTransport` instance is reused across requests.

**Note:** This is _not_ a vulnerability in `mcp-handler` itself. The root cause is in the peer dependency `@modelcontextprotocol/sdk`. 

### Impact

A low-privileged attacker making concurrent requests to an `mcp-handler` endpoint can read another client's session data, including authentication information and tool execution state. This is a confidentiality breach with potential for limited integrity impact.

**Root Cause:** [CVE-2026-25536](https://nvd.nist.gov/vuln/detail/CVE-2026-25536) in `@modelcontextprotocol/sdk` < 1.26.0. The SDK did not prevent reuse of stateless transports across client connections.

### Patches

Upgrade to `mcp-handler@1.1.0`. This release raises the minimum peer dependency to `@modelcontextprotocol/sdk@>=1.26.0`, which contains the fix for CVE-2026-25536. 

### Workarounds

- Upgrade `@modelcontextprotocol/sdk` to `>=1.26.0` (note: the SDK will throw on transport reuse, which will break `mcp-handler` < 1.1.0 which effectively forces the upgrade)
- Alternatively, manually create fresh `McpServer` and transport instances per request in your handler code

## Which versions are affected by GHSA-w2fm-25vw-vh7f?

2 open source packages ship an affected version, including mcp-handler.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mcp-handler` | npm | All versions | 1.1.0 |
| `mcp-handler` | npm | All versions | 1.1.0 |

## How do I fix GHSA-w2fm-25vw-vh7f?

Upgrade mcp-handler to 1.1.0 or later.

## Is GHSA-w2fm-25vw-vh7f being exploited?

There is no known exploitation of GHSA-w2fm-25vw-vh7f in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-w2fm-25vw-vh7f and fix it if it is affected.

What it is: GHSA-w2fm-25vw-vh7f is a vulnerability in mcp-handler, published on 1 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-w2fm-25vw-vh7f in the wild and no public exploit code.

Affected packages and fixed versions:
- mcp-handler (npm): affected all versions; fixed in 1.1.0
- mcp-handler (npm): affected all versions; fixed in 1.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-w2fm-25vw-vh7f/ (Markdown: https://insights.sbomify.com/GHSA-w2fm-25vw-vh7f/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-w2fm-25vw-vh7f

---
From sbomify Insights: https://insights.sbomify.com/GHSA-w2fm-25vw-vh7f/
Summaries are generated and may contain mistakes; the official description above is the record.
