{"id":"CVE-2026-63127","aliases":["EUVD-2026-80824","GHSA-33f5-2c5q-wgwj","RHSA-2026:80764","RHSA-2026:80765","openSUSE-SU-2026:11849-1"],"status":"published","title":"RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery","description":"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.","severity":{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00195,"percentile":0.09309,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-345"],"published":"2026-09-16T14:50:54Z","modified":"2026-10-28T02:30:36Z","fixes":[{"ecosystem":"crates.io","package":"rmcp","fixed_in":["2.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"rmcp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"rmcp","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:9::extensions","package":"goose","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.45.0-1.el9_8"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:9::extensions","package":"goose-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.45.0-1.el9_8"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:9::extensions","package":"goose-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.45.0-1.el9_8"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:10.2","package":"goose","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.45.0-1.el10_2"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:10.2","package":"goose-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.45.0-1.el10_2"}]}],"bundled":4},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:10.2","package":"goose-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:1.45.0-1.el10_2"}]}],"bundled":4},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"openai-codex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.155.1-1.1"}]}],"bundled":3}],"products":[{"vendor":"modelcontextprotocol","product":"rust-sdk"}],"references":[{"url":"https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-33f5-2c5q-wgwj","tags":["x_refsource_CONFIRM","exploit","advisory","web","article"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk/pull/937","tags":["x_refsource_MISC","fix","web","article"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk/commit/c1a8b29ff2cc45e7820b900dae42cbb4958089ec","tags":["x_refsource_MISC","fix","web","article"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk/releases/tag/rmcp-v2.0.0","tags":["x_refsource_MISC","web","article"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63127","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-33f5-2c5q-wgwj"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63127.json","tags":["advisory"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk","tags":["package"]},{"url":"https://access.redhat.com/errata/RHSA-2026:80764","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#important","tags":["article"]},{"url":"https://issues.redhat.com/browse/RHEL-254952","tags":["article"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_80764.json","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-63127","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2535503","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-63127","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-63128","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2535485","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-63128","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63128","tags":["advisory"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk/commit/dfa7fd6f9309deab60bea230b041be9a3fcda846","tags":["article"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk/pull/934","tags":["article"]},{"url":"https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-9pj6-vhgr-3mwh","tags":["article"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-72718","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2513538","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-72718","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72718","tags":["advisory"]},{"url":"https://github.com/aaif-goose/goose/commit/f8b5b7ba1fe6d006ccf6942f6b85a1bae985a2de","tags":["article"]},{"url":"https://github.com/aaif-goose/goose/releases/tag/v1.44.0","tags":["article"]},{"url":"https://github.com/aaif-goose/goose/security/advisories/GHSA-r5pp-p5r8-466r","tags":["article"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-93599","tags":["report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2538431","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-93599","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-93599","tags":["advisory"]},{"url":"https://github.com/rustls/webpki/security/advisories/GHSA-82j2-j2ch-gfr8","tags":["article"]},{"url":"https://www.vulncheck.com/advisories/rustls-webpki-before-0.103.13-panic-via-empty-bit-string","tags":["article"]},{"url":"https://access.redhat.com/errata/RHSA-2026:80765","tags":["advisory"]},{"url":"https://issues.redhat.com/browse/RHEL-254954","tags":["article"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_80765.json","tags":["advisory"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-63127","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-63128","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-64684","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-63127","title":"RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery","description":"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.","status":"published","published":"2026-09-16T14:50:54.296Z","modified":"2026-09-16T15:39:26.956Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T14:19:55.914391Z"}],"euvd":[{"id":"EUVD-2026-80824","description":"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.","status":"published","published":"2026-09-16T14:50:54Z","modified":"2026-09-16T15:39:26Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high"}],"updated_at":"2026-11-02T17:28:15.407859Z"}],"ghsa":[{"id":"GHSA-33f5-2c5q-wgwj","title":"RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery","description":"### Summary\nThe `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.\n\n### Details\nRFC 9728 specifies two MUST requirements for resource parameter validation:\n- 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.\n- Section 3.3: if the `resource` value returned is not identical to the URL the client used, the data MUST NOT be used.\n\nIn the current implementation (`crates/rmcp/src/transport/auth.rs`), the `ResourceServerMetadata` struct (lines 390–394) does not include a resource field:\n```rust\nstruct ResourceServerMetadata {\n    authorization_server: Option\u003cString\u003e,\n    authorization_servers: Option\u003cVec\u003cString\u003e\u003e,\n    scopes_supported: Option\u003cVec\u003cString\u003e\u003e,\n}\n```\nAnd discover_oauth_server_via_resource_metadata() (lines 1446–1465) proceeds without any resource URL validation.\n\n#### Recommended fix\n1. Add the `resource` field to the struct:\n    ```rust\n    struct ResourceServerMetadata {\n        resource: Option\u003cString\u003e,  // RFC 9728 REQUIRED field\n        authorization_server: Option\u003cString\u003e,\n        authorization_servers: Option\u003cVec\u003cString\u003e\u003e,\n        scopes_supported: Option\u003cVec\u003cString\u003e\u003e,\n    }\n    ```\n2. Add validation logic after fetching metadata:\n    ```rust\n    let Some(resource_metadata) = self\n        .fetch_resource_metadata_from_url(\u0026resource_metadata_url)\n        .await?\n    else {\n        return Ok(None);\n    };\n \n    // RFC 9728: validate that the resource identifier matches our target server\n    if let Some(resource) = \u0026resource_metadata.resource {\n        if resource.trim_end_matches('/') != self.base_url.as_str().trim_end_matches('/') {\n            return Err(AuthError::MetadataError(format!(\n                \"Resource metadata mismatch: expected '{}', got '{}'\",\n                self.base_url, resource\n            )));\n        }\n    }\n    ```\n\n### PoC\n\n1. Attacker sets up a malicious MCP server at `fake-mcp.com/mcp`. \n2. At `fake-mcp.com/mcp/.well-known/oauth-protected-resource`, the attacker serves metadata declaring:\n    - resource: `real-mcp.com/mcp` (the legitimate server)\n    - authorization_servers: the legitimate authorization server(s) of `real-mcp.com/mcp`\n\n\n3. Victim configures any MCP client using `rmcp` to connect to `fake-mcp.com/mcp`.\n\n4. `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.\n5. The victim sees a legitimate authorization prompt and completes the flow.\n6. The resulting access token — valid for `real-mcp.com/mcp` — is sent to `fake-mcp.com/mcp` in subsequent requests.\n7. The attacker captures the token and can impersonate the victim on `real-mcp.com/mcp`.\n\n### Impact\nThis 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.\n\n#### Credit\nJian Cui, Minsun Shim, Zhou Li, Xiaojing Liao\nUniversity of Illinois Urbana-Champaign (UIUC)\nUniversity of California, Irvine (UCI)","status":"published","published":"2026-09-16T22:13:26Z","modified":"2026-09-16T22:13:27Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T14:41:17.136201Z"}],"nvd":[{"id":"CVE-2026-63127","description":"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.","status":"published","published":"2026-09-16T15:17:39.817Z","modified":"2026-09-30T17:51:56.193Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high","assessor":"secondary"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T14:12:48.630594Z"}],"osv":[{"id":"CVE-2026-63127","title":"RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery","description":"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.","status":"published","published":"2026-09-16T14:50:54.296Z","modified":"2026-10-28T02:30:36.946960969Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T15:45:13.306117Z"},{"id":"GHSA-33f5-2c5q-wgwj","title":"RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery","description":"### Summary\nThe `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.\n\n### Details\nRFC 9728 specifies two MUST requirements for resource parameter validation:\n- 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.\n- Section 3.3: if the `resource` value returned is not identical to the URL the client used, the data MUST NOT be used.\n\nIn the current implementation (`crates/rmcp/src/transport/auth.rs`), the `ResourceServerMetadata` struct (lines 390–394) does not include a resource field:\n```rust\nstruct ResourceServerMetadata {\n    authorization_server: Option\u003cString\u003e,\n    authorization_servers: Option\u003cVec\u003cString\u003e\u003e,\n    scopes_supported: Option\u003cVec\u003cString\u003e\u003e,\n}\n```\nAnd discover_oauth_server_via_resource_metadata() (lines 1446–1465) proceeds without any resource URL validation.\n\n#### Recommended fix\n1. Add the `resource` field to the struct:\n    ```rust\n    struct ResourceServerMetadata {\n        resource: Option\u003cString\u003e,  // RFC 9728 REQUIRED field\n        authorization_server: Option\u003cString\u003e,\n        authorization_servers: Option\u003cVec\u003cString\u003e\u003e,\n        scopes_supported: Option\u003cVec\u003cString\u003e\u003e,\n    }\n    ```\n2. Add validation logic after fetching metadata:\n    ```rust\n    let Some(resource_metadata) = self\n        .fetch_resource_metadata_from_url(\u0026resource_metadata_url)\n        .await?\n    else {\n        return Ok(None);\n    };\n \n    // RFC 9728: validate that the resource identifier matches our target server\n    if let Some(resource) = \u0026resource_metadata.resource {\n        if resource.trim_end_matches('/') != self.base_url.as_str().trim_end_matches('/') {\n            return Err(AuthError::MetadataError(format!(\n                \"Resource metadata mismatch: expected '{}', got '{}'\",\n                self.base_url, resource\n            )));\n        }\n    }\n    ```\n\n### PoC\n\n1. Attacker sets up a malicious MCP server at `fake-mcp.com/mcp`. \n2. At `fake-mcp.com/mcp/.well-known/oauth-protected-resource`, the attacker serves metadata declaring:\n    - resource: `real-mcp.com/mcp` (the legitimate server)\n    - authorization_servers: the legitimate authorization server(s) of `real-mcp.com/mcp`\n\n\n3. Victim configures any MCP client using `rmcp` to connect to `fake-mcp.com/mcp`.\n\n4. `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.\n5. The victim sees a legitimate authorization prompt and completes the flow.\n6. The resulting access token — valid for `real-mcp.com/mcp` — is sent to `fake-mcp.com/mcp` in subsequent requests.\n7. The attacker captures the token and can impersonate the victim on `real-mcp.com/mcp`.\n\n### Impact\nThis 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.\n\n#### Credit\nJian Cui, Minsun Shim, Zhou Li, Xiaojing Liao\nUniversity of Illinois Urbana-Champaign (UIUC)\nUniversity of California, Irvine (UCI)","status":"published","published":"2026-09-16T22:13:26Z","modified":"2026-09-16T22:30:08.107391372Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T15:46:35.050232Z"},{"id":"RHSA-2026:80764","title":"Red Hat Security Advisory: goose security update","status":"published","published":"2026-10-14T10:32:15Z","modified":"2026-10-20T10:16:50Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high"}],"updated_at":"2026-11-02T15:53:23.547034Z"},{"id":"RHSA-2026:80765","title":"Red Hat Security Advisory: goose security update","status":"published","published":"2026-10-14T10:32:16Z","modified":"2026-10-20T10:16:50Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","level":"high"}],"updated_at":"2026-11-02T15:53:23.547034Z"},{"id":"openSUSE-SU-2026:11849-1","title":"openai-codex-0.155.1-1.1 on GA media","description":"These are all security issues fixed in the openai-codex-0.155.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-09-22T00:00:00Z","modified":"2026-09-23T09:15:05.848245611Z","updated_at":"2026-11-02T16:58:39.516824Z"}]}}
