- Exploited
- No known exploitation
- Fix
- Fixed in 2.0.0
- Who is exposed
- Not reported
Do first: Upgrade to a fixed version: 2.0.0.
- Last modified
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 20/100 · provisional
- The rating the maker of the software gives it. Shown when it differs from the CVSS level.What do these mean? →
- Medium (ghsa)
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The rmcp OAuth client, a Rust SDK library for the Model Context Protocol, can be made to send an outbound GET request to any URL a malicious MCP server names in its WWW-Authenticate header, including localhost, private-network, or cloud metadata addresses. An attacker running a crafted server could use this server-side request forgery to reach internal services from the client's network position, though the exact impact depends on how the embedding application is deployed.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
Read the original description
The rmcp OAuth client accepts a server-controlled resource_metadata= URL from the WWW-Authenticate header and fetches it without same-origin or private-network validation.
An attacker-controlled MCP server can return a 401 WWW-Authenticate: Bearer resource_metadata="..." header pointing at an internal URL, including localhost, RFC 1918 addresses, or cloud metadata endpoints. The client then performs an outbound GET to that URL from the victim application's network context.
Affected version
- Repository:
modelcontextprotocol/rust-sdk - Crate:
rmcp - Current
mainreviewed:c330fede90e4729c234f8e87fdbc5ea27a1dd10c - Commit date: 2026-05-19
- Affected file:
crates/rmcp/src/transport/auth.rs - File blob:
3aa3e91310662c409af9dc38c9d584d6df217e9c - Severity framing: High/Medium SSRF, depending on the embedding application's network position and whether response parsing gives the attacker useful success/failure or chained fetch behavior.
Source evidence
extract_www_authenticate_params() accepts an absolute URL from the server-controlled header:
let resource_key = "resource_metadata=";
while let Some(pos) = header_lowercase[search_offset..].find(resource_key) {
let global_pos = search_offset + pos + resource_key.len();
let value_slice = &header[global_pos..];
if let Some((value, consumed)) = Self::parse_next_header_value(value_slice) {
if let Ok(url) = Url::parse(&value) {
params.resource_metadata_url = Some(url);
break;
}
if let Ok(url) = base_url.join(&value) {
params.resource_metadata_url = Some(url);
break;
}There is no check that the parsed URL shares origin with the original MCP server, and no block for loopback, link-local, RFC 1918, or metadata hostnames.
fetch_resource_metadata_from_url() then performs the GET:
let response = match self
.http_client
.get(resource_metadata_url.clone())
.header(HEADER_MCP_PROTOCOL_VERSION, "2024-11-05")
.send()
.awaitAgain, there is no same-origin, scheme, host, DNS, or IP-range validation before the request.
Attack scenario
- A Rust MCP client using
rmcpconnects to an attacker-controlled MCP server, or to a compromised MCP server. - The server responds to OAuth discovery with a
401and aWWW-Authenticateheader such as:
WWW-Authenticate: Bearer resource_metadata="http://169.254.169.254/latest/meta-data/"- The client parses the
resource_metadatavalue as a URL. - The client sends a GET request to that URL from the victim application's network context.
This can be used to probe internal services. In environments where the target endpoint returns JSON matching the expected metadata shape, the flow can also chain into additional authorization-server metadata fetches.
Impact
The direct impact is SSRF from any application embedding the rmcp OAuth client. Depending on where the client runs, this can reach:
- cloud metadata endpoints;
- localhost-only services;
- private VPC or container-network services;
- internal HTTP APIs not reachable from the attacker.
The attacker controls the URL through the MCP server response. The victim only needs to connect to the attacker's MCP server or a compromised server that can emit the crafted WWW-Authenticate header.
Public duplicate check
On 2026-05-27:
- Visible repository advisories were:
GHSA-9g45-5xwm-f3wc: custom HTTP headers leak to cross-origin redirect targets.GHSA-89vp-x53w-74fx: DNS rebinding in Streamable HTTP server transport.- Public issue search for
WWW-Authenticate resource_metadata SSRFreturned no open or closed matches. - Public issue search for
resource_metadatareturned one closed implementation issue,#517, about authorization discovery fallback behavior, not SSRF/resource validation.
This report is distinct from the redirect-header advisory and the DNS-rebinding advisory.
Suggested fix
Before accepting or fetching a resource_metadata URL:
- require the URL to be same-origin with the original MCP server URL, unless the spec intentionally permits a narrow trusted exception;
- reject loopback, link-local, RFC 1918, unique-local IPv6, and known cloud metadata hostnames;
- reject non-HTTP(S) schemes;
- apply the same validation to redirect targets and any follow-on metadata URLs.
A minimal same-origin check would compare scheme, host, and effective port:
fn is_same_origin(base: &Url, candidate: &Url) -> bool {
base.scheme() == candidate.scheme()
&& base.host() == candidate.host()
&& base.port_or_known_default() == candidate.port_or_known_default()
}If cross-origin resource_metadata is required for compatibility, it should be explicitly opted into and protected by private-network blocking.
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure?/25Unknown. No advisory context yet
- Reach16/20rmcp: 2.1M downloads a week
- Severity4/10Rated medium by ghsa
- No patch0/5No signal
What would change the score
- Would score about 75 if added to CISA KEV
- Would score about 70 if CISA's SSVC rates exploitation active
- Would score about 42 if advisories confirm default setups are exposed
Impact
- Widely used
rmcp has 2.1m weekly downloads.Source: crates.io
What to do
Upgrade to a fixed version: 2.0.0.
Timeline
- Advisory published38 days
- Record last updated
Affected versions
- rmcpcrates.io
fixed in 2.0.0
Fixed in 2.0.0 (released Jun 29, 2026, 95 days before disclosure).
The latest release, 3.9.0, is not affected.
Evidence 5
- Advisory
- Repository
- Repository
- Repository
- Repository
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about GHSA-C9XM-49CP-XCR9
Is GHSA-C9XM-49CP-XCR9 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
Which versions are affected by GHSA-C9XM-49CP-XCR9?
rmcp (crates.io): before 2.0.0.Source: cve.now feed data
How do I fix GHSA-C9XM-49CP-XCR9?
Upgrade to a fixed version: 2.0.0.Source: cve.now feed data