CVE-2026-64684: RMCP: Custom HTTP headers leak to cross-origin redirect targets
The rmcp crate’s StreamableHttpClientTransport forwards caller-supplied custom HTTP headers (such as X-API-Key, X-Auth-Token, Api-Key) to cross-origin redirect targets. The default_http_client() function builds a reqwest::Client without a redirect policy override, so the default limited(10) policy follows 307/308 redirects and forwards all per-request headers except Authorization, Cookie, and Proxy-Authorization. Custom auth headers injected via StreamableHttpClientTransportConfig.custom_headers are not classified as sensitive and are therefore forwarded verbatim to any redirect target — including an attacker-controlled server.
References
- github.com/advisories/GHSA-9g45-5xwm-f3wc
- github.com/modelcontextprotocol/rust-sdk/commit/496902b9cf2c8a947454718da31829ae776b969b
- github.com/modelcontextprotocol/rust-sdk/pull/936
- github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.1.0
- github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9g45-5xwm-f3wc
- nvd.nist.gov/vuln/detail/CVE-2026-64684
Code Behaviors & Features
Detect and mitigate CVE-2026-64684 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →