MCP Ruby SDK: Unbounded line buffer in stdio transports leads to memory exhaustion (DoS)
CVE-2026-63119 · GHSA-7683-3w9x-ch42 · published 2026-07-30
- Severity
- Medium
- CVSS score
- 6.2
- Chance of exploitation (EPSS)
- 0.19%
- Fixed in
- 0.23.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
Denial of service via memory exhaustion. A peer that controls the byte stream delivered to the stdio transport can grow a single Ruby String until the process exhausts available memory. Threat-model caveat (important): In the default stdio deployment, the peer process already holds local execution privileges equal to or greater than the victim: On the server side (StdioTransport#open), the writer to $stdin is the parent process that spawned the server, which already holds Process.kill, environment control, and filesystem access over the child. This direction is a robustness defect rather than a security boundary in typical deployments.
Upgrade mcp to 0.23.0 or later.
IO#gets accepts a second limit argument. Apply a configurable maximum line length (default suggested: 4 MiB — large enough for any realistic JSON-RPC frame including base64-embedded images) at all three call sites, and treat an over-limit line as a transport error that closes the connection: Apply the same pattern at stdiotransport.rb:76 and client/stdio.rb:228. Expose MAXLINE_BYTES as a constructor option on both transports for callers with legitimate large-frame needs.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp | RubyGems | <= 0.22.0 | 0.23.0 |
- HightsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS@tsparticles/mcp-server
- HighMissing request-wide media budget allows single-request frontend resource exhaustionvllm
- HighMCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length@modelcontextprotocol/hono, @modelcontextprotocol/node, @modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighvLLM : DoS via unvalidated mm_processor_kwargs in multimodal image processors (Isaac, InternVL, H2OVL, etc.)vllm
- HighMCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation@modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighFrame-count cap bypass in VideoMediaIO.load_base64 for video/jpeg via media_io_kwargs.video.num_framesvllm
- HighMCP Ruby SDK: Ruby SSE Session Poisoningmcp
- HighMCP Ruby SDK: Unbounded JSON-RPC request body causes uncontrolled memory allocation in StreamableHTTPTransportmcp
- HighMCP Ruby SDK: Insufficient Session Binding Allows SSE Stream Hijacking via Session ID Replaymcp
- MediumMCP Ruby SDK: Unbounded session retention in StreamableHTTPTransport allows memory exhaustion via initialize floodmcp
- MediumMCP Ruby SDK: Streamable HTTP transport lacks DNS-rebinding (Host/Origin) protectionmcp
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.