CVE-2026-63127: RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery
RMCP is an official Rust SDK for the Model Context Protocol. Prior to 2.0.0, the rmcp crate's OAuth implementation in crates/rmcp/src/transport/auth.rs omits the RFC 9728 resource field from ResourceServerMetadata and allows discoveroauthserverviaresourcemetadata to use protected-resource metadata without confirming that the returned resource identifier exactly matches the configured MCP server. A malicious MCP server can publish metadata for a different legitimate MCP resource and its authorization server, causing a victim who connects and completes the authorization flow to obtain a legitimate access token that the client subsequently sends to the malicious server. The attacker can capture the token and impersonate the victim against the legitimate MCP resource within the token's granted scopes. This issue is fixed in version 2.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rmcp crate (crates/rmcp/src/transport/auth.rs OAuth implementation)to a version that resolves this vulnerability.Fixed in 2.0.0
Event History
Frequently Asked Questions
Which deployments are affected?
Deployments using the rmcp crate's OAuth implementation in versions before 2.0.0 are affected. The issue is in the OAuth transport authentication code and the protected-resource metadata discovery flow.
What must an attacker do to obtain a token?
The attacker must operate a malicious MCP server and induce a victim to connect to it and complete the OAuth authorization flow. The malicious server can point metadata at a legitimate MCP resource and authorization server, after which it receives the access token sent by the client.
What is the impact if exploitation succeeds?
The attacker can capture a legitimate access token and impersonate the victim against the legitimate MCP resource, limited to the scopes granted to that token. Confidentiality impact is high and integrity impact is low according to the provided vector.
What is the available remediation?
Upgrade to rmcp version 2.0.0, which fixes the issue. The fix addresses validation of the protected-resource metadata resource identifier against the configured MCP server.