Loading...
Skip to main content

CVE-2026-42559 — Vulnerability in rmcp — CVE Details

HIGH

rmcp Streamable HTTP server transport has a DNS rebinding vulnerability

Published May 6, 2026Updated September 10, 2026Source: osv

Summary

## 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](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#security-warning). ## 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](https://github.com/modelcontextprotocol/rust-sdk/pull/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](https://github.com/modelcontextprotocol/rust-sdk/issues/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

Advisory Timeline

  • First published May 6, 2026 (159 days ago).
  • Last revised September 10, 2026 — 126 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update rmcp to 1.4.0 or later
cargo update -p rmcp --precise 1.4.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageEcosystemAffectedFixed In
rmcp
crates.io
All versions1.4.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2026-42559?
rmcp Streamable HTTP server transport has a DNS rebinding vulnerability This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-42559?
CVE-2026-42559 affects rmcp. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-42559 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-89vp-x53w-74fx
GHSA-fvh2-gm75-j4j7
RUSTSEC-2026-0140
RUSTSEC-2026-0189

Related CVEs

  • CVE-2026-63127
    HIGH

    RMCP: Missing Resource Field Validation in OAuth Protected Resource Metadata Discovery

  • CVE-2026-93657
    HIGH

    hickory-resolver: Resolver::lookup() and Resolver::lookup_ip() APIs obscure DNSSEC validation failures

  • CVE-2026-18140
    HIGH

    aws-smithy-json: Uncontrolled recursion in the aws-smithy-json unknown-key skip path allows unauthenticated remote denial of service in smithy-rs generated servers

  • CVE-2026-63128
    HIGH

    RMCP: Unauthenticated permanent session-table leak in rmcp Streamable HTTP server transport leads to remote denial-of-service

  • CVE-2026-64684
    MEDIUM

    RMCP: Custom HTTP headers leak to cross-origin redirect targets

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies