RubySec

Providing security resources for the Ruby community

CVE-2026-63119 (mcp): Unbounded line buffer in stdio transports leads to memory exhaustion (DoS)

Unbounded line buffer in stdio transports leads to memory exhaustion (DoS)

Published: July 07, 2026

SECURITY IDENTIFIERS

GEM

mcp

SEVERITY

CVSS v3.x: 6.2 (Medium)

PATCHED VERSIONS

>= 0.23.0

DESCRIPTION

Summary

The stdio transports in MCP::Server::Transports::StdioTransport and MCP::Client::Stdio read newline-delimited JSON-RPC frames using IO#gets with no limit argument. CRuby's IO#gets with no limit reads from the current position until the next separator (\n) with no upper bound on the returned string length. A peer that streams bytes without ever emitting a newline causes gets to accumulate the entire stream in a single Ruby String until the process is killed by the operating-system OOM killer.

Credit

Reported by tonghuaroot

Identified during a cross-SDK audit of the stdio unbounded-buffer vulnerability class, prompted by GHSA-74gp-qhv5-v493.

RELATED