Skip to content
PatchBriefing

Search PatchBriefing

Type at least two characters. Results update as you type.

Search CVEs, products, packages and article titles.

Nothing found. Identifiers such as CVE and GHSA can be searched in both languages.

Subscribe

High · 7.5 Node.js & npm GHSA-f897-62hf-6gxq

MCP TypeScript SDK: Unbounded Request Bodies and JSON-RPC Batches Allow Memory Exhaustion DoS

MCP TypeScript SDK HTTP transports accepted unlimited POST body sizes and JSON-RPC batch lengths, letting unauthenticated remote clients exhaust server memory or block processing. Fixes are available for all affected packages.

By PatchBriefing ·

Produced automatically from official sources with the help of AI. How we work →

Synthesized by AI from 2 sources · updated 1 week ago

AI summary

A vulnerability has been disclosed in the MCP TypeScript SDK affecting servers that expose the Streamable HTTP transport. Affected versions placed no limit on the size of incoming POST request bodies or on the number of messages allowed in a single JSON-RPC batch, allowing a remote, unauthenticated client to exhaust server memory or block the server from handling other requests. Fixed versions are available for all affected packages.

What happened

The MCP TypeScript SDK's HTTP server transports and handlers did not enforce any limit on the size of a POST request body or on the number of messages contained in a JSON-RPC batch. A client could send a very large request body or a single very long batch of messages to exhaust the server's available memory, or to block it from serving other clients while processing the oversized request. No authentication credentials were required to trigger this behavior unless the hosting application independently authenticates requests before they reach the SDK.

Technical cause

The root cause is classified as CWE-770, Allocation of Resources Without Limits or Throttling. The SDK's HTTP handlers accepted request bodies and JSON-RPC batches of arbitrary size without imposing a maximum. Using a generic body parser such as express.json() does not mitigate this issue, because such parsers do not restrict the number of messages within a JSON-RPC batch, only the raw body size in some configurations.

Who is affected

Any MCP server that is reachable over the Streamable HTTP transport by clients that are not fully trusted is affected. Servers that only communicate over stdio are not affected by this issue, since the vulnerable code paths are specific to the HTTP transport.

Affected versions

The following packages and version ranges are affected: @modelcontextprotocol/sdk versions 1.10.0 through 1.30.0; @modelcontextprotocol/server version 2.0.0; @modelcontextprotocol/node version 2.0.0; and @modelcontextprotocol/hono version 2.0.0.

Fixes and mitigation

Fixed versions are available: @modelcontextprotocol/sdk 1.30.1 or later for the 1.x line; and for the 2.x line, @modelcontextprotocol/server 2.1.0, @modelcontextprotocol/node 2.1.0, and @modelcontextprotocol/hono 2.0.1, all of which should be upgraded together if installed. In the fixed versions, request bodies larger than 4 MiB are rejected with an HTTP 413 response, and JSON-RPC batches containing more than 100 messages are rejected with an HTTP 400 response. Applications that legitimately need to send larger request bodies can raise the new maxRequestBodySize option. If upgrading is not immediately possible, capping request body size at a reverse proxy in front of the server is a viable interim mitigation.

Recommended action

Upgrade all installed affected packages to their fixed versions: @modelcontextprotocol/sdk to 1.30.1 or later, and, if used, @modelcontextprotocol/server to 2.1.0, @modelcontextprotocol/node to 2.1.0, and @modelcontextprotocol/hono to 2.0.1. Organizations that cannot upgrade immediately should enforce request body size limits at a reverse proxy as a temporary measure.

PatchBriefing score

7.5 / 10 · High

Official CVSS: 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Why this score

The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.

Affected versions

@modelcontextprotocol/sdk >= 1.10.0, < 1.30.1
vulnerable
@modelcontextprotocol/sdk ≥ 1.10.0 < 1.30.1
vulnerable
≥ 1.30.1
patched
@modelcontextprotocol/server >= 2.0.0, < 2.1.0
vulnerable
@modelcontextprotocol/server ≥ 2.0.0 < 2.1.0
vulnerable
≥ 2.1.0
patched
@modelcontextprotocol/node >= 2.0.0, < 2.1.0
vulnerable
@modelcontextprotocol/node ≥ 2.0.0 < 2.1.0
vulnerable
≥ 2.1.0
patched
@modelcontextprotocol/hono >= 2.0.0, < 2.0.1
vulnerable
@modelcontextprotocol/hono ≥ 2.0.0 < 2.0.1
vulnerable
≥ 2.0.1
patched

Reported fixes

Fixed versions are available: @modelcontextprotocol/sdk 1.30.1 or later for the 1.x line; and for the 2.x line, @modelcontextprotocol/server 2.1.0, @modelcontextprotocol/node 2.1.0, and @modelcontextprotocol/hono 2.0.1, all of which should be upgraded together if installed. In the fixed versions, request bodies larger than 4 MiB are rejected with an HTTP 413 response, and JSON-RPC batches containing more than 100 messages are rejected with an HTTP 400 response. Applications that legitimately need to send larger request bodies can raise the new maxRequestBodySize option. If upgrading is not immediately possible, capping request body size at a reverse proxy in front of the server is a viable interim mitigation.

How this was built

2 source records were collected, matched and used to prepare the report above.

  • GitHub Advisory Database database
  • OSV.dev database
Unified report
MCP TypeScript SDK: Unbounded Request Bodies and JSON-RPC Batches Allow Memory Exhaustion DoS
1 article · 2 sources cited
Revision history
  1. Merged
  2. Published
  3. Generated
The Morning Brief

Relevant changes for the stacks you follow.

Choose your stacks, topics and optional WordPress plugins. At 07:00 CET, matching advisories and releases from the reporting period are grouped into one email.

✓ Choose stacks and topics✓ Change preferences anytime✓ One grouped email