CVE-2026-64684

RMCP: Custom HTTP headers leak to cross-origin redirect targets

Published Sep 16, 2026 CVSS 3.1 · 6.8 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability lies in RMCP's default HTTP client configuration. The client follows HTTP redirects automatically and replays any custom HTTP headers supplied by the user. When a malicious or compromised Model Context Protocol endpoint issues a cross‑origin 307 or 308 redirect, those custom headers can contain API keys or authentication tokens. The redirect causes the client to resend those headers to the new origin, allowing an attacker to capture and reuse the credentials. This results in accidental credential leakage and potential unauthorized access to services where the tokens are valid. The weakness is a data‑exposure flaw (CWE‑200) and an improper handling of sensitive headers (CWE‑212).

Affected Systems

The vulnerability affects the modelcontextprotocol rust-sdk, specifically the rmcp crate’s StreamableHttpClientTransport implementation. Versions earlier than 2.1.0 are vulnerable; the issue is fixed in 2.1.0.

Risk and Exploitability

The CVSS score is 6.8, indicating a moderate severity. The EPSS score is below 1%, suggesting that, as of the latest reporting, exploitation attempts have been very rare. The vulnerability is not listed in CISA’s KEV catalog. The likely exploitation path requires an attacker to influence the SDK to issue a request to a controlled endpoint that issues a cross‑origin redirect, after which the SDK automatically follows the redirect and repeats the headers. Because the redirect policy is automatic, the attack can be performed without additional configuration changes on the client side, though the attacker must have control over an endpoint contactable by the SDK or compromise an MCP endpoint to inject the redirect. The risk is primarily that an attacker who can observe or control the flow may ingest the leaked credentials and use them to access other services. The low EPSS score indicates that such attacks are currently rare, but the impact of credential theft warrants prompt mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the rust‑sdk to version 2.1.0 or later. That release removes the unsafe redirect behavior and marks custom headers as non‑sensitive.
  • If an upgrade cannot be performed immediately, disable automatic redirects in reqwest by configuring the client to use a policy that does not follow redirects.
  • Alternatively, configure custom_headers to exclude any authentication or API‑key information, or enforce sanitization of those headers before adding them.
  • Finally, monitor traffic for unexpected redirect patterns that might indicate exploitation attempts.

Generated by OpenCVE AI on September 17, 2026 at 22:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9g45-5xwm-f3wc RMCP: Custom HTTP headers leak to cross-origin redirect targets
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Modelcontextprotocol
Modelcontextprotocol rust-sdk
Vendors & Products Modelcontextprotocol
Modelcontextprotocol rust-sdk
Type Values Removed Values Added
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.
Title RMCP: Custom HTTP headers leak to cross-origin redirect targets
Weaknesses CWE-200
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N'}

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-212

    Improper Removal of Sensitive Information Before Storage or Transfer

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 19, 2026, 1:56 AM
Reserved
Jul 20, 2026, 5:12 PM
Status
Awaiting Analysis
Published
Sep 16, 2026, 10:17 PM
Modified
Sep 23, 2026, 6:12 PM
Severity
Moderate
Public date
Sep 16, 2026, 9:18 PM