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