CVE-2026-116685: Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carrying custom headers and bodies
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-Keycredential) were sent to that origin, and - on a
307or308redirect 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.
Anyone able to make an endpoint you trust redirect elsewhere (a stale redirect to a lapsed domain, a misrouted proxy rule, redirect logic an attacker can influence) could capture that material. A server that is itself malicious gains nothing this way; it already receives your requests directly.
References
- github.com/advisories/GHSA-5h93-6whr-6q8j
- github.com/modelcontextprotocol/python-sdk/commit/2106335745563b2321b8c73fef2c12903d00aa6e
- github.com/modelcontextprotocol/python-sdk/commit/c6762e821c527925f0b617db216d00fbd1d0bf99
- github.com/modelcontextprotocol/python-sdk/pull/3397
- github.com/modelcontextprotocol/python-sdk/pull/3448
- github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0
- github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0
- github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-5h93-6whr-6q8j
- nvd.nist.gov/vuln/detail/CVE-2026-116685
Code Behaviors & Features
Detect and mitigate CVE-2026-116685 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →