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 discover_oauth_server_via_resource_metadata 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.2
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 discover_oauth_server_via_resource_metadata 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.
- Record
CVE-2026-63127- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
EUVDEUVD-2026-80824
8.2
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 discover_oauth_server_via_resource_metadata 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.
- Record
EUVD-2026-80824- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-33f5-2c5q-wgwj
8.2
RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery
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
resourcevalue in the returned metadata document. - Section 3.3: if the
resourcevalue 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
- Add the
resourcefield 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>>, } - 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
-
Attacker sets up a malicious MCP server at
fake-mcp.com/mcp. -
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
- resource:
-
Victim configures any MCP client using
rmcpto connect tofake-mcp.com/mcp. -
rmcpfetches the protected resource metadata and, without validating that theresourcefield (real-mcp.com/mcp) differs from the configured server (fake-mcp.com/mcp), initiates an OAuth flow with the legitimate authorization server. -
The victim sees a legitimate authorization prompt and completes the flow.
-
The resulting access token — valid for
real-mcp.com/mcp— is sent tofake-mcp.com/mcpin subsequent requests. -
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)
- Record
GHSA-33f5-2c5q-wgwj- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
NVD
8.2
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 discover_oauth_server_via_resource_metadata 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.
- Record
CVE-2026-63127- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
OSV
8.2
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 discover_oauth_server_via_resource_metadata 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.
- Record
CVE-2026-63127- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
OSVGHSA-33f5-2c5q-wgwj
8.2
RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery
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
resourcevalue in the returned metadata document. - Section 3.3: if the
resourcevalue 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
- Add the
resourcefield 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>>, } - 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
-
Attacker sets up a malicious MCP server at
fake-mcp.com/mcp. -
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
- resource:
-
Victim configures any MCP client using
rmcpto connect tofake-mcp.com/mcp. -
rmcpfetches the protected resource metadata and, without validating that theresourcefield (real-mcp.com/mcp) differs from the configured server (fake-mcp.com/mcp), initiates an OAuth flow with the legitimate authorization server. -
The victim sees a legitimate authorization prompt and completes the flow.
-
The resulting access token — valid for
real-mcp.com/mcp— is sent tofake-mcp.com/mcpin subsequent requests. -
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)
- Record
GHSA-33f5-2c5q-wgwj- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-345
- Updated
- 2026-11-02
OSVRHSA-2026:80764
8.2
Red Hat Security Advisory: goose security update
- Record
RHSA-2026:80764- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Updated
- 2026-11-02
OSVRHSA-2026:80765
8.2
Red Hat Security Advisory: goose security update
- Record
RHSA-2026:80765- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11849-1 No score
openai-codex-0.155.1-1.1 on GA media
These are all security issues fixed in the openai-codex-0.155.1-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11849-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rmcpcrates.io |
before 2.0.0 | 2.0.0 |
gooseRed Hat:enterprise_linux:9::extensions From an advisory covering 4 CVEs |
before 0:1.45.0-1.el9_8 | 0:1.45.0-1.el9_8 |
goose-debuginfoRed Hat:enterprise_linux:9::extensions From an advisory covering 4 CVEs |
before 0:1.45.0-1.el9_8 | 0:1.45.0-1.el9_8 |
goose-debugsourceRed Hat:enterprise_linux:9::extensions From an advisory covering 4 CVEs |
before 0:1.45.0-1.el9_8 | 0:1.45.0-1.el9_8 |
gooseRed Hat:enterprise_linux:10.2 From an advisory covering 4 CVEs |
before 0:1.45.0-1.el10_2 | 0:1.45.0-1.el10_2 |
goose-debuginfoRed Hat:enterprise_linux:10.2 From an advisory covering 4 CVEs |
before 0:1.45.0-1.el10_2 | 0:1.45.0-1.el10_2 |
goose-debugsourceRed Hat:enterprise_linux:10.2 From an advisory covering 4 CVEs |
before 0:1.45.0-1.el10_2 | 0:1.45.0-1.el10_2 |
openai-codexopenSUSE:Tumbleweed From an advisory covering 3 CVEs |
before 0.155.1-1.1 | 0.155.1-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-63127 is a high vulnerability (CVSS 8.2) in Modelcontextprotocol Rust-sdk, published September 16, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.19%, the 9th percentile. Fixed in rmcp 2.0.0.
References
github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-33f5-2c5q-wgwj
github.com/modelcontextprotocol/rust-sdk/pull/937
github.com/modelcontextprotocol/rust-sdk/commit/c1a8b29ff2cc45e7820b900dae42cbb4958089ec
github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.0.0
nvd.nist.gov/vuln/detail/CVE-2026-63127
github.com/advisories/GHSA-33f5-2c5q-wgwj
Show 35 moreShow less
github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63127.json
github.com/modelcontextprotocol/rust-sdk
access.redhat.com/errata/RHSA-2026:80764
access.redhat.com/security/updates/classification
issues.redhat.com/browse/RHEL-254952
security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_80764.json
access.redhat.com/security/cve/CVE-2026-63127
bugzilla.redhat.com/show_bug.cgi?id=2535503
cve.org/CVERecord?id=CVE-2026-63127
access.redhat.com/security/cve/CVE-2026-63128
bugzilla.redhat.com/show_bug.cgi?id=2535485
cve.org/CVERecord?id=CVE-2026-63128
nvd.nist.gov/vuln/detail/CVE-2026-63128
github.com/modelcontextprotocol/rust-sdk/commit/dfa7fd6f9309deab60bea230b041be9a3fcda846
github.com/modelcontextprotocol/rust-sdk/pull/934
github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9pj6-vhgr-3mwh
access.redhat.com/security/cve/CVE-2026-72718
bugzilla.redhat.com/show_bug.cgi?id=2513538
cve.org/CVERecord?id=CVE-2026-72718
nvd.nist.gov/vuln/detail/CVE-2026-72718
github.com/aaif-goose/goose/commit/f8b5b7ba1fe6d006ccf6942f6b85a1bae985a2de
github.com/aaif-goose/goose/releases/tag/v1.44.0
github.com/aaif-goose/goose/security/advisories/GHSA-r5pp-p5r8-466r
access.redhat.com/security/cve/CVE-2026-93599
bugzilla.redhat.com/show_bug.cgi?id=2538431
cve.org/CVERecord?id=CVE-2026-93599
nvd.nist.gov/vuln/detail/CVE-2026-93599
github.com/rustls/webpki/security/advisories/GHSA-82j2-j2ch-gfr8
vulncheck.com/advisories/rustls-webpki-before-0.103.13-panic-via-empty-bit-string
access.redhat.com/errata/RHSA-2026:80765
issues.redhat.com/browse/RHEL-254954
security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_80765.json
suse.com/security/cve/CVE-2026-63127
suse.com/security/cve/CVE-2026-63128
suse.com/security/cve/CVE-2026-64684