UTC
Medium

MCP Ruby SDK: Streamable HTTP transport lacks DNS-rebinding (Host/Origin) protection

CVE-2026-63118 · GHSA-rjr6-rcgv-9m7m · published 2026-07-30

Severity
Medium
CVSS score
6.9
Chance of exploitation (EPSS)
0.24%
Fixed in
0.23.0
  • Exploitation Public proof of concept
  • Automatable No
  • Technical impact Partial
  • CISA SSVC
What it is

An attacker who can get a victim to open a web page can reach any MCP server the victim runs locally over the Streamable HTTP transport (e.g. a developer-tools or filesystem MCP server on localhost). Because the transport issues a session and dispatches tools/list / tools/call from a foreign Host/Origin with no rejection, the attacker can drive arbitrary server-exposed tools and read their results, exfiltrating local data (files, secrets, command output) to the attacker's origin. The blast radius is whatever the locally-running MCP server exposes.

What to do

Upgrade mcp to 0.23.0 or later.

Add an opt-in but secure-by-default Host/Origin allowlist to StreamableHTTPTransport, mirroring the DNS-rebinding protection that the TypeScript, Python, Go, Rust, C#, and Java MCP SDKs already ship: Accept allowedhosts: and allowedorigins: keyword arguments in initialize. In handlerequest (before any dispatch), read request.env["HTTPHOST"] and request.env["HTTPORIGIN"]. If an allowlist is configured and the value is not on it, return 403 Forbidden. Default to allowing only loopback hosts (127.0.0.1, [::1], localhost) and an empty/absent Origin, so a stock local deployment is protected against rebinding out of the box while same-process and same-host clients keep working.

Affected
PackageRegistryAffectedFixed in
mcpRubyGems<= 0.22.00.23.0

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].