Allocation of Resources Without Limits or Throttling Affecting mcp package, versions <0.23.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-MCP-18017727
  • published19 Jul 2026
  • disclosed17 Jul 2026
  • creditHE WEI

Introduced: 17 Jul 2026

New CVE NOT AVAILABLE CWE-770  (opens in a new tab)

How to fix?

Upgrade mcp to version 0.23.0 or higher.

Overview

mcp is a The official Ruby SDK for Model Context Protocol servers and clients

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the handle_initialization path of lib/mcp/server/transports/streamable_http_transport.rb, which creates a ServerSession per initialize request and, because session_idle_timeout defaults to nil, never starts the reaper that would expire them. An attacker can exhaust server memory and cause denial of service by repeatedly sending initialize requests and disconnecting, leaving an unbounded number of ServerSession objects retained with no automatic cleanup. Exploitation requires only network TCP reach to the MCP endpoint and applies under the default configuration where session_idle_timeout is unset, so no session reaper runs and the only removal path is an explicit client-issued HTTP DELETE.

Workaround

This vulnerability can be avoided by setting the session_idle_timeout parameter to a finite value when instantiating the transport, which starts the reaper thread that expires idle sessions.

CVSS Base Scores

version 4.0
version 3.1