GHSA-6prh-2h8m-c8cw

Suggest an improvement
Source
https://github.com/advisories/GHSA-6prh-2h8m-c8cw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6prh-2h8m-c8cw/GHSA-6prh-2h8m-c8cw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6prh-2h8m-c8cw
Aliases
  • CVE-2026-111769
Published
2026-10-20T18:26:30Z
Modified
2026-10-20T18:45:09Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N CVSS Calculator
Summary
MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodies
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' }).

Database specific
{
    "cwe_ids":  [
        "CWE-200"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-20T18:26:30Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

npm / @modelcontextprotocol/sdk

Package

Name
@modelcontextprotocol/sdk
View open source insights on deps.dev
Purl
pkg:npm/%40modelcontextprotocol/sdk

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.32.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6prh-2h8m-c8cw/GHSA-6prh-2h8m-c8cw.json"

npm / @modelcontextprotocol/client

Package

Name
@modelcontextprotocol/client
View open source insights on deps.dev
Purl
pkg:npm/%40modelcontextprotocol/client

Affected ranges

Type
SEMVER
Events
Introduced
2.0.0
Fixed
2.3.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6prh-2h8m-c8cw/GHSA-6prh-2h8m-c8cw.json"