Unbounded line buffer in stdio transports leads to memory exhaustion (DoS)
Published: July 07, 2026
SECURITY IDENTIFIERS
- CVE: CVE-2026-63119 (NVD)
- GHSA: GHSA-7683-3w9x-ch42
GEM
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
- https://nvd.nist.gov/vuln/detail/CVE-2026-63119
- https://rubygems.org/gems/mcp/versions/0.23.0
- https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.23.0
- https://docs.ruby-lang.org/en/3.3/IO.html#method-i-gets
- https://github.com/modelcontextprotocol/ruby-sdk/commit/267b8fa6285453525c81ce43db6b7dcd7a8a8c2f
- https://advisories.gitlab.com/gem/mcp/CVE-2026-63119
- https://osv.dev/vulnerability/GHSA-7683-3w9x-ch42
- https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-7683-3w9x-ch42
