NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🦀
🦀 crates.io
Not in CISA KEV
HIGH severity

CVE-2026-63127 — rmcp

HIGHFix: modelcontextprotocol/rust-sdk@c1a8b29

CVE-2026-63127 is a high-severity (CVSS 8.2) CWE-345 vulnerability in rmcp. A fix is available for rmcp — see the affected versions and patch details below.

RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery

Also known asGHSA-33f5-2c5q-wgwj
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 1, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-63127.

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk-0.01%
Lower risk than most CVEs9th percentile — riskier than 9% of all scored CVEsHighest risk
0.00%0.23%0.47%0.70%0.2%0.2%Oct 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🦀rmcp

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

Summary

The rmcp library does not validate the resource parameter in OAuth Protected Resource metadata (RFC 9728), allowing a malicious MCP server to redirect OAuth flows to a legitimate authorization server and steal the resulting access tokens.

Details

RFC 9728 specifies two MUST requirements for resource parameter validation:

  • Section 7.3: the client MUST ensure that the resource identifier URL it is using as the prefix for the metadata request exactly matches the resource value in the returned metadata document.
  • Section 3.3: if the resource value returned is not identical to the URL the client used, the data MUST NOT be used.

In the current implementation (crates/rmcp/src/transport/auth.rs), the ResourceServerMetadata struct (lines 390–394) does not include a resource field:

struct ResourceServerMetadata {
    authorization_server: Option<String>,
    authorization_servers: Option<Vec<String>>,
    scopes_supported: Option<Vec<String>>,
}

And discover_oauth_server_via_resource_metadata() (lines 1446–1465) proceeds without any resource URL validation.

Recommended fix

  1. Add the resource field to the struct:
    struct ResourceServerMetadata {
        resource: Option<String>,  // RFC 9728 REQUIRED field
        authorization_server: Option<String>,
        authorization_servers: Option<Vec<String>>,
        scopes_supported: Option<Vec<String>>,
    }
    
  2. Add validation logic after fetching metadata:
    let Some(resource_metadata) = self
        .fetch_resource_metadata_from_url(&resource_metadata_url)
        .await?
    else {
        return Ok(None);
    };
    
    // RFC 9728: validate that the resource identifier matches our target server
    if let Some(resource) = &resource_metadata.resource {
        if resource.trim_end_matches('/') != self.base_url.as_str().trim_end_matches('/') {
            return Err(AuthError::MetadataError(format!(
                "Resource metadata mismatch: expected '{}', got '{}'",
                self.base_url, resource
            )));
        }
    }
    

PoC

  1. Attacker sets up a malicious MCP server at fake-mcp.com/mcp.

  2. At fake-mcp.com/mcp/.well-known/oauth-protected-resource, the attacker serves metadata declaring:

    • resource: real-mcp.com/mcp (the legitimate server)
    • authorization_servers: the legitimate authorization server(s) of real-mcp.com/mcp
  3. Victim configures any MCP client using rmcp to connect to fake-mcp.com/mcp.

  4. rmcp fetches the protected resource metadata and, without validating that the resource field (real-mcp.com/mcp) differs from the configured server (fake-mcp.com/mcp), initiates an OAuth flow with the legitimate authorization server.

  5. The victim sees a legitimate authorization prompt and completes the flow.

  6. The resulting access token — valid for real-mcp.com/mcp — is sent to fake-mcp.com/mcp in subsequent requests.

  7. The attacker captures the token and can impersonate the victim on real-mcp.com/mcp.

Impact

This is an access token theft vulnerability via OAuth resource metadata spoofing. All MCP clients built on rmcp that rely on OAuth-protected MCP servers are affected. An attacker who tricks a user into connecting to a malicious MCP server can steal valid access tokens for any legitimate MCP server, enabling full impersonation of the victim.

Credit

Jian Cui, Minsun Shim, Zhou Li, Xiaojing Liao University of Illinois Urbana-Champaign (UIUC) University of California, Irvine (UCI)

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iormcpall versions2.0.0cargo update -p rmcp --precise 2.0.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rmcp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update rmcp to 2.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-63127 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This is an Important flaw in the `rmcp` Rust SDK, which is utilized by the `goose` component in Red Hat products. The vulnerability allows a malicious Model Context Protocol (MCP) server to facilitate token impersonation by omitting a critical resource field during OAuth metadata discovery. This can lead to a client…

Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Source: Red Hat security advisory for CVE-2026-63127 (CC BY 4.0)

Frequently Asked Questions

### Summary The `rmcp` library does not validate the `resource` parameter in OAuth Protected Resource metadata (RFC 9728), allowing a malicious MCP server to redirect OAuth flows to a legitimate authorization server and steal the resulting access tokens. ### Details RFC 9728 specifies two MUST requirements for resource parameter validation: - Section 7.3: the client MUST ensure that the resource identifier URL it is using as the prefix for the metadata request exactly matches the `resource` value in the returned metadata document. - Section 3.3: if the `resource` value returned is not identic
O3 Security · Impact-Aware SCA

Is CVE-2026-63127 in your dependencies?

Find it across crates.io, including transitive dependencies.

CVE-2026-63127: rmcp — Fixed in 2.0.0