CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-7683-3w9x-ch42: MCP Ruby SDK: Unbounded line buffer in stdio transports leads to memory exhaustion (DoS)

mediumCVSS 6.2CVE-2026-63119
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. This is the same vulnerability class tracked in sibling MCP SDKs as GHSA-74gp-qhv5-v493 (Kotlin), GHSA-wqgc-pwpr-pq7r (TypeScript), GHSA-655q-2283-6jgj (Python), and others. It was identified during a cross-SDK audit; ruby-sdk had no prior report. Affected code Verified at main @ cf44475c. Server transport — lib/mcp/server/transports/stdio_transport.rb line 23 while @open && (line = $stdin.gets) # <-- no limit argument response = @session.handle_json(line.strip) ... line 76 while @open && (line = $stdin.gets) # <-- no limit argument begin parsed = JSON.parse(line.strip, symbolize_names: true) $stdin is the raw process global (only set_encoding is applied at line 16); there is no wrapper imposing a length limit. Client transport — lib/mcp/client/stdio.rb line 150 @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(spawn_env, @command, *@args) line 228 line = @stdout.gets # <-- no limit argument raise_connection_error!(method, params) if line.nil? parsed = JSON.parse(line.strip) @stdout is the raw IO returned by Open3.popen3. The @read_timeout guard at line 227 (wait_for_readable!) only gates the IO.select before gets is invoked; once bytes are flowing, gets blocks indefinitely accumulating into one string. Impact 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 deploy

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
medium — CVSS 6.2
Published
2026-07-30
Last updated
2026-07-30
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-7683-3w9x-ch42

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-63119coverage & exploitation statusNVD · CVE.org

Same CVEs, other sources

How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.

More from GitHub Security Advisories