CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63127

CVE-2026-63127: OAuth Resource Spoofing and Token Leakage in rmcp SDK

Alon Barad
Alon Barad
Software Engineer

Sep 17, 2026·7 min read·2 visits

Executive Summary (TL;DR)

A missing validation of the RFC 9728 'resource' field in the rmcp crate allows rogue MCP servers to perform OAuth resource spoofing and capture legitimate access tokens.

An OAuth resource spoofing vulnerability in the rmcp crate prior to 2.0.0 allows a malicious Model Context Protocol (MCP) server to spoof protected resource metadata. By presenting metadata pointing to a legitimate resource and authorization server, the attacker can trick the client into completing the authentication flow and subsequently sending the authorized token back to the malicious server.

Vulnerability Overview

The rmcp crate is the official Rust Software Development Kit (SDK) implementing the Model Context Protocol (MCP). The framework operates as a standardized integration layer enabling Large Language Models (LLMs) to communicate with external data sources, applications, and custom tools. In highly secure environments, these transport connections are governed by robust authentication protocols, typically utilizing OAuth 2.0 frameworks. Specifically, the library implements OAuth Protected Resource Metadata discovery as defined under RFC 9728, which outlines the procedure for clients to automatically discover and trust authorization servers that correspond to given resource endpoints.

A high-severity vulnerability designated as CVE-2026-63127 exists in the client's transport authentication implementation, specifically within crates/rmcp/src/transport/auth.rs. Prior to version 2.0.0, the rmcp library did not validate that the resource identifiers returned during the automated discovery flow matched the target server with which the client established the original connection. This design flaw introduces an unauthenticated remote resource spoofing attack vector that compromises the security guarantees of the OAuth handshake.

This weakness is categorized under CWE-345 (Insufficient Verification of Data Authenticity), representing a failure to validate the binding between the metadata issuer and the actual resource identity. If an attacker hosts or compromises an MCP server, they can trick a connecting client into initiating an authentication flow with a legitimate, trusted third-party authorization server. Upon completion of this flow, the client mistakenly transmits the acquired high-privilege access token directly to the attacker's server, enabling downstream impersonation.

Root Cause Analysis

The technical breakdown of the vulnerability centers on the deserialization and subsequent validation logic in the discover_oauth_server_via_resource_metadata routine. According to RFC 9728 Sections 3.3 and 7.3, when a client performs metadata discovery, the resource server must return a JSON payload detailing its capabilities. Critically, the client is required to assert that the resource field inside the metadata response exactly matches the requested resource URL. This mechanism is critical to prevent resource server impersonation.

In affected versions of the rmcp crate, the JSON deserialization model ResourceServerMetadata did not contain the resource field. The library discarded this key entirely during deserialization because the struct was mapped using serde macro traits without a corresponding field placeholder. Consequently, the application logic was blind to the resource claim returned by the server, rendering it incapable of performing any validation checks.

Because the library completely ignored this property, the client did not perform the essential matching of domains, ports, or paths. If a user connected their client to an untrusted or malicious server, the server could instruct the client to authenticate against an arbitrary, highly-trusted authorization server. The validation layer failed to check the legitimacy of this binding, allowing the client to execute the entire OAuth PKCE workflow against the real authorization server under the false context of the untrusted connection.

Code Analysis

To understand the precise code-level flaw, we must analyze the structure of the deserialization schema in crates/rmcp/src/transport/auth.rs prior to the patch.

// Vulnerable Struct Definition
#[derive(Debug, Clone, Deserialize)]
struct ResourceServerMetadata {
    // Note the complete absence of the "resource" field
    authorization_server: Option<String>,
    authorization_servers: Option<Vec<String>>,
    scopes_supported: Option<Vec<String>>,
}

The absence of the resource field meant any server-side value assigned to it was dropped during the deserialization cycle. To fix this, the patch introduces the resource field and implements a strict check in AuthorizationManager::discover_metadata.

// Patched Struct Definition
#[derive(Debug, Clone, Deserialize)]
struct ResourceServerMetadata {
    resource: Option<String>,
    authorization_server: Option<String>,
    authorization_servers: Option<Vec<String>>,
    scopes_supported: Option<Vec<String>>,
}

The validation helper function validate_resource_metadata_resource checks whether the target is valid:

impl AuthorizationManager {
    fn validate_resource_metadata_resource(
        &self,
        metadata: &ResourceServerMetadata,
    ) -> Result<(), AuthError> {
        let Some(resource) = metadata.resource.as_deref() else {
            return Err(AuthError::MetadataError(
                "Protected resource metadata missing required resource field".to_string(),
            ));
        };
 
        if !Self::resource_identifiers_match(self.base_url.as_str(), resource) {
            return Err(AuthError::MetadataError(format!(
                "Protected resource metadata resource mismatch: expected '{}', got '{}'",
                self.base_url, resource
            )));
        }
 
        Ok(())
    }
}

Furthermore, the matching logic utilizes resource_identifiers_match and is_root_resource_identifier to verify root path uniformity. It allows discrepancies limited strictly to root-level trailing slashes, thereby protecting against basic formatting differences while rejecting path traversal or cross-domain deviations.

Exploitation Methodology

Exploiting CVE-2026-63127 relies on standard HTTP manipulation techniques without requiring any advanced host penetration. First, the attacker registers or compromises a public or accessible endpoint, acting as a malicious Model Context Protocol server located at https://attacker-mcp.io. The attacker then waits for a victim client—such as an LLM agent framework configured with the rmcp crate and OAuth features enabled—to initiate a connection.

When the victim connects to the attacker-controlled server, the server responds with an HTTP 401 Unauthorized status code accompanied by a customized challenge header: WWW-Authenticate: Bearer resource_metadata="https://attacker-mcp.io/.well-known/oauth-protected-resource". This header directs the vulnerable client to perform metadata discovery at the specified path.

When the client retrieves the metadata, the attacker's server serves a crafted JSON response:

{
  "resource": "https://trusted-mcp.com",
  "authorization_servers": ["https://auth.trusted-mcp.com"]
}

The client deserializes this metadata, parses the legitimate authorization server list, and starts the login handshake. The victim's browser is launched to complete the authentication against https://auth.trusted-mcp.com.

After the victim successfully signs in and authorizes the application, the client completes the authorization code exchange to fetch an access token. Because the underlying connection state is still bound to https://attacker-mcp.io, the client transmits the legitimate bearer token to the attacker's endpoint. The attacker intercepts this token and can immediately perform authenticated operations on the target https://trusted-mcp.com server within the permissions granted by the stolen scopes.

Impact Assessment

The impact of this resource spoofing flaw is substantial, representing a complete bypass of the security boundary separating distinct OAuth resource domains. Since the vulnerability allows the direct capture of active OAuth bearer tokens, the attacker gains full read, write, or administrative access to the victim's target resource server, restricted only by the scopes assigned to the intercepted token.

In the context of CVSS 3.1, this vulnerability results in a Scope Change (S:C). This is because the compromise of the client's connection to the malicious server directly translates into unauthorized access to a distinct security authority (the trusted resource server). The confidentiality impact is High (C:H), and the integrity impact is Low (I:L) depending on the permissions of the scope requested by the target OAuth server.

No availability impact (A:N) is directly linked to this token theft. The base score is assessed at 8.2 (High). Since the attack requires the victim to click through a standard authentication prompt, user interaction is marked as Required (UI:R), but the complexity of execution remains Low (AC:L), and no initial privileges are required (PR:N) to initiate the spoofing sequence.

Remediation & Defensive Measures

To mitigate the risk of CVE-2026-63127, administrators and developers must upgrade the rmcp dependency to version 2.0.0 or higher. This update alters the deserialization engine to strictly enforce RFC 9728 validation standards, dropping connections where there is a mismatch between the metadata resource field and the connection base URL. Developers should adjust their Cargo.toml file to require version 2.0.0 or later and ensure that lockfiles are fully regenerated.

For environments where immediate library upgrading is impossible, temporary mitigation strategies must be applied. Network administrators can implement Web Application Firewall (WAF) rules or egress filters to block outgoing HTTP requests from client instances to unauthorized or unverified OAuth authorization and metadata endpoints. Additionally, client integrations should disable dynamic metadata discovery and enforce hardcoded, pre-approved lists of authorization servers for each active connection.

In addition to updating dependencies, software developers should treat this vulnerability as a lesson in input validation. Any security framework that delegates authentication parameters to a third party must verify the provenance and identity claims of that third party. Regression test suites should incorporate test assertions that deliberately introduce invalid or mismatched resource metadata to verify that the handshake fails gracefully under incorrect parameters.

Official Patches

modelcontextprotocolPull request incorporating the RFC 9728 resource verification fix

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Affected Systems

Model Context Protocol (MCP) clients using the rmcp crate with OAuth features enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
rmcp
modelcontextprotocol
< 2.0.02.0.0
AttributeDetail
CWE IDCWE-345
Attack VectorNetwork (AV:N)
CVSS v3.1 Score8.2 (High)
EPSS ScoreN/A
ImpactConfidentiality High (C:H), Integrity Low (I:L), Scope Changed (S:C)
Exploit StatusProof-of-Concept (PoC) available in official test suite
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1539Steal Web Session Cookie / Token
Credential Access
T1556Modify Authentication Process
Credential Access / Lateral Movement
CWE-345
Insufficient Verification of Data Authenticity

The software does not sufficiently verify the authenticity of data, which can lead to accepting forged or manipulated information.

Known Exploits & Detection

GitHub Test SuiteA comprehensive set of regression tests asserting correct rejection of mismatched resources and missing resource fields in RFC 9728 discovery.

Vulnerability Timeline

Fix commit published and PR #937 merged
2026-06-27
Release rmcp-v2.0.0 published
2026-06-27

References & Sources

  • [1]GHSA-33f5-2c5q-wgwj: OAuth Resource Spoofing Vulnerability in rmcp Crate
  • [2]Pull Request #937
  • [3]Fix Commit
  • [4]Release rmcp-v2.0.0
  • [5]CVE-2026-63127 NVD Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•9 minutes ago•CVE-2026-61453
6.1

CVE-2026-61453: Stored Cross-Site Scripting via Twig String Concatenation Bypass in Grav CMS

Grav CMS before v2.0.1 contains a security bypass vulnerability in its blueprint validation logic. The XSS detection routine, Security::detectXss(), was executed on raw page contents prior to Twig engine processing. When Twig processing is enabled for editor-authored page content, an attacker can dynamically reconstruct harmful HTML elements, attributes, or protocols using string concatenation (e.g. `{{ 'on' ~ 'error' }}`). When compiled, the benign source converts into active XSS payloads, which are rendered to the client browser via raw filters. This vulnerability was resolved in version 2.0.1 by adding a post-render validation backstop.

Alon Barad
Alon Barad
0 views•7 min read
•about 2 hours ago•CVE-2026-63128
7.5

CVE-2026-63128: Uncontrolled Resource Consumption in Model Context Protocol Rust SDK (rmcp)

CVE-2026-63128 is a high-severity uncontrolled resource consumption vulnerability in the Model Context Protocol (MCP) official Rust SDK (the rmcp crate) prior to version 2.0.0. An unauthenticated attacker can exploit this vulnerability by sending malformed or mismatching handshake requests to the stateful Streamable HTTP server, causing persistent memory allocation without cleanup. This results in an unbounded memory leak and lock contention that ultimately leads to complete denial of service.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 3 hours ago•CVE-2026-63671
8.1

CVE-2026-63671: Cross-Site Scripting (XSS) Sanitizer Bypass in @nuxtjs/mdc

A cross-site scripting (XSS) vulnerability was identified in @nuxtjs/mdc prior to version 0.22.1. Gaps in the HTML/SVG attribute verification and URL protocol parsing allow unauthenticated remote attackers to bypass the application's sanitization routines. By embedding malicious SVG links or data-encoded iframe elements within Markdown, attackers can execute arbitrary JavaScript in the victim's browser context.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-58657
6.5

CVE-2026-58657: Stored CSS Injection in Grav CMS Media Resize Parser

CVE-2026-58657 is a critical stored CSS injection vulnerability in Grav CMS's media processing pipeline. By exploiting improper sanitization of image dimensions in the resize helper, low-privileged users with page editing permissions can inject arbitrary CSS styles. This can lead to visual defacement, UI redressing, and indirect data exfiltration.

Alon Barad
Alon Barad
3 views•4 min read
•about 5 hours ago•CVE-2026-61709
5.3

CVE-2026-61709: Improper Policy Enforcement and Exclusion Bypass in OpenFGA ListUsers API

An authorization-decision over-inclusion vulnerability exists in the OpenFGA authorization engine. The flaw manifests within the `ListUsers` API evaluation path when evaluating complex relationship intersections containing exclusions. Under certain configurations involving wildcards, the exclusion is bypassed, leading to incorrect permission lists.

Alon Barad
Alon Barad
8 views•7 min read
•about 6 hours ago•CVE-2026-61594
9.1

CVE-2026-61594: Authorization Bypass on WebSocket and SSE Mount Paths in djust

An authorization bypass vulnerability exists in the djust framework (djust-org/djust) prior to version 1.0.7. The framework fails to enforce standard Django view-level authorization mechanisms, such as AccessMixins or dispatch decorators, when mounting reactive views over stateful transport layers (WebSockets and Server-Sent Events). Unauthenticated or low-privileged attackers can establish persistent connections to mount arbitrary protected views and execute state-changing event handlers.

Amit Schendel
Amit Schendel
8 views•7 min read