# CVE-2026-64684: RMCP: Custom HTTP headers leak to cross-origin redirect targets

> Attackers can capture sensitive API keys and authentication tokens when the Rust MCP SDK follows cross-origin redirects, exposing credentials to malicious endpoints.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Sep 2026
- **Updated:** 19 Sep 2026
- **Also known as:** GHSA-9g45-5xwm-f3wc

## What is CVE-2026-64684?

CVE-2026-64684 is a medium-severity vulnerability in modelcontextprotocol rust-sdk, published on 16 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

RMCP is an official Rust SDK for the Model Context Protocol. Prior to 2.1.0, the rmcp crate's StreamableHttpClientTransport in crates/rmcp/src/transport/common/reqwest/streamable_http_client.rs builds its default_http_client with reqwest's automatic redirect policy and applies caller-supplied values from StreamableHttpClientTransportConfig.custom_headers without marking them as sensitive. When a malicious or compromised MCP endpoint returns a cross-origin 307 or 308 redirect, reqwest follows the redirect and apply_custom_headers causes custom API keys or authentication tokens to be replayed to the new origin, where an attacker can capture and reuse them. The separate auth_header path is not affected because it uses the standard Authorization header, which reqwest strips on cross-origin redirects. This issue is fixed in version 2.1.0.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2026-64684?

2 open source packages ship an affected version, including rmcp.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rmcp` | crates.io | All versions | 2.1.0 |
| `rmcp` | crates.io | All versions | 2.1.0 |

## How do I fix CVE-2026-64684?

Upgrade rmcp to 2.1.0 or later.

## Is CVE-2026-64684 being exploited?

There is no known exploitation of CVE-2026-64684 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-64684 and fix it if it is affected.

What it is: CVE-2026-64684 is a medium-severity vulnerability in modelcontextprotocol rust-sdk, published on 16 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-64684 in the wild and no public exploit code.

Affected packages and fixed versions:
- rmcp (crates.io): affected all versions; fixed in 2.1.0
- rmcp (crates.io): affected all versions; fixed in 2.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-64684/ (Markdown: https://insights.sbomify.com/CVE-2026-64684/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-64684
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-64684
- OSV: https://osv.dev/vulnerability/CVE-2026-64684

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-64684/
Summaries are generated and may contain mistakes; the official description above is the record.
