CVE-2026-111769
MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodies
Description
Summary
In affected versions, the SDK's HTTP client transports and OAuth requests followed redirects to any origin.
If an MCP server or authorization server redirected a request to another origin, that origin received custom request headers (such as an X-API-Key set in requestInit.headers) and the mcp-session-id header. On a 307 or 308 it also received the request body, including OAuth token requests with their refresh_token and client_secret.
On current runtimes fetch already drops the Authorization header across origins.
Am I affected?
Yes, if your application uses StreamableHTTPClientTransport, SSEClientTransport, or the SDK's OAuth client functions such as auth(). stdio clients are not affected.
Affected versions:
@modelcontextprotocol/sdkall versions through 1.31.0@modelcontextprotocol/client2.0.0 through 2.2.0
Fix
Upgrade to:
- 1.x:
@modelcontextprotocol/sdk1.32.0 or later - 2.x:
@modelcontextprotocol/client2.3.0 or later
Redirects are now followed only within the same origin, and not at all in browsers. If your MCP server or authorization server redirects to another origin on purpose, configure the final URL instead. Setting redirectPolicy: 'follow' on a transport restores the old behaviour and the exposure.
If a redirect may have reached a host you do not control, rotate the API keys and client_secret your application held and revoke its tokens.
If you cannot upgrade yet, pass a fetch that refuses redirects, for example (url, init) => fetch(url, { ...init, redirect: 'error' }).
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm.at.modelcontextprotocol » clientvia npm @modelcontextprotocol/client | >= 2.0.0, < 2.3.0 | 2.3.0 |
| org.mvnpm.at.modelcontextprotocol » sdkvia npm @modelcontextprotocol/sdk | < 1.32.0 | 1.32.0 |
| org.webjars.npm » modelcontextprotocol__sdkvia npm @modelcontextprotocol/sdk | < 1.32.0 | 1.32.0 |
Blast radius
50% of the dependent artifacts (1) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 65 |
Most used dependents
- org.webjars.npm » angular__cli1 usages
- org.mvnpm.at.angular » cli0 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (2 packages) . See all on OSV
References
| Package | modelcontextprotocol/typescript-sdk | github.com |
| Web | modelcontextprotocol/typescript-sdk advisory GHSA-6prh-2h8m-c8cw | github.com |
| Web | modelcontextprotocol/typescript-sdk pull request #2901 | github.com |
| Web | modelcontextprotocol/typescript-sdk pull request #2902 | github.com |
| Web | modelcontextprotocol/typescript-sdk commit 30bfe51 | github.com |
| Web | modelcontextprotocol/typescript-sdk commit 433eb41 | github.com |
