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

CVE-2026-63118: DNS-Rebinding and Cross-Origin Request Execution in Model Context Protocol (MCP) Ruby SDK

Alon Barad
Alon Barad
Software Engineer

Jul 31, 2026·6 min read·68 visits

Executive Summary (TL;DR)

A DNS-rebinding flaw in the MCP Ruby SDK (< 0.23.0) allows malicious sites to bypass the browser Same-Origin Policy and run arbitrary local tools.

A critical vulnerability (CVE-2026-63118) in the Model Context Protocol (MCP) Ruby SDK allows attackers to execute arbitrary JSON-RPC commands and exfiltrate sensitive local data from an MCP server bound to the local loopback interface. This is achieved through DNS-rebinding and cross-origin request execution due to missing validation of the HTTP Host and Origin headers in the StreamableHTTPTransport component.

Vulnerability Overview

The Model Context Protocol (MCP) Ruby SDK provides infrastructure for building local and remote AI assistant tools. A core component of this library is the StreamableHTTPTransport class, which implements a Rack-compatible HTTP server designed to handle incoming JSON-RPC requests. This transport layer allows client applications to communicate with local MCP servers, initiating sessions and invoking functional components.

Prior to version 0.23.0, the StreamableHTTPTransport component lacked host and origin verification routines on incoming HTTP requests. Because developers typically deploy MCP servers locally on loopback interfaces, the lack of host and origin restrictions exposed the server to severe security risks. Specifically, malicious web applications running in a user's browser could interact directly with the locally bound server.

This structural flaw is classified under CWE-346 (Origin Validation Error) and CWE-350 (Reliance on Reverse DNS Resolution for a Security-Critical Action). It allows attackers to orchestrate DNS-rebinding attacks or direct cross-origin request execution. The vulnerability is tracked as CVE-2026-63118 and carries a CVSS v4 base score of 6.9, reflecting high subsequent confidentiality impact on the host system.

Root Cause Analysis

The root cause of CVE-2026-63118 lies in the unconditional acceptance of HTTP traffic by the StreamableHTTPTransport server. When a web server processes requests, it typically relies on the web browser's Same-Origin Policy (SOP) to isolate cross-origin domains. However, SOP relies on the assumption that a domain name resolves consistently to a single IP address during a session. This assumption is invalidated by DNS rebinding.

In a DNS-rebinding scenario, an attacker configures a custom nameserver for a domain they control. When the victim accesses this domain, the nameserver responds with the attacker's actual server IP but sets a very short Time-To-Live (TTL). Once the browser caches or expires the DNS record, the attacker's nameserver points subsequent resolutions of the exact same domain to the loopback address 127.0.0.1.

Because the browser associates the domain with the previous origin, it allows scripts to issue requests to the rebound address, thinking it is still contacting the attacker's server. Because the vulnerable SDK did not inspect the incoming Host header (which still contained the attacker's domain) or the Origin header, the local MCP server executed the incoming JSON-RPC commands and returned the results to the browser, bypassing SOP.

Code Analysis

The vulnerability was addressed in commit ba543083a7594e7892b29464b89091816446ff7a by implementing a validation routine on every request handled by StreamableHTTPTransport. This validation is integrated directly into the handle_request method, intercepting execution before any HTTP methods are parsed.

Below is the comparison of the request handling logic before and after the patch:

# Vulnerable implementation (prior to v0.23.0)
def handle_request(request)
  case request.env["REQUEST_METHOD"]
  when "POST"
    handle_post(request)
  # ... processed unconditionally
  end
end
# Patched implementation (v0.23.0)
def handle_request(request)
  rebinding_error = validate_dns_rebinding(request)
  return rebinding_error if rebinding_error
 
  case request.env["REQUEST_METHOD"]
  # ... normal execution after validation passes
  end
end

The validate_dns_rebinding method relies on two subsidiary checks: validate_host and validate_origin. If @dns_rebinding_protection is enabled, the server validates that the HTTP_HOST matches an allowed host (by default, 127.0.0.1, ::1, or localhost) and that the HTTP_ORIGIN matches the current host or an allowed origin list. If either check fails, the server responds with a 403 Forbidden status and an INVALID_REQUEST JSON-RPC error. This patch is highly complete because it applies strict secure-by-default behavior while preserving compatibility for complex reverse proxy setups.

Exploitation

Exploitation of CVE-2026-63118 relies on user interaction and a targeted DNS infrastructure. The attacker must first lure a victim who is currently running a local MCP server to visit a malicious website under the attacker's control. The interaction flows according to the following communication sequence:

Once the browser is directed to 127.0.0.1, the malicious JavaScript payload issues a POST request to initialize an MCP session. The request does not trigger CORS warnings because the browser believes it is communicating with the original evil.attacker.com origin:

POST / HTTP/1.1
Host: evil.attacker.com:9292
Content-Type: application/json
 
{"jsonrpc": "2.0", "method": "initialize", "id": "init_id", "params": {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "evil-client", "version": "1.0"}}}

After retrieving the session identifier, the script invokes sensitive tools registered on the local server, such as system command runners or filesystem tools. The response containing secret tokens or system command outputs is then returned to the JavaScript execution context and transmitted back to the attacker.

Impact Assessment

The impact of successful exploitation is severe and depends largely on the level of system access granted to the local MCP server. Since MCP is designed to allow local AI clients to run local operations, these servers are frequently configured with highly privileged tools. Common capabilities include direct terminal command execution, filesystem write capabilities, and localized database access.

An attacker who successfully exploits CVE-2026-63118 gains full access to these local APIs. They can execute system utilities, read sensitive SSH keys, access active cloud provider credentials, or install persistent backdoors on the host machine. Because the attacker operates from within the victim's browser session, the local firewall and network perimeter controls are completely bypassed.

According to the CVSS v4 vector, the vulnerability is rated as 6.9 (Medium). Although the vulnerability itself does not guarantee immediate system compromise, the subsequent system confidentiality impact is high (SC:H). The attack requirements are present (AT:P) because the attacker must host a functional DNS-rebinding infrastructure, but the user interaction is minimal (UI:A), requiring only a single website visit.

Remediation

To resolve CVE-2026-63118, developers must upgrade the mcp gem to version 0.23.0 or higher. This release integrates host and origin checking by default, preventing unauthenticated clients from invoking API functions. The gem can be updated by declaring gem 'mcp', '>= 0.23.0' in the Gemfile and running bundle update mcp.

If the server is deployed behind an upstream reverse proxy that already filters the Host and Origin headers, protection can be configured as follows:

transport = MCP::Server::Transports::StreamableHTTPTransport.new(
  server,
  allowed_hosts: ["mcp.example.com"],
  allowed_origins: ["https://app.example.com"]
)

If upgrading is not immediately possible, teams must implement alternative mitigation patterns. A manual Rack middleware can be written to drop requests containing unfamiliar Host headers. Additionally, developers must ensure that the local server is bound strictly to 127.0.0.1 or ::1 rather than the wild wildcard 0.0.0.0, reducing exposure from nearby hosts on local area networks.

Official Patches

modelcontextprotocolPrimary fix commit introducing Host and Origin validation
modelcontextprotocolv0.23.0 official release tag with secure-by-default mitigations

Fix Analysis (1)

Technical Appendix

CVSS Score
6.9/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
EPSS Probability
0.20%
Top 90% most exploited

Affected Systems

Model Context Protocol (MCP) Ruby SDK (mcp gem)

Affected Versions Detail

Product
Affected Versions
Fixed Version
mcp
modelcontextprotocol
< 0.23.0v0.23.0
AttributeDetail
CWE IDCWE-346, CWE-350
Attack VectorNetwork (AV:N)
CVSS Score6.9 (Medium)
Exploit StatusPoC Available
Affected ComponentStreamableHTTPTransport
Fixed Versionv0.23.0
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1557Adversary-in-the-Middle
Credential Access
T1190Exploit Public-Facing Application
Initial Access
CWE-346
Origin Validation Error

The software does not properly validate the origin of a request, letting unauthorized domains make state-modifying or sensitive requests.

References & Sources

  • [1]GHSA-rjr6-rcgv-9m7m: DNS-rebinding and cross-origin request execution in MCP Ruby SDK
  • [2]CVE-2026-63118 Record
  • [3]NVD - CVE-2026-63118 Detail

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

•11 minutes ago•CVE-2026-114155
7.5

CVE-2026-114155: Local Elevation of Privilege via TOCTOU Race Condition in Microsoft .NET dotnet-watch

CVE-2026-114155 is a local elevation of privilege vulnerability affecting Microsoft .NET on Linux and macOS platforms. The vulnerability exists within the dotnet-watch (Hot Reload) component and is caused by a Time-of-Check Time-of-Use (TOCTOU) race condition (CWE-367) during the generation and execution of temporary XML solution files (.slnx) in shared system temporary directories. A local attacker with low privileges can intercept and modify the temporary solution file before MSBuild evaluates it, achieving arbitrary code execution in the security context of the user running dotnet-watch.

Alon Barad
Alon Barad
1 views•9 min read
•about 1 hour ago•CVE-2026-118748
7.5

CVE-2026-118748: Unbounded Memory Allocation Denial of Service in ASP.NET Core Blazor Static-SSR

CVE-2026-118748 is a remote Denial of Service (DoS) vulnerability in Microsoft ASP.NET Core (.NET 11.0 preview releases prior to 11.0.0) and Microsoft Visual Studio 2026 (prior to 18.12.0). The flaw originates from unbounded resource allocation (CWE-770) within the Blazor static server-side rendering (static-SSR) validation pipeline, where dynamic or attacker-supplied form field identifiers are cached in a singleton-scoped memory structure without size limits or eviction policies. Unauthenticated remote attackers can exploit this condition over the network by sending repeated HTTP requests with unique field names, exhausting heap memory and terminating the host process via an unhandled OutOfMemoryException.

Alon Barad
Alon Barad
3 views•9 min read
•about 2 hours ago•CVE-2026-114150
5.9

CVE-2026-114150: Remote Information Disclosure via Uninitialized Pooled Memory in ASP.NET Core Response Buffering

CVE-2026-114150 is a network-accessible information disclosure vulnerability affecting Microsoft ASP.NET Core in .NET 11.0 preview releases and Microsoft Visual Studio 2026 prior to version 18.12.0. The flaw stems from the use of uninitialized resources (CWE-908) within response buffering components, specifically ResponseBufferingStream used by middleware such as HTTP Logging and Output Caching. Because rented memory segments from ArrayPool<byte> or MemoryPool<byte> are not cleared upon return or strictly bounded to the exact written byte count during subsequent reads, residual response payloads from earlier HTTP requests remain in the buffer tail. Downstream consumers or log sinks reading these buffers expose confidential cross-session data, including authentication tokens and personally identifiable information.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 3 hours ago•CVE-2026-114146
9.0

CVE-2026-114146: Elevation of Privilege in ASP.NET Core SignalR Connection Dispatcher

An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.

Alon Barad
Alon Barad
5 views•11 min read
•about 4 hours ago•CVE-2026-109478
7.5

CVE-2026-109478: Algorithmic Complexity Denial of Service in ASP.NET Core Header Parsing

CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.

Alon Barad
Alon Barad
6 views•11 min read
•about 5 hours ago•CVE-2026-114147
7.5

CVE-2026-114147: Denial of Service via Memory Leak in ASP.NET Core SignalR Redis Backplane

CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.

Amit Schendel
Amit Schendel
3 views•10 min read