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-18017532
  • published19 Jul 2026
  • disclosed17 Jul 2026
  • credittonghuaroot

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 stdio transports lib/mcp/server/transports/stdio_transport.rb and lib/mcp/client/stdio.rb, which call IO#gets ($stdin.gets, @stdout.gets) without a length limit. An attacker who controls the byte stream feeding a stdio transport can exhaust memory and cause denial of service by sending a continuous stream of bytes with no newline, which gets accumulates into a single unbounded string. The attack is local and requires control of the peer on the pipe, either the parent process on the server side or the spawned server binary on the client side, and in typical deployments that peer already has privileges equal to or greater than the victim, leaving real risk to sandboxed servers, HTTP-to-stdio bridges, or runaway servers.

CVSS Base Scores

version 4.0
version 3.1