UTC
Medium

MCP Ruby SDK: Unbounded session retention in StreamableHTTPTransport allows memory exhaustion via initialize flood

CVE-2026-67430 · GHSA-52jp-gj8w-j6xh · published 2026-07-30

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

Attacker requirements: unauthenticated TCP reach of the MCP endpoint. No session, no credentials. Effect: memory-exhaustion denial of service. A sustained or distributed attacker can OOM the worker; on services that recycle workers, the attacker simply repeats. On multi-tenant gateways, one tenant can starve all others. Affected deployments: every deployment that does not opt into sessionidletimeout. Because the README presents this as an opt-in mitigation rather than a default, real-world deployments are likely to ship vulnerable.

What to do

Upgrade mcp to 0.23.0 or later.

If you cannot upgrade yet

1. Change the default of sessionidletimeout to a finite value (e.g. 30 minutes) and document the change as a security default. 2. Add a max_sessions: constructor option; reject initialize with HTTP 503 once the cap is reached. 3. Track the time of the initialize POST separately from later request activity, and evict sessions whose GET SSE stream is never attached within N seconds.

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].