NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MCP TypeScript SDK

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

mediumCVSS 3.1 6.5GHSA-6prh-2h8m-c8cw

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/sdk all versions through 1.31.0
  • @modelcontextprotocol/client 2.0.0 through 2.2.0

Fix

Upgrade to:

  • 1.x: @modelcontextprotocol/sdk 1.32.0 or later
  • 2.x: @modelcontextprotocol/client 2.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 Authorization across origins. Custom headers, the mcp-session-id header 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

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 entries