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-63128

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

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 17, 2026·6 min read·2 visits

Executive Summary (TL;DR)

The stateful HTTP server in the rmcp crate allocates session resources before validating request headers and bodies. If validation fails, the server exits early without reclaiming the allocated memory, leading to an unbounded memory leak and eventual server crash.

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.

Vulnerability Overview

The Model Context Protocol (MCP) official Rust SDK (the rmcp crate) contains an uncontrolled resource consumption vulnerability within its stateful Streamable HTTP server transport layer. This component, located in crates/rmcp/src/transport/streamable_http_server/tower.rs, exposes an endpoint for stateful communication over HTTP. The server relies on a central, stateful session table to track and process active bidirectional messaging contexts between clients and the server.

Under normal execution, clients must establish a stateful session by sending a valid JSON-RPC initialization request matching the expected version headers. The vulnerability manifests when an unauthenticated client transmits a message that fails validation before a session worker is fully initialized. This action causes the server to permanently retain state structures without ever invoking a cleanup path.

The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption), CWE-401 (Missing Release of Memory after Effective Lifetime), and CWE-772 (Missing Release of Resource after Effective Lifetime). Because this component is exposed to untrusted network traffic, unauthenticated attackers can remotely invoke the vulnerable path, inducing a persistent memory leak and resulting in a denial of service.

Root Cause Analysis

The root cause of CVE-2026-63128 lies in an asymmetric resource allocation-to-cleanup lifecycle in StreamableHttpService::handle_post. When an HTTP POST request is received, the server attempts to process the message context. However, it allocates and registers a new session state before validating the client's request message structure and matching protocol headers.

Specifically, the function invokes LocalSessionManager.create_session() as one of its first operations. This call instantiates a LocalSessionHandle inside the shared, thread-safe sessions table (backed by an RwLock<HashMap<SessionId, LocalSessionHandle>>) and allocates active Tokio multi-producer single-consumer (MPSC) channels. At this point, memory is allocated and registered globally.

Following allocation, the handler evaluates the request body to verify if it is an InitializeRequest and validates that the MCP-Protocol-Version HTTP header matches the protocol version declared in the payload. If either validation check fails, the handler aborts execution early and returns an error response (such as HTTP 400 or 422). Because the corresponding cleanup worker task (spawn_session_worker) has not been spawned, the registered LocalSessionHandle is never purged from the active session map, leaving it permanently orphaned.

Code Analysis

The vulnerable implementation of handle_post executes the allocation sequence prior to validating the message variant or headers. The following representation demonstrates how early error handling pathways bypass the cleanup registration.

// Vulnerable execution sequence in tower.rs
let (session_id, transport) = self
    .session_manager
    .create_session()
    .await
    .map_err(internal_error_response("create session"))?;
 
if let ClientJsonRpcMessage::Request(req) = &mut message {
    let ClientRequest::InitializeRequest(init_req) = &req.request else {
        // Error response is returned immediately; create_session state is leaked
        return Err(unexpected_message_response("initialize request"));
    };
    
    // Headers are checked after create_session has succeeded
    validate_header_matches_init_body(
        &part.headers,
        init_req.params.protocol_version.as_str(),
        Some(req.id.clone()),
    )?;
} else {
    return Err(unexpected_message_response("initialize request"));
}

The patch introduced in commit dfa7fd6f9309deab60bea230b041be9a3fcda846 remediates this vulnerability by validating both the incoming payload and headers before allocating any system resources. If the request fails header matching or contains an unexpected message type, the handler returns an error response without ever invoking create_session(). This prevents the creation of dangling handles in the sessions collection.

// Patched execution sequence in tower.rs
let stored_init_params = match &mut message {
    ClientJsonRpcMessage::Request(req) => {
        let ClientRequest::InitializeRequest(init_req) = &req.request else {
            return Err(unexpected_message_response("initialize request"));
        };
        validate_header_matches_init_body(
            &part.headers,
            init_req.params.protocol_version.as_str(),
            Some(req.id.clone()),
        )?;
        let stored_init_params = self
            .config
            .session_store
            .as_ref()
            .map(|_| init_req.params.clone());
        req.request.extensions_mut().insert(part);
        stored_init_params
    }
    _ => {
        return Err(unexpected_message_response("initialize request"));
    }
};
 
let service = self
    .get_service()
    .map_err(internal_error_response("get service"))?;
 
// Session allocation is deferred until validation successfully passes
let (session_id, transport) = self
    .session_manager
    .create_session()
    .await
    .map_err(internal_error_response("create session"))?;

Exploitation

Exploitation of this vulnerability requires network access to the stateful Streamable HTTP server endpoint. No authentication or elevated credentials are required to initiate the vulnerable execution path. The attacker constructs a well-formed JSON-RPC POST payload that uses a valid method schema but does not perform the mandatory initial handshake.

An attacker can transmit a message such as a request calling a non-initialization method (e.g., tools/list or resources/list) to the stateful server endpoint. Alternatively, an attacker can transmit an InitializeRequest with mismatched values between the MCP-Protocol-Version HTTP header and the internal protocol version defined in the JSON payload body.

Upon receiving the request, the server allocates stateful tracking objects and writes them to the memory table. Since the payload fails structural validation, the connection is closed and an error response is returned, leaving the allocated session dangling in memory. By executing this routine in a high-frequency loop, an attacker can continuously grow the server's session table, causing memory exhaustion and critical lock contention.

Impact Assessment

The primary operational impact of CVE-2026-63128 is a complete denial of service. Because each validation failure leaks an active session handle, memory consumption grows linearly based on the volume of unauthenticated requests transmitted by the attacker. Eventually, the operating system's Out-Of-Memory (OOM) killer will terminate the server process.

Furthermore, the shared session table is governed by a read-write lock (RwLock). Each insertion of a leaked session handle requires a write lock on the table, which blocks read operations. The continuous insertion of orphaned sessions creates severe lock contention, resulting in high latency or execution timeouts for legitimate active client connections long before the process memory is fully exhausted.

The CVSS v3.1 score is calculated as 7.5, reflecting network-based, low-complexity attack paths requiring no active authentication or user interaction. There is no impact on confidentiality or integrity, as the vulnerability does not permit unauthorized data access or arbitrary code execution.

Remediation

Remediation of CVE-2026-63128 requires upgrading the rmcp crate to version 2.0.0 or higher. This release integrates the validation-first logic that prevents allocating memory for malformed or mismatched handshake requests.

For systems where immediate upgrades are not feasible, network-level mitigations can reduce the risk of exploitation. Administrators can deploy reverse proxies or Web Application Firewalls (WAF) to drop POST requests targeting the /mcp endpoints that lack the correct initialization structures or matching headers. This ensures that only pre-validated requests reach the stateful HTTP server.

Rate-limiting should also be enforced on HTTP endpoints. Restricting the frequency of POST requests per source IP address mitigates high-volume attacks that attempt to rapidly expand the memory footprint or cause lock contention on the session manager's shared structures.

Official Patches

modelcontextprotocolPull Request #934: Refactor session initialization validation
modelcontextprotocolRemediation Commit

Fix Analysis (1)

Technical Appendix

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

Affected Systems

Model Context Protocol Rust SDK (rmcp crate) prior to version 2.0.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
rmcp
modelcontextprotocol
< 2.0.02.0.0
AttributeDetail
CWE IDCWE-400 / CWE-401 / CWE-772
Attack VectorNetwork
CVSS v3.1 Score7.5 (High)
Exploit StatusNone
CISA KEV ListedNo
Mitigated Version2.0.0

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-400
Uncontrolled Resource Consumption

The software does not control the allocation and maintenance of a limited resource, enabling an actor to trigger a denial of service.

Vulnerability Timeline

Fix Pull Request #934 submitted by DaleSeo
2026-06-27
Vulnerability patched in commit dfa7fd6f9309deab60bea230b041be9a3fcda846
2026-06-27
Official release of rmcp crate version 2.0.0
2026-06-29
CVE-2026-63128 published to the National Vulnerability Database
2026-09-16

References & Sources

  • [1]Official GitHub Advisory
  • [2]Fix PR #934
  • [3]Fix Commit dfa7fd6f9309deab60bea230b041be9a3fcda846
  • [4]SDK Release v2.0.0

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-63127
8.2

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

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.

Alon Barad
Alon Barad
1 views•7 min read
•about 2 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
3 views•6 min read
•about 3 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
2 views•4 min read
•about 4 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 5 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
•about 6 hours ago•CVE-2026-61560
9.8

CVE-2026-61560: Unauthenticated Remote Path Traversal and Access Token Exfiltration in @zereight/mcp-gitlab

CVE-2026-61560 is a critical security vulnerability in the @zereight/mcp-gitlab Server-Sent Events (SSE) server. By utilizing default, unauthenticated route setups and exposing vulnerable administrative tools, remote attackers can execute path traversal attacks to read internal process variables and hijack GitLab operations.

Amit Schendel
Amit Schendel
4 views•8 min read