{"id":"CVE-2026-111769","kind":"vulnerability","aliases":["CVE-2026-111769","GHSA-6prh-2h8m-c8cw"],"related":[],"title":"MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodies","description":"### Summary\nIn affected versions, the SDK's HTTP client transports and OAuth requests followed redirects to any origin.\n\nIf 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`.\n\nOn current runtimes `fetch` already drops the `Authorization` header across origins.\n\n### Am I affected?\nYes, if your application uses `StreamableHTTPClientTransport`, `SSEClientTransport`, or the SDK's OAuth client functions such as `auth()`. stdio clients are not affected.\n\nAffected versions:\n\n- `@modelcontextprotocol/sdk` all versions through 1.31.0\n- `@modelcontextprotocol/client` 2.0.0 through 2.2.0\n\n### Fix\nUpgrade to:\n\n- 1.x: `@modelcontextprotocol/sdk` 1.32.0 or later\n- 2.x: `@modelcontextprotocol/client` 2.3.0 or later\n\nRedirects 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.\n\nIf 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.\n\nIf you cannot upgrade yet, pass a `fetch` that refuses redirects, for example `(url, init) => fetch(url, { ...init, redirect: 'error' })`.","summary":"The MCP TypeScript SDK's HTTP transports and OAuth client followed redirects to any origin and re-sent custom headers, the mcp-session-id header, and on 307/308 the request body. An attacker who can redirect MCP or authorization server traffic gets those headers and body, including OAuth refresh_token and client_secret.","severity":"medium","cvss":6.5,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"@modelcontextprotocol/sdk","fixed":["1.32.0"],"affected":"< 1.32.0","ecosystem":"npm"},{"name":"@modelcontextprotocol/client","fixed":["2.3.0"],"affected":">= 2.0.0, < 2.3.0","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["ai-tooling","cwe-200","mcp","npm","oauth","typescript"],"not_affected_if":["no-http-transport","stdio-only"],"how_to_check":"Check whether your package.json or lockfile pins @modelcontextprotocol/sdk below 1.32.0 or @modelcontextprotocol/client between 2.0.0 and 2.2.0.","fix":"Upgrade @modelcontextprotocol/sdk to 1.32.0 or later, or @modelcontextprotocol/client to 2.3.0 or later.\nIf a redirect may have reached a host you do not control, rotate the API keys and client_secret and revoke tokens.","status":"open","published_at":"2026-10-20T18:26:30+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","triaged_at":"2026-10-23T20:56:21+00:00","updated_at":"2026-10-23T20:56:21+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-10-23T20:56:21Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade @modelcontextprotocol/sdk to 1.32.0 or later, or @modelcontextprotocol/client to 2.3.0 or later.\nIf a redirect may have reached a host you do not control, rotate the API keys and client_secret and revoke tokens.","reach":"network","impact":"medium","summary":"The MCP TypeScript SDK's HTTP transports and OAuth client followed redirects to any origin and re-sent custom headers, the mcp-session-id header, and on 307/308 the request body. An attacker who can redirect MCP or authorization server traffic gets those headers and body, including OAuth refresh_token and client_secret.","category":"ai-tooling","who_cares":["mcp","typescript","npm","oauth"],"confidence":0.8,"needs_auth":"unknown","worst_case":"Third-party origin receives custom headers, session ID, and OAuth secrets via redirect","analyst_note":"","how_to_check":"Check whether your package.json or lockfile pins @modelcontextprotocol/sdk below 1.32.0 or @modelcontextprotocol/client between 2.0.0 and 2.2.0.\nunknown","needs_analyst":false,"not_affected_if":["stdio-only","no-http-transport"],"user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.000577,"input_tokens":3418,"output_tokens":471,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-111769':27A,35A '-200':42B '-2026':26A,34A '1':228C '1.31.0':220C '1.32.0':231C '2':234C '2.0.0':222C '2.2.0':224C '2.3.0':237C '2h8m':31A '307':158C '307/308':76B '308':160C '6prh':30A 'across':187C 'affect':104C,191C,213C,214C 'ai':39B 'ai-tool':38B 'alreadi':182C 'also':162C 'anoth':131C,264C 'api':144C,300C 'applic':195C,306C 'attack':81B 'auth':208C 'author':87B,125C,185C,260C 'behaviour':282C 'bodi':24A,79B,94B,166C 'browser':254C 'c8cw':32A 'cannot':314C 'client':3A,6A,56B,100B,110C,176C,204C,210C,303C 'configur':268C 'control':297C 'cross':13A 'cross-origin':12A 'current':179C 'custom':20A,66B,136C 'cve':25A,33A 'cwe':41B 'drop':183C 'error':331C 'exampl':324C 'exposur':285C 'fetch':181C,319C,327C 'final':270C 'fix':225C 'follow':11A,57B,115C,243C,275C 'function':205C 'get':90B 'ghsa':29A 'ghsa-6prh-2h8m-c8cw':28A 'header':21A,67B,73B,92B,138C,155C,186C 'held':307C 'host':293C 'http':5A,52B,109C 'id':72B,154C 'includ':95B,167C 'init':326C,329C 'instead':272C 'key':145C,301C 'later':233C,239C 'may':289C 'mcp':1A,43B,48B,70B,85B,122C,152C,257C 'mcp-session-id':69B,151C 'modelcontextprotocol/client':37A,221C,236C 'modelcontextprotocol/sdk':36A,216C,230C 'npm':44B 'oauth':9A,45B,55B,96B,113C,168C,203C 'old':281C 'origin':14A,61B,119C,132C,134C,188C,248C,265C 'pass':317C 'purpos':267C 're':18A,64B 're-sent':17A,63B 'reach':291C 'receiv':135C,163C 'redirect':15A,58B,84B,116C,127C,240C,262C,288C,322C,330C 'redirectpolici':274C 'refresh':97B,173C 'refus':321C 'request':10A,23A,78B,114C,129C,137C,165C,170C 'requestinit.headers':148C 'restor':279C 'revok':309C 'rotat':298C 'runtim':180C 'sdk':4A,50B,107C,201C 'secret':101B,177C,304C 'sent':19A,65B 'server':88B,123C,126C,258C,261C 'session':71B,153C 'set':146C,273C 'sseclienttransport':198C 'stdio':209C 'streamablehttpclienttransport':197C 'summari':102C 'token':98B,169C,174C,311C 'tool':40B 'traffic':89B 'transport':7A,53B,111C,278C 'typescript':2A,46B,49B 'upgrad':226C,315C 'url':271C,325C,328C 'use':196C 'version':105C,215C,218C 'within':245C 'x':143C,229C,235C 'x-api-key':142C 'yes':192C 'yet':316C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-20T18:26:30+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-6prh-2h8m-c8cw","url":"https://github.com/advisories/GHSA-6prh-2h8m-c8cw","severity":"medium","published_at":"2026-10-20T18:26:30+00:00","modified_at":"2026-10-20T18:26:32+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","fetched_at":"2026-10-23T19:11:32+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}