Skip to main content

MCP Ruby SDK CVE-2026-67430

| EUVDEUVD-2026-50498 MEDIUM
Memory Leak (CWE-401)
2026-07-29 GitHub_M GHSA-52jp-gj8w-j6xh
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send repeated HTTP initialize requests
  2. Delivery
    Allocate unbounded ServerSession objects per request
  3. Exploit
    Fill Ruby heap with unreleased session objects
  4. Execution
    Trigger OS out-of-memory condition
  5. Impact
    Process crash denies service to all MCP clients

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Resource cleanup, leak prevention
Exploitation Conditions

The target must be running a version of the mcp Ruby gem prior to 0.23.0 with MCP::Server::Transports::StreamableHTTPTransport in stateful mode (stateless: false, the default). The HTTP initialize endpoint must be network-reachable by the attacker - if the server is behind an authenticating reverse proxy or not exposed externally, unauthenticated exploitation is blocked at the network layer. No user interaction, special protocol knowledge, or prior session state is required. Stateless mode (stateless: true) is explicitly immune regardless of version. The limiting factor for impact is available process memory and host OOM behavior: on systems with large memory allocations or OOM score adjustments, memory exhaustion may be slow or incomplete before the process is killed.

Impact

The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) accurately reflects the network-accessible, zero-authentication, low-complexity attack surface, but the official A:L rating may understate impact: sustained initialize flooding can fully exhaust process memory and crash the Ruby process, which is closer to A:H behavior. No EPSS data was provided. The vulnerability is not in CISA KEV and no public exploit code has been identified, suggesting no current widespread exploitation. Despite the unauthenticated network vector, real-world risk is moderated by deployment context: MCP SDK servers are predominantly internal AI agent infrastructure or developer tooling, rarely exposed directly to the internet without a reverse proxy or auth layer. The attack is fully automatable (no special tooling required), which raises urgency for any internet-facing deployment. Patch availability as of v0.23.0 eliminates the risk with no required configuration change, as secure defaults are now applied automatically.

Exploit ScenarioDerived

An attacker sends a continuous stream of HTTP initialize requests to the StreamableHTTPTransport endpoint without ever issuing DELETE requests. Each request allocates a new ServerSession object retained indefinitely in the session hash. Over time, the Ruby process's heap grows until the OS OOM-kills the process, denying service to legitimate MCP clients. No authentication, special tooling, or prior knowledge of the target is required - a simple loop with curl or a script suffices.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 29, 2026

Unbounded session growth in MCP Ruby SDK's StreamableHTTPTransport allows unauthenticated remote attackers to exhaust server process memory by repeatedly sending initialize requests. Affected versions prior to 0.23.0 defaulted to no session expiry and no concurrent session cap, meaning each initialize request created a persistent ServerSession object that was never reclaimed without an explicit client DELETE. No public exploit has been identified at time of analysis, and exploitation is not confirmed by CISA KEV, but the attack is trivially automatable given the network-accessible, unauthenticated HTTP endpoint.

RemediationAI

Upgrade the mcp gem to version 0.23.0 or later; the fix is published at https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.23.0. Version 0.23.0 applies secure defaults automatically (30-minute idle timeout, 10,000 session cap) without requiring any configuration changes. As an interim workaround on earlier versions, explicitly pass session_idle_timeout: 1800 and enforce a session cap at the application or reverse-proxy layer (e.g., rate-limit POST /initialize requests per source IP in nginx or a WAF) to prevent unbounded session growth. Placing the MCP server behind an authenticated reverse proxy eliminates the unauthenticated attack surface entirely. Note that opting out of expiry with session_idle_timeout: nil or max_sessions: nil on internet-facing deployments is explicitly discouraged by the SDK maintainers as of v0.23.0.

Affected VersionsENISA

ruby-sdk < 0.23.0

Affected Packages

rubygems mcp fix: 0.23.0
euvd ruby_sdk fix: 0.23.0

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 Model Context Protocol (MCP) Ruby SDK (CPE: cpe:2.3:a:modelcontextprotocol:ruby-sdk) implements a StreamableHTTPTransport that maintains stateful server sessions keyed by session ID in an in-process hash map. Each initialize HTTP request allocates a ServerSession object that is stored indefinitely until the client sends an explicit DELETE. CWE-401 (Missing Release of Memory After Effective Lifetime) applies: the SDK lacked both an idle timeout and a maximum concurrent session count, so the session store grew without bound. The fix in v0.23.0 introduces DEFAULT_SESSION_IDLE_TIMEOUT of 1800 seconds (30 minutes), DEFAULT_MAX_SESSIONS of 10,000, a background reaper thread that collects expired sessions approximately once per minute, and a 503 rejection path when the cap is hit after reclaiming already-expired slots. Stateless mode (stateless: true) is unaffected as it retains no session state.

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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 7.5 HIGH

Unauthenticated network access with no complexity; memory exhaustion can crash the process entirely, warranting A:H over official A:L.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Jul 29, 2026 - 20:02 EUVD

DescriptionCVE.org

MCP Ruby SDK is the official Ruby SDK for Model Context Protocol servers and clients. Prior to 0.23.0, MCP::Server::Transports::StreamableHTTPTransport in the mcp gem does not expire sessions by default, so repeated initialize requests retain unbounded ServerSession objects and can exhaust process memory. This issue is fixed in version 0.23.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
niche Ruby SDK for emerging AI agent protocol
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy