Skip to main content

rmcp CVE-2026-42559

| EUVDEUVD-2026-30292 HIGH
Origin Validation Error (CWE-346)
2026-05-06 https://github.com/modelcontextprotocol/rust-sdk GHSA-89vp-x53w-74fx
8.8
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Source Code Evidence Fetched
May 06, 2026 - 22:39 vuln.today
Analysis Generated
May 06, 2026 - 22:39 vuln.today
CVE Published
May 06, 2026 - 21:55 nvd
HIGH 8.8

DescriptionGitHub Advisory

Summary

Prior to version 1.4.0, the rmcp crate's Streamable HTTP server transport (crates/rmcp/src/transport/streamable_http_server/) did not validate the incoming Host header. This allowed a malicious public website, via a DNS rebinding attack, to send authenticated requests to an MCP server running on the victim's loopback or private-network interface - violating the MCP specification's transport security guidance.

Impact

An attacker who convinces a victim to visit a malicious page can:

  • Enumerate and invoke any tool exposed by a locally-running rmcp-based MCP server.
  • Read resources, prompts, and any state accessible via the MCP session.
  • Trigger side effects (file writes, shell execution, API calls, etc.) limited only by what tools the victim's server exposes.

Because MCP servers frequently run with the user's privileges and expose developer tooling (filesystems, shells, browser control, language servers, etc.), the practical impact can extend to arbitrary code execution on the victim's machine.

Affected Versions

rmcp < 1.4.0 - all prior releases of the Streamable HTTP server transport. Non-HTTP transports (stdio, child-process) are not affected.

Patched Versions

rmcp >= 1.4.0 (current: 1.5.1).

Patch

Fixed in PR #764 (commit 8e22aa2), released as v1.4.0 on 2026-04-09:

  • StreamableHttpServerConfig::allowed_hosts now defaults to a loopback-only allowlist: ["localhost", "127.0.0.1", "::1"].
  • All incoming HTTP requests pass through validate_dns_rebinding_headers(), which parses the Host header and returns HTTP 403 if the host is not on the allowlist.
  • Public deployments can configure an explicit allowlist via StreamableHttpService::with_allowed_hosts(...), or opt out (not recommended without an upstream reverse proxy that validates Host) via disable_allowed_hosts().

This fix validates the Host header only. Origin header validation is tracked as a defense-in-depth follow-up in #822 and is not required to block the DNS rebinding attack described here - the browser cannot forge the Host header sent to the rebound server.

Workarounds for Unpatched Users

  • Upgrade to rmcp >= 1.4.0.
  • If upgrade is not possible, place the MCP server behind a reverse proxy (e.g. nginx, Caddy) configured to reject requests whose Host header is not one of your expected hostnames.
  • Do not bind the MCP server to 0.0.0.0 without such a proxy.

Resources

  • PR: https://github.com/modelcontextprotocol/rust-sdk/pull/764
  • Issue: https://github.com/modelcontextprotocol/rust-sdk/issues/815
  • Follow-up (Origin validation): https://github.com/modelcontextprotocol/rust-sdk/issues/822
  • MCP transport security guidance: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#security-warning

Related advisories (same class of vulnerability)

  • TypeScript SDK: GHSA-w48q-cv73-mx4w
  • Python SDK: GHSA-9h52-p55h-vw2f
  • Go SDK: GHSA-xw59-hvm2-8pj6
  • Java SDK: GHSA-8jxr-pr72-r468

AnalysisAI

DNS rebinding in rmcp Rust crate allows malicious websites to control local MCP servers and achieve arbitrary code execution through exposed developer tools. Fixed in version 1.4.0 via Host header validation with loopback-only default allowlist. The vulnerability affects Streamable HTTP server transport only (stdio and child-process transports unaffected). Vendor-released patch available (PR #764, commit 8e22aa2). Similar vulnerabilities patched across TypeScript, Python, Go, and Java MCP SDKs indicate coordinated disclosure. CVSS 8.8 (network vector, low complexity, requires user interaction) reflects browser-mediated attack requiring victim to visit attacker site.

Technical ContextAI

The Model Context Protocol (MCP) provides structured communication between AI applications and external tools. The rmcp crate implements MCP in Rust, exposing a Streamable HTTP server transport for remote clients. Prior to 1.4.0, the HTTP server (crates/rmcp/src/transport/streamable_http_server/) accepted requests without validating the HTTP Host header against an allowlist. This violates the fundamental defense against DNS rebinding attacks, where an attacker-controlled domain initially resolves to a public IP, then rebinds to 127.0.0.1 or a private IP. The browser's same-origin policy allows the attacker's JavaScript to send authenticated requests to the rebound local endpoint. CWE-346 (Origin Validation Error) captures this class of flaw. The fix introduces validate_dns_rebinding_headers() which parses the Host header using http::uri::Authority, normalizes hostnames (case-insensitive, IPv6 bracket stripping), and rejects requests with HTTP 403 if the host is not on StreamableHttpServerConfig::allowed_hosts. The default allowlist restricts to loopback addresses (["localhost", "127.0.0.1", "::1"]), blocking cross-origin browser attacks while permitting local tool access. Public deployments must explicitly configure allowed_hosts via with_allowed_hosts() or deploy behind a reverse proxy that validates Host headers. The patch diff shows integration into the tower service layer, rejecting requests before they reach MCP handlers. Origin header validation (#822) is tracked separately as defense-in-depth but not required since browsers cannot forge Host headers during DNS rebinding.

RemediationAI

Upgrade rmcp to version 1.4.0 or later (current version 1.5.1) per vendor advisory at https://github.com/modelcontextprotocol/rust-sdk/security/advisories/GHSA-89vp-x53w-74fx. The fix was released on 2026-04-09 via PR #764 (https://github.com/modelcontextprotocol/rust-sdk/pull/764, commit 8e22aa2). Version 1.4.0 introduces StreamableHttpServerConfig::allowed_hosts defaulting to loopback-only (["localhost", "127.0.0.1", "::1"]) and rejects requests with non-allowlisted Host headers via HTTP 403. If immediate upgrade is not possible, deploy the MCP server behind a reverse proxy (nginx, Caddy, Apache) configured to reject requests whose Host header does not match expected hostnames-this delegates validation to the proxy layer but requires additional infrastructure and careful configuration to avoid bypass via proxy misconfiguration. Do not bind the MCP server to 0.0.0.0 or public interfaces without such a proxy, as this exposes the service to direct network attacks beyond DNS rebinding. Public deployments upgrading to 1.4.0+ must explicitly configure allowed_hosts via StreamableHttpService::with_allowed_hosts(["example.com", "api.example.com:8080"]) to match their production hostnames; the loopback-only default will block legitimate public traffic. Opting out via disable_allowed_hosts() is strongly discouraged unless an upstream proxy validates Host headers, as this re-introduces the vulnerability. Note that Origin header validation (issue #822) is tracked as future defense-in-depth but not required to block DNS rebinding.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Share

CVE-2026-42559 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy