Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carrying custom headers and bodies
CVE-2026-116685 · GHSA-5h93-6whr-6q8j · published 2026-10-27
- Severity
- Medium
- CVSS score
- 5.9
- Chance of exploitation (EPSS)
- 0.40%
- Fixed in
- 2.2.0
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
In affected versions, the SDK's Streamable HTTP and SSE client transports followed HTTP redirects to any host. If the configured MCP endpoint answered with a redirect to a different origin: custom headers set on the client (for example an X-API-Key credential) were sent to that origin, and on a 307 or 308 redirect the request body was re-sent there too. The SDK's OAuth client providers followed redirects on their own discovery, registration and token requests in the same way. A lone Authorization bearer header was not exposed; the HTTP library already drops it on cross-origin redirects.
Upgrade mcp to 2.2.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Upgrade to mcp 1.30.0 (1.x) or 2.2.0 (2.x) or later; no code changes are needed. The transports, and the OAuth providers' own requests, now follow a redirect only when it stays on the endpoint's origin (same scheme, host and port, or an http to https upgrade on the same host) and keeps the request method. Any other redirect is not followed and the request fails with an error naming the target (MCPError on 2.x, httpx.HTTPStatusError on 1.x), whichever HTTP client the transport uses. The internal createmcphttpclient helper no longer turns redirect following on, so code calling it directly now receives the redirect response instead.
46 registered MCP servers install an affected version today, by the dependency versions a fresh install resolves.
- ai.datavidence/datavidence-financialsmcp@2.1.1
- ai.solwyn/solwynmcp@2.1.1
- com.browser-use/browser-usemcp@2.1.1
- com.cyberspf/mcpmcp@1.9.4
- com.lucidlink/mcpmcp@2.0.0
- com.nautaai/holster-mcpmcp@1.27.2
- io.github.abhichandra21/promptheusmcp@1.12.4
- io.github.Alejandrehl/kainext-binance-mcpmcp@1.29.0
- io.github.amin-ale/mcp-quickbooksmcp@1.28.1
- io.github.AndreySukhanov/summarix-telegrammcp@1.12.4
- io.github.AS-XS/ai-pensieve-mcpmcp@2.1.1
- io.github.ashlesh-t/cognirepomcp@1.27.0
- CriticalPhoenix: Format String Injection in applyChatTemplatearize-phoenix
- CriticalFlowise: Unauthenticated OAuth2 token refresh endpoint returns access tokens — enables token theft for any connected serviceflowise
- CriticalMLflow: Environment variable injection in AI Gateway secrets enables server-side credential exfiltrationmlflow
- CriticalvLLM has RCE In Video Processingvllm
- HighConfig revision hashes could expose password verifiersopenclaw
- Highn8n: Shared Credential Header Leak via HTTP Request Pagination Expressionn8n, n8n, n8n
- HighModel Context Protocol Python SDK: OAuth client could send credentials to an authorization server chosen by the MCP servermcp, mcp
- HighHTTP server transports and OAuth endpoints read request bodies with no size limitmcp, mcp
- HighMCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasksmcp
- HighMCP Python SDK: HTTP transports serve session requests without verifying the authenticated principalmcp
- HighMCP Python SDK: WebSocket server transport does not support Host/Origin validationmcp
- HighModel Context Protocol (MCP) Python SDK does not enable DNS rebinding protection by defaultmcp
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.