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

Medium CVSS 6.5

OSV id
GHSA-6prh-2h8m-c8cw
Also known as
CVE-2026-111769
Published
Last modified

Affected packages

PackageAffected versionsFixed in
@modelcontextprotocol/sdk
npm
< 1.32.0 1.32.0
@modelcontextprotocol/client
npm
>= 2.0.0, < 2.3.0 2.3.0

Versions we track that it affects: @modelcontextprotocol/sdk 1.30.0;

How to fix it

@modelcontextprotocol/sdk (npm)

Upgrade @modelcontextprotocol/sdk to 1.32.0 or later.

npm install @modelcontextprotocol/sdk@1.32.0
# if it is an indirect dependency: npm update @modelcontextprotocol/sdk (or npm audit fix)
  • If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
  • Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.

@modelcontextprotocol/client (npm)

Upgrade @modelcontextprotocol/client to 2.3.0 or later.

npm install @modelcontextprotocol/client@2.3.0
# if it is an indirect dependency: npm update @modelcontextprotocol/client (or npm audit fix)
  • If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
  • Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.

Not sure whether your project uses an affected version? Check your lockfile below for free.

Details

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' }).

References

Am I affected?

Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About this data

Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.