GHSA-9g45-5xwm-f3wc: RMCP: Custom HTTP headers leak to cross-origin redirect targets
- Identifiers
- CVE-2026-64684GHSA-9g45-5xwm-f3wc
- Published
- Record updated
- Affected
- rmcp < 2.1.0
- Fixed in
- 2.1.0
- released July 2, 2026, 77 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.5%
Summary
The rmcp crate's StreamableHttpClientTransport forwards caller-supplied custom HTTP headers, such as X-API-Key, X-Auth-Token and Api-Key, to cross-origin redirect targets. The default_http_client() function sets no redirect policy override, so reqwest's default limited(10) policy follows 307/308 redirects and strips only Authorization, Cookie and Proxy-Authorization, leaving headers set through StreamableHttpClientTransportConfig.custom_headers intact. An attacker who controls a redirect target can capture those secrets, as tested at commit c330fede90e4729c234f8e87fdbc5ea27a1dd10c.
Mitigation
In default_http_client(), add .redirect(reqwest::redirect::Policy::none()) to the reqwest::Client builder so the transport can inspect 3xx responses and strip sensitive headers before following them. Alternatively, use reqwest::ClientBuilder::connection_verbose or per-request Request::headers_mut() to remove auth headers before the redirect is followed.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- rmcpcrates.ioLLM dependency since 2025-03-16 · 1 tracked dependent
Related items
- HighGHSA-qx49-fqc8-xw99: Model Context Protocol Python SDK: OAuth client could send credentials to an authorization server chosen by the MCP serverSame vendor · GitHub Advisory Database
- HighCVE-2026-88968: Claude Code Edit tool symlink race overwrites files outside workspace on macOSSame vendor · NVD/CVE Database
- HighCVE-2026-88066: Claude Desktop on Windows git.exe execution via search pathSame vendor · NVD/CVE Database
- HighCVE-2026-62331: praktor path traversal via Telegram document upload filenamesSame vendor · NVD/CVE Database
- MediumGHSA-w4fh-qvv9-3v23: Model Context Protocol Python SDK: Server bearer-token authentication accepts tokens issued for a different resource serverSame vendor · GitHub Advisory Database