The client parses the resource_metadata value 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 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: