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