CVE-2026-42559

CVE-2026-42559 is a high-severity security vulnerability in rmcp (rust), affecting versions < 1.4.0. It is fixed in 1.4.0.

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.

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).

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

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

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.

CVE-2026-42559 has a CVSS score of 8.8 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.4.0); upgrading removes the vulnerable code path.

Affected versions

rmcp (< 1.4.0)

Security releases

rmcp → 1.4.0 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-42559? CVE-2026-42559 is a high-severity security vulnerability in rmcp (rust), affecting versions < 1.4.0. It is fixed in 1.4.0.
  2. How severe is CVE-2026-42559? CVE-2026-42559 has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of rmcp are affected by CVE-2026-42559? rmcp (rust) versions < 1.4.0 is affected.
  4. Is there a fix for CVE-2026-42559? Yes. CVE-2026-42559 is fixed in 1.4.0. Upgrade to this version or later.
  5. Is CVE-2026-42559 exploitable, and should I be worried? Whether CVE-2026-42559 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-42559 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-42559? Upgrade rmcp to 1.4.0 or later.

Other vulnerabilities in rmcp

Stop the waste.
Protect your environment with Kodem.