# CVE-2026-64684: Model Context Protocol Rust SDK custom header leak on cross-origin redirects

Source: https://junglewise.ai/threats/cve-2026-64684-model-context-protocol-rust-sdk-custom-header-leak-on-cross  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-16. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-64684 · Severity: medium · CVSS 6.8 · Published 2026-09-16

The rmcp crate in the Model Context Protocol Rust SDK forwards custom HTTP headers (such as API keys and authentication tokens) to servers reached via cross-origin redirects. If an attacker compromises the primary server and redirects traffic to an attacker-controlled site, sensitive headers are leaked, allowing the attacker to capture API keys and impersonate the legitimate client.

Technologies: [rmcp (crates.io)](https://junglewise.ai/threats/technologies/rmcp). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2026-64684 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-64684 being exploited in the wild.

**How severe is CVE-2026-64684?** Medium severity, with a CVSS score of 6.8, published 16 September 2026.

**Which products and versions are affected?** rmcp (crates.io) < 2.1.0, SEMVER:introduced=0,fixed=2.1.0.

**Is there a fix for CVE-2026-64684?** Yes. rmcp (crates.io): upgrade to 2.1.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-64684 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-64684?** Check whether you run rmcp (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- rmcp (crates.io): upgrade to 2.1.0 or later

  ```sh
  cargo update -p rmcp
  ```


## Technical details

The vulnerability exists in StreamableHttpClientTransport, which uses reqwest's default redirect policy (limited to 10 redirects) without override. The default policy follows 307/308 redirects and strips only Authorization, Cookie, and Proxy-Authorization headers on cross-origin redirects; custom headers injected via StreamableHttpClientTransportConfig.custom_headers are not marked as sensitive and are forwarded verbatim. The root cause is twofold: (1) default_http_client() does not call .redirect(Policy::none()) to disable automatic following, and (2) custom headers are added via RequestBuilder::header() without sensitivity marking. An attacker who can compromise the primary MCP server can issue a 307/308 redirect to an attacker-controlled site and capture forwarded API keys or other auth headers. The fix is to disable automatic redirect following in default_http_client() and inspect 3xx responses before forwarding requests.

## Affected products

- Model Context Protocol Rust SDK c330fede90e4729c234f8e87fdbc5ea27a1dd10c and earlier

## Identifiers

- CVE-2026-64684
- GHSA-9g45-5xwm-f3wc

## Timeline

- 2026-09-17: disclosed

## Related threats

- [RUSTSEC-2026-0462 - Unbounded response body buffering in Streamable HTTP clients](https://junglewise.ai/threats/rustsec-2026-0462-unbounded-response-body-buffering-in-streamable-http-3cfaf6d0)
- [rmcp OAuth client SSRF via unresolved hostnames](https://junglewise.ai/threats/rustsec-2026-0457-oauth-client-ssrf-filter-checks-host-strings-not-26bba63d)
- [RUSTSEC-2026-0461 - Unbounded tool schema cache in Streamable HTTP server transport](https://junglewise.ai/threats/rustsec-2026-0461-unbounded-tool-schema-cache-in-streamable-http-server-35418a7a)
- [rmcp OAuth client SSRF via server-controlled resource_metadata URL](https://junglewise.ai/threats/rmcp-oauth-client-fetches-server-controlled-resource-metadata-urls-6efc52a6)
- [RMCP Streamable HTTP server unauthenticated session-table memory leak](https://junglewise.ai/threats/cve-2026-63128-rmcp-streamable-http-server-unauthenticated-session-table-memory)
