mediumCVSS 5.3Vulnerability

CVE-2026-67430

## Summary In its default configuration, `MCP::Server::Transports::StreamableHTTPTransport` never expires sessions. Every successful `initialize` request stores a new `ServerSession` and a session record under a fresh UUID, and the only path that removes them is an explicit client-issued HTTP `DELETE`. An unauthenticated attacker can repeatedly initialize new sessions and immediately disconnect, forcing the server to retain an unbounded number of `ServerSession` objects until memory is exhausted. ## Affected component `lib/mcp/server/transports/streamable_http_transport.rb`: - Line 27, constructor: `def initialize(server, stateless: false, enable_json_response: false, session_idle_timeout: nil)` — the default for `session_idle_timeout` is `nil`. - Line 46: `start_reaper_thread if @session_idle_timeout` — when the timeout is `nil`, the reaper that prunes idle sessions is never started. - Lines 604–643 (`handle_initialization`): every successful `initialize` inserts a new session record; the only removal sites are `handle_delete` (client-controlled) and stream-error paths. The project README acknowledges the insecure default (line 1605): > By default, sessions do not expire. To mitigate session hijacking risks, you can set a `session_idle_timeout` (in seconds). Per-session memory cost is non-trivial: each entry contains a `ServerSession` instance (with its own `Mutex`, `@in_flight` hash, capabilities hash, and server reference), a top-level hash entry under the session UUID, and per-pending-request `Queue` allocations. ## Proof of concept ### Server (`session_poc_server.rb`) Starts the transport in its default configuration (no `session_idle_timeout`) and reports the in-memory session count plus process RSS every two seconds. ```ruby require "bundler/setup" require "mcp" require "mcp/server/transports/streamable_http_transport" require "rackup" require "webrick" require "rackup/handler/webrick" server = MCP::Server.new(name: "session-poc-target", tools: []

Properties

severity
medium
summary
MCP Ruby SDK: Unbounded session retention in StreamableHTTPTransport allows memory exhaustion via initialize flood
epss_score
0.00308
cvss_score
5.3
ghsa_published
2026-07-30T14:43:29Z
source_url
https://github.com/advisories/GHSA-52jp-gj8w-j6xh
ghsa_updated
2026-07-30T14:43:29Z
ghsa_id
GHSA-52jp-gj8w-j6xh
cve_id
CVE-2026-67430
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
signal_observed_at
2026-09-11T17:55:57+00:00
is_ghsa_only
false
epss_percentile
0.23464

Related Entities (6)

ENRICHED_BY (1)

[Source]FIRST EPSS

VULNERABLE_TO (1)

[Software]rubygems/mcp

AFFECTS (1)

[Software]rubygems/mcp

HAS_WEAKNESS (2)

[Weakness]Missing Release of Memory after Effective Lifetime
[Weakness]Allocation of Resources Without Limits or Throttling

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-67430 (CVSS 5.3) — Ninja Signal Threat Intelligence | Ninja Signal