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


Severity

Recommended
0.0
high
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-18017531
  • 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_post method of lib/mcp/server/transports/streamable_http_transport.rb, which reads the entire HTTP request body into memory with request.body.read and then parses it via JSON.parse(body_string, symbolize_names: true) with no size limit. An attacker can exhaust worker memory and terminate the process by sending a single oversized JSON-RPC POST request, whose parsing materializes the full object graph and interns a Ruby symbol for every key. Exploitation requires only TCP connectivity to the MCP endpoint, and the vulnerable path runs before session validation, so it applies in both stateful and stateless modes.

CVSS Base Scores

version 4.0
version 3.1