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
The MCP TypeScript client SDK followed HTTP redirects to any origin. A redirect from an MCP or authorization server sent custom headers such as `X-API-Key` and `mcp-session-id` to the new origin. On a 307 or 308 it also sent the body, including OAuth `refresh_token` and `client_secret`. Fixed in `@modelcontextprotocol/sdk` 1.32.0 and `@modelcontextprotocol/client` 2.3.0.
Published Oct 20, 2026 · Analysis Oct 21, 2026
What an attacker can do
StreamableHTTPClientTransport, SSEClientTransport and the OAuth functions such as auth() used default fetch redirect handling. Current runtimes already drop the Authorization header across origins, but they keep custom headers. If a server redirected to another origin, that origin received everything in requestInit.headers plus the session id. A 307 or 308 redirect also replays the POST body, so an OAuth token request leaks its credentials.
The attacker must control or compromise the MCP server or authorization server, or an open redirect on it, and get the client to connect. That is why complexity is high. They then collect API keys, session ids and OAuth secrets for the third-party origin they control. stdio clients are not affected.
Who is affected
Affected: @modelcontextprotocol/sdk all versions below 1.32.0, and @modelcontextprotocol/client 2.0.0 through 2.2.0. You are exposed if your app uses StreamableHTTPClientTransport, SSEClientTransport or the OAuth client functions.
npm ls @modelcontextprotocol/sdk @modelcontextprotocol/client@modelcontextprotocol/sdk
- Ecosystem
- npm
- Affected
- < 1.32.0
- Fixed in
- 1.32.0
- Check
npm ls @modelcontextprotocol/sdk
@modelcontextprotocol/client
- Ecosystem
- npm
- Affected
- >= 2.0.0, < 2.3.0
- Fixed in
- 2.3.0
- Check
npm ls @modelcontextprotocol/client
How to fix it
Upgrade to @modelcontextprotocol/sdk 1.32.0 or @modelcontextprotocol/client 2.3.0. Redirects are now followed only within the same origin, and not at all in browsers.
If your servers redirect across origins on purpose, configure the final URL instead. Setting redirectPolicy: 'follow' restores the old behavior and the exposure.
If a redirect may have reached a host you do not control, rotate the API keys and client_secret your app held and revoke its tokens.
Without an upgrade, pass a custom fetch that refuses redirects:
(url, init) => fetch(url, { ...init, redirect: 'error' })How to tell if you were hit
Review MCP server and authorization server logs and any proxy logs for 301, 302, 307 or 308 responses that point to an unfamiliar origin. Check that origin's access logs, if you own it, for requests carrying your X-API-Key or mcp-session-id. After patching, a cross-origin redirect fails instead of being followed. If any leak is plausible, rotate secrets.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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' }).
Credited to nickelsec.
Questions
- Does fetch not already protect the Authorization header?
Yes, current runtimes drop
Authorizationacross origins. Custom headers, themcp-session-idheader and the body on 307/308 redirects were still sent, which is the leak.- Does the redirectPolicy option bring the bug back?
Yes. Setting
redirectPolicy: 'follow'on a transport restores the old behavior and the exposure.- Are stdio MCP clients affected by CVE-2026-111769?
No. Only HTTP client transports and the SDK's OAuth requests follow redirects.
References
Read for this analysis:
- https://github.com/advisories/GHSA-6prh-2h8m-c8cw
- https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-6prh-2h8m-c8cw
- https://github.com/modelcontextprotocol/typescript-sdk/pull/2901
- https://github.com/modelcontextprotocol/typescript-sdk/pull/2902
- https://github.com/modelcontextprotocol/typescript-sdk/commit/30bfe5139f4b0825c90cd725f9a7e3f9af5e120d
- https://github.com/modelcontextprotocol/typescript-sdk/commit/433eb413dc305ebeb93b8ebcde0095a8fc0d5fa0
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More MCP TypeScript SDK vulnerabilities
All MCP TypeScript SDK entriesCVE-2026-111767
MCP TypeScript SDK: Experimental tasks were not tied to the session that created them
high8.6Oct 20, 2026CVE-2026-111768
MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation
high7.5Oct 20, 2026CVE-2026-111771
MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service
medium6.8Oct 20, 2026CVE-2026-104850
MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
high7.5Oct 6, 2026CVE-2026-25536
@modelcontextprotocol/sdk has cross-client data leak via shared server/transport instance reuse
high7.1Feb 4, 2026CVE-2026-0621
Anthropic's MCP TypeScript SDK has a ReDoS vulnerability
high8.7Jan 5, 2026
