Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker controls stdio peer process
-
DeliverySend newline-free byte stream to MCP stdin
-
ExploitIO#gets accumulates unbounded String in Ruby heap
-
ExecutionHost process memory exhausted
-
PersistMCP process OOM-killed
-
ImpactMCP service unavailable
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to control or compromise a process that holds an open write end of the stdio pipe connected to the vulnerable Ruby MCP server or client - this is inherently local inter-process access, not a network-reachable condition by default. The flaw is present in the default configuration of all pre-0.23.0 releases; no non-default setting is required to be vulnerable, as the byte limit was simply absent before v0.23.0. Exploitation is limited to availability impact (OOM kill of the MCP process); no confidentiality or integrity impact has been identified. Deployments that front-end a local MCP stdio process with a network-accessible broker that forwards untrusted client data into that stdio channel expand the effective attack surface, but such a configuration is not default. Limiting factors: the attacker must be co-located on the same host or have pipe-level access; pure network-only attackers cannot reach the stdio transport without an additional path through a proxy or broker. |
| Impact | The CVSS 6.2 score with vector AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H accurately characterizes this as a local denial-of-service with no confidentiality or integrity impact. The local attack vector reflects the stdio transport model, where the peer is a co-located process; however, in MCP architectures where a broker or proxy forwards untrusted network data into a local stdio transport, the practical barrier drops considerably. Attack complexity is genuinely low once stdio access is achieved - no exploit sophistication is required, only the ability to write bytes without a newline. No EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be quantified. No KEV listing and no public POC exist, so real-world exploitation is unconfirmed. Net risk is moderate for deployments that expose MCP servers to untrusted or semi-trusted peers; deployments where all stdio peers are fully controlled reduce residual risk substantially. |
| Exploit ScenarioDerived | A malicious or compromised MCP peer process writes a continuous stream of arbitrary bytes to the stdin of a Ruby MCP server running an unpatched mcp gem, deliberately omitting any newline character. Ruby's IO#gets accumulates this input into a single ever-growing String, eventually exhausting the host's available memory and triggering an OOM kill that terminates the MCP service entirely. No public POC has been identified, but the attack requires only write access to the target process's stdin pipe. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 29, 2026
Uncontrolled memory growth in the MCP Ruby SDK (mcp gem) prior to 0.23.0 allows any peer process communicating via stdio to OOM-kill the host Ruby process by sending a continuous byte stream without a newline, exhausting available system memory. Both the server-side MCP::Server::Transports::StdioTransport and client-side MCP::Client::Stdio components are affected, meaning Ruby applications acting as either MCP servers or MCP clients are vulnerable. No public exploit has been identified at time of analysis, and no CISA KEV listing exists, but the attack is mechanically trivial for any process with stdio access to the target.
RemediationAI
Upgrade the mcp Ruby gem to version 0.23.0 or later (https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.23.0), which introduces an optional max_line_bytes: keyword on both StdioTransport.new and MCP::Client::Stdio.new, defaulting to 4 MiB. The underlying fix is in commit 267b8fa6. If an immediate upgrade is not feasible, restrict stdio access to the MCP process so that only fully trusted, internally controlled processes can act as peers - for example, by running the process inside a tightly scoped container or sandbox that prohibits external process injection. This compensating control does not fix the code-level vulnerability but eliminates the threat actor's channel to exploit it; the trade-off is added operational overhead and no protection if any trusted peer is itself compromised.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in rubygems, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-400 (Uncontrolled Resource Consumption) arising from Ruby's IO#gets method, which - when called without a byte-length argument - accumulates bytes into a single String object until a newline character arrives. Both MCP::Server::Transports::StdioTransport (reading from $stdin) and MCP::Client::Stdio (reading from a spawned server's stdout) used bare IO#gets prior to v0.23.0, delegating unbounded memory growth control entirely to the peer. The affected CPE is cpe:2.3:a:modelcontextprotocol:ruby-sdk:*:*:*:*:*:*:*:*. The fix in commit 267b8fa6 replaces bare IO#gets with IO#gets('\n', max_line_bytes), defaulting to 4 MiB - sized to accommodate realistic JSON-RPC frames including base64-embedded images - and closes the connection immediately when the limit is reached without a newline.
Know when Ruby Sdk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Stdio transport is local IPC; peer write access requires no special privileges; only availability is impacted via unbounded memory growth.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
MCP Ruby SDK is the official Ruby SDK for Model Context Protocol servers and clients. Prior to 0.23.0, MCP::Server::Transports::StdioTransport and MCP::Client::Stdio in the mcp gem use IO#gets without a byte limit, allowing a peer that sends data without a newline to exhaust process memory. This issue is fixed in version 0.23.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Session hijacking in the MCP Ruby SDK (mcp gem) before 0.23.0 lets an attacker who obtains a valid session ID issue tool
Uncontrolled memory allocation in the official Model Context Protocol Ruby SDK (mcp gem) before 0.23.0 lets an unauthent
DNS rebinding in MCP Ruby SDK's StreamableHTTPTransport (mcp gem, all versions prior to 0.23.0) exposes locally running
Unbounded session growth in MCP Ruby SDK's StreamableHTTPTransport allows unauthenticated remote attackers to exhaust se
EUVD-2026-50500
GHSA-7683-3w9x-ch42
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB