Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
GHSA-c9xm-49cp-xcr9No CVE assigned

rmcp OAuth client fetches server-controlled resource_metadata URLs

Products / packages rmcp

Published

Share

Severity and exploitation

KEV unavailable / staleSource: MODERATE

KEV coverage does not rule out exploitation.

KEV checked 29/11/2026, 02:25:30 UTC
OSV · CVSS:4.0 · 6.3
Assessment vectorCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Severity

medium6.3

CVSS measures technical severity, not the likelihood of an attack.

Known exploitation

KEV status unavailable or stale

Absence from CISA KEV does not rule out attacks.

Public exploit

Not established by this record

Missing evidence does not mean no public exploit exists.

Remediation

Package fixes recorded

Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.

What this means

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.

Source excerpt · OSV

Attack conditions

  • 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.

Excerpt from the original source description below.

Review supporting sources →

Affected versions

Check the exact model, release, and any platform requirements against your installation.

Packages

Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.

rmcp crates.io
Affected range Recorded fix
Earlier releases before 2.0.0Semantic versions2.0.0

Version evidence: OSV · GHSA-c9xm-49cp-xcr9

View original version evidence (0 explicit versions)

What to do

Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.

Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.

cve.new guidance unless attributed to a publisher. This page does not inspect your installation.

Public exploit evidence

No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.

Original source description

Read the full publisher description

Summary

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 main reviewed: 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()
    .await

Again, there is no same-origin, scheme, host, DNS, or IP-range validation before the request.

Attack scenario

  1. A Rust MCP client using rmcp connects to an attacker-controlled MCP server, or to a compromised MCP server.
  2. The server responds to OAuth discovery with a 401 and a WWW-Authenticate header such as:
WWW-Authenticate: Bearer resource_metadata="http://169.254.169.254/latest/meta-data/"
  1. The client parses the resource_metadata value as a URL.
  2. 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 SSRF returned no open or closed matches.
  • Public issue search for resource_metadata returned 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.

References

5 sources

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification · not supplied
Additional publishers · not supplied

Describes the evidence in this view, not whether the product is safe.

Original records

No official CVE record has been imported. Use the source links below for the original advisory.

cve.new JSON →

Timeline

All times UTC
  1. Advisory published

    Publication date supplied by the source.

  2. Source updated

    Latest modification date supplied by the source.

  3. Last imported by cve.new

    Latest catalog import, not the date we first saw this advisory.

What changed

Follow changes
No substantive changes have been recorded here yet. History starts when cve.new observes a change after tracking is enabled; earlier edits are not reconstructed.

Large field values are marked as truncated previews. Original source snapshots remain retained.

Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.

medium6.5
RUSTSEC-2026-0462No CVE assignedPackage fixes recorded

Unbounded response body buffering in Streamable HTTP clients

Before 3.9.0, the built-in Streamable HTTP clients in rmcp read non-streaming HTTP response bodies into memory with no size limit. Both the reqwest client (transport-streamable-http-client-reqwest) and the Unix socket client (transport-streamable-http-client-unix-socket) were affected:

Recorded fixes — rmcp: 3.9.0. Check your release branch.

Exploitation not established

unknown
RUSTSEC-2026-0457No CVE assignedPackage fixes recorded

OAuth client SSRF filter checks host strings, not resolved addresses

From 2.0.0 until 3.7.0, the rmcp OAuth client decided whether it may fetch an authorization server's metadata URL by inspecting only the host string. It rejected literal loopback, private and link-local IP addresses and known cloud metadata hostnames, but it did not resolve other hostnames. A hostname that resolves to an internal address passed the check.

Recorded fixes — rmcp: 3.7.0. Check your release branch.

Exploitation not established

high7.5
RUSTSEC-2026-0461No CVE assignedPackage fixes recorded

Unbounded tool schema cache in Streamable HTTP server transport

From 3.0.0 until 3.6.0, StreamableHttpService cached the result of ServerHandler::get_tool in a process-wide map keyed by the tool name of incoming tools/call requests. The map had no size limit and no eviction, and it also cached unknown tool names.

Recorded fixes — rmcp: 3.6.0. Check your release branch.

Exploitation not established