{"id":"GHSA-9g45-5xwm-f3wc","revision":null,"records":[{"revision":"1f70d1494588474fbc6922197395d130","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-64684","aliases":[],"title":"RMCP: Custom HTTP headers leak to cross-origin redirect targets","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.","state":0,"publishedAt":"2026-09-16T21:18:48.886+00:00","modifiedAt":"2026-09-19T01:56:51.763+00:00","affected":[{"ecosystem":"Vendor product","name":"rust-sdk","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"modelcontextprotocol\",\n                    \"product\": \"rust-sdk\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.1.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"severity":"MEDIUM"}],"references":["https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9g45-5xwm-f3wc","https://github.com/modelcontextprotocol/rust-sdk/pull/936","https://github.com/modelcontextprotocol/rust-sdk/commit/496902b9cf2c8a947454718da31829ae776b969b","https://github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.1.0"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-64684","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-64684","identifiers":["CVE-2026-64684"]},"retained":false,"historicalAffected":[]},{"revision":"6fd187ceedb2486696b6fef0fe86d9b2","observedAt":"2026-11-11T15:07:42.488+00:00","statement":{"source":"euvd","id":"EUVD-2026-81266","aliases":["CVE-2026-64684","GHSA-9g45-5xwm-f3wc"],"title":"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 …","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"severity":null}],"references":["https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9g45-5xwm-f3wc","https://github.com/modelcontextprotocol/rust-sdk/pull/936","https://github.com/modelcontextprotocol/rust-sdk/commit/496902b9cf2c8a947454718da31829ae776b969b","https://github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.1.0"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-81266","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Sep 16, 2026, 9:18:48 PM","dateUpdated":"Sep 19, 2026, 1:56:51 AM"},"relatedAdvisories":[{"id":"openSUSE-SU-2026:11849-1","title":"openai-codex-0.155.1-1.1 on GA media","vulnerabilityIds":["CVE-2026-63127","CVE-2026-63128","CVE-2026-64684"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-81266","identifiers":["EUVD-2026-81266","CVE-2026-64684","GHSA-9g45-5xwm-f3wc"]},"retained":false,"historicalAffected":[]},{"revision":"47bf913562d64f08b8a95123682755e9","observedAt":"2026-10-25T15:18:45.851+00:00","statement":{"source":"nvd","id":"CVE-2026-64684","aliases":[],"title":"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 …","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.","state":0,"publishedAt":"2026-09-16T22:17:04.577+00:00","modifiedAt":"2026-09-23T18:12:04.247+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"severity":"MEDIUM"}],"references":["https://github.com/modelcontextprotocol/rust-sdk/commit/496902b9cf2c8a947454718da31829ae776b969b","https://github.com/modelcontextprotocol/rust-sdk/pull/936","https://github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.1.0","https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9g45-5xwm-f3wc"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-64684","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Awaiting Analysis","weaknesses":["CWE-200"],"productCriteria":[],"sourceDates":{"published":"2026-09-16T22:17:04.577","lastModified":"2026-09-23T18:12:04.247"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-64684","identifiers":["CVE-2026-64684"]},"retained":false,"historicalAffected":[]},{"revision":"ee89ed5dbbaa4b168b60550eaa04751c","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-9g45-5xwm-f3wc","aliases":["CVE-2026-64684"],"title":"RMCP: Custom HTTP headers leak to cross-origin redirect targets","description":"## Summary\n\nThe `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.\n\n## Affected versions\n\n- Repository: `github.com/modelcontextprotocol/rust-sdk`\n- Crate: `rmcp`\n- Commit tested: `c330fede90e4729c234f8e87fdbc5ea27a1dd10c` (HEAD, 2026-05-21)\n\n## Vulnerability\n\n**File:** `crates/rmcp/src/transport/common/reqwest/streamable_http_client.rs`\n\n**Root cause 1 — no redirect policy override:**\n\n```rust\n// Lines 302-307\nfn default_http_client() -> reqwest::Client {\n    reqwest::Client::builder()\n        .pool_max_idle_per_host(0)\n        .build()\n        .expect(\"failed to build default reqwest client\")\n}\n```\n\nNo `.redirect(reqwest::redirect::Policy::none())` call. The default `limited(10)` policy follows up to 10 redirects and, on cross-origin redirects, strips only `Authorization`, `Cookie`, and `Proxy-Authorization`.\n\n**Root cause 2 — custom headers not sensitivity-marked:**\n\n```rust\n// Lines 26-35\nfn apply_custom_headers(\n    mut builder: reqwest::RequestBuilder,\n    custom_headers: HashMap<HeaderName, HeaderValue>,\n) -> Result<reqwest::RequestBuilder, StreamableHttpError<reqwest::Error>> {\n    for (name, value) in custom_headers {\n        validate_custom_header(&name).map_err(StreamableHttpError::ReservedHeaderConflict)?;\n        builder = builder.header(name, value);  // no sensitivity marker\n    }\n    Ok(builder)\n}\n```\n\nHeaders added via `RequestBuilder::header()` are forwarded to redirect targets because reqwest only strips headers from its own sensitive-header list (`Authorization`, `Cookie`, `Proxy-Authorization`).\n\n**Exposed API:** `StreamableHttpClientTransportConfig.custom_headers` (line 1070), intended for custom auth headers:\n\n```rust\n/// Custom HTTP headers to include with every request\npub custom_headers: HashMap<HeaderName, HeaderValue>,\n```\n\n## Attack scenario\n\n1. A caller sets `custom_headers` with an API key for the MCP server:\n   ```rust\n   let config = StreamableHttpClientTransportConfig::with_uri(\"https://mcp.example.com/mcp\")\n       .custom_headers([(HeaderName::from_static(\"x-api-key\"),\n                         HeaderValue::from_static(\"my-secret-key\"))].into());\n   ```\n2. An attacker compromises `mcp.example.com` to return `307 Temporary Redirect` to `https://attacker.example.net/capture`.\n3. `rmcp` follows the redirect, forwarding `X-API-Key: my-secret-key` to `attacker.example.net`.\n4. The attacker captures the secret and reuses it to call the MCP server directly.\n\n## Negative control\n\nThe `auth_header` path (`StreamableHttpClientTransportConfig::auth_header()`) sets the value via `builder.bearer_auth(auth_header)`, which maps to the `Authorization` header — stripped by reqwest on cross-origin redirects. That path is not affected. Only `custom_headers` is vulnerable.\n\n## Fix\n\nIn `default_http_client()`, disable automatic redirect following:\n\n```rust\nfn default_http_client() -> reqwest::Client {\n    reqwest::Client::builder()\n        .pool_max_idle_per_host(0)\n        .redirect(reqwest::redirect::Policy::none())  // <-- add this\n        .build()\n        .expect(\"failed to build default reqwest client\")\n}\n```\n\nThe transport can then inspect `3xx` responses and decide whether to follow, stripping sensitive headers before doing so. Alternatively, use `reqwest::ClientBuilder::connection_verbose` or per-request `Request::headers_mut()` to remove auth headers before the redirect is followed.","state":0,"publishedAt":"2026-09-17T14:48:12+00:00","modifiedAt":"2026-09-17T16:45:06.215939+00:00","affected":[{"ecosystem":"crates.io","name":"rmcp","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9g45-5xwm-f3wc","https://nvd.nist.gov/vuln/detail/CVE-2026-64684","https://github.com/modelcontextprotocol/rust-sdk/pull/936","https://github.com/modelcontextprotocol/rust-sdk/commit/496902b9cf2c8a947454718da31829ae776b969b","https://github.com/modelcontextprotocol/rust-sdk","https://github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.1.0"],"sourceUrl":"https://github.com/advisories/GHSA-9g45-5xwm-f3wc","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-9g45-5xwm-f3wc","identifiers":["GHSA-9g45-5xwm-f3wc","CVE-2026-64684"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-12T18:18:51.9610599+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-12T18:18:51.9610599+00:00","lastSuccessAt":"2026-11-12T18:18:52.1359793+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:18:52.1359803+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-64752486c567b55b31fb0d7225f5222bcd0019564ac0ac5f0649e242c7b19299-436983018a0f2d42a11c05b3b04ba98c8ad3664129731f383f79e8cf6a19e2f9","complete":true,"records":424774,"lastAttemptAt":"2026-11-12T18:16:42.0266239+00:00","lastSuccessAt":"2026-11-12T18:16:41.2671502+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:16:42.0266239+00:00","snapshotPublishedAt":"2026-11-12T17:19:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-a6bc4e59bf274de6bccd2bd795defd8b","complete":true,"records":13775,"lastAttemptAt":"2026-11-12T18:19:15.1587038+00:00","lastSuccessAt":"2026-11-12T18:19:15.154+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:19:15.154+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13828,"expectedIdentifiers":13828,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-12T18:18:51.9610599+00:00","complete":true,"records":1123,"lastAttemptAt":"2026-11-12T18:18:51.9610599+00:00","lastSuccessAt":"2026-11-12T18:18:54.878817+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:18:54.8788175+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-c74733ed0c2f4bb3aa28f2921b528eb9","complete":true,"records":13775,"lastAttemptAt":"2026-11-12T18:19:14.2859916+00:00","lastSuccessAt":"2026-11-12T18:19:14.282+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:19:14.282+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13828,"expectedIdentifiers":13828,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-3562b6c78fd1bd0f0b55daf66a0926ae24f65e462df7f6d928caad458fc696bf","complete":true,"records":9947,"lastAttemptAt":"2026-11-12T18:18:51.9148238+00:00","lastSuccessAt":"2026-11-11T04:27:43.6877707+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:18:51.9148238+00:00","snapshotPublishedAt":"2026-11-11T03:32:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-4d60731753a2f72e455d1086e7203d0ef10843936dcc1cf2b45135e2caa204b0","complete":true,"records":2012,"lastAttemptAt":"2026-11-12T18:16:50.9322629+00:00","lastSuccessAt":"2026-11-12T18:16:50.7862525+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:16:50.9322629+00:00","snapshotPublishedAt":"2026-11-12T17:48:11+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-0d57668ba92a2918d0664e89ea91d467f8e6a2bc6330923eb883b74ac42a14ec","complete":true,"records":3125,"lastAttemptAt":"2026-11-12T18:18:51.9276914+00:00","lastSuccessAt":"2026-11-12T15:18:36.6112732+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:18:51.9276914+00:00","snapshotPublishedAt":"2026-11-12T14:48:37+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-5f552124b4be907bc00a2f540b60dd82b393dc198845ddee9ca4af23654583f8","complete":true,"records":231722,"lastAttemptAt":"2026-11-12T18:18:51.6701113+00:00","lastSuccessAt":"2026-11-12T18:18:50.0151941+00:00","error":null,"lastVerifiedAt":"2026-11-12T18:18:51.6701113+00:00","snapshotPublishedAt":"2026-11-12T17:33:22+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}