|
| 1 | +--- |
| 2 | +layout: advisory |
| 3 | +title: 'CVE-2026-63118 (mcp): Streamable HTTP transport lacks DNS-rebinding (Host/Origin) |
| 4 | + protection' |
| 5 | +comments: false |
| 6 | +categories: |
| 7 | +- mcp |
| 8 | +advisory: |
| 9 | + gem: mcp |
| 10 | + cve: 2026-63118 |
| 11 | + ghsa: rjr6-rcgv-9m7m |
| 12 | + url: https://nvd.nist.gov/vuln/detail/CVE-2026-63118 |
| 13 | + title: Streamable HTTP transport lacks DNS-rebinding (Host/Origin) protection |
| 14 | + date: 2026-07-07 |
| 15 | + description: |- |
| 16 | + ## Summary |
| 17 | +
|
| 18 | + MCP::Server::Transports::StreamableHTTPTransport (the Rack-mountable |
| 19 | + Streamable HTTP transport in the mcp gem) processes every incoming |
| 20 | + JSON-RPC request without ever inspecting the HTTP Host or Origin |
| 21 | + request headers. There is no AllowedHosts/AllowedOrigins allowlist |
| 22 | + and no DNS-rebinding guard anywhere in the transport. A local MCP |
| 23 | + server that binds a loopback or LAN HTTP port is therefore reachable |
| 24 | + by any web origin a victim's browser visits, via a DNS-rebinding |
| 25 | + attack: a malicious page rebinds its own hostname to 127.0.0.1, then |
| 26 | + drives the local MCP server cross-origin to enumerate and invoke |
| 27 | + its tools and exfiltrate their output. This is the standard browser-driven |
| 28 | + local-service attack that the MCP Streamable HTTP guidance exists to prevent. |
| 29 | +
|
| 30 | + ## Impact |
| 31 | +
|
| 32 | + An attacker who can get a victim to open a web page can reach any MCP |
| 33 | + server the victim runs locally over the Streamable HTTP transport |
| 34 | + (e.g. a developer-tools or filesystem MCP server on localhost). |
| 35 | + Because the transport issues a session and dispatches tools/list/ |
| 36 | + tools/call from a foreign Host/Origin with no rejection, the attacker |
| 37 | + can drive arbitrary server-exposed tools and read their results, |
| 38 | + exfiltrating local data (files, secrets, command output) to the |
| 39 | + attacker's origin. |
| 40 | + The blast radius is whatever the locally-running MCP server exposes. |
| 41 | + For MCP servers wired to filesystem, shell, or credential tools, |
| 42 | + this is sensitive-data disclosure and, depending on the tool set, |
| 43 | + local action execution. |
| 44 | +
|
| 45 | + ## Credit |
| 46 | +
|
| 47 | + Reported by tonghuaroot. |
| 48 | + cvss_v4: 6.9 |
| 49 | + patched_versions: |
| 50 | + - ">= 0.23.0" |
| 51 | + related: |
| 52 | + url: |
| 53 | + - https://nvd.nist.gov/vuln/detail/CVE-2026-63118 |
| 54 | + - https://rubygems.org/gems/mcp/versions/0.23.0 |
| 55 | + - https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.23.0 |
| 56 | + - https://github.com/modelcontextprotocol/ruby-sdk/commit/ba543083a7594e7892b29464b89091816446ff7a |
| 57 | + - https://advisories.gitlab.com/gem/mcp/CVE-2026-63118 |
| 58 | + - https://osv.dev/vulnerability/GHSA-rjr6-rcgv-9m7m |
| 59 | + - https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-rjr6-rcgv-9m7m |
| 60 | + - https://github.com/advisories/GHSA-rjr6-rcgv-9m7m |
| 61 | + notes: | |
| 62 | + - date from gem release |
| 63 | + - cvss_v4 from GHSA and nvd.nist.gov URL |
| 64 | + - From GHSA: "Reporter notes: This issue was found by source review of |
| 65 | + the `mcp` gem's Streamable HTTP transport and confirmed end-to-end |
| 66 | + against the released gem `mcp` 0.18.0 as shown above. It is |
| 67 | + reported independently on its own merits." |
| 68 | +--- |
0 commit comments