NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MCP TypeScript SDK

GHSA-f897-62hf-6gxq: MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length

highCVSS 3.1 7.5

The MCP TypeScript SDK put no limit on POST body size or JSON-RPC batch length in its HTTP transports. An unauthenticated client can exhaust memory or stall an MCP server with one huge request or one long batch. Servers that accept Streamable HTTP from untrusted clients are affected. Fixed in @modelcontextprotocol/sdk 1.30.1, and in 2.x server and node 2.1.0 and hono 2.0.1.

Published Oct 27, 2026 · Analysis Oct 27, 2026

What an attacker can do

An MCP server that listens over Streamable HTTP reads the whole POST body before it parses it. Before the fix, nothing capped that body, and nothing capped the number of messages in a JSON-RPC batch. A single oversized request can use up the server's memory. A single batch with a very long list of messages can keep the server busy so that other clients wait.

The attacker needs only network access to the endpoint. No credentials are needed unless your application authenticates requests before they reach the SDK. The result is denial of service: the MCP server crashes or hangs, and every agent that depends on its tools loses them. Nothing in the advisory says data is read or changed (the CVSS vector rates confidentiality and integrity as none).

A body parser such as express.json() does not protect you, because it does not limit batch length. Stdio-only servers are not affected.

Who is affected

Affected: @modelcontextprotocol/sdk 1.10.0 through 1.30.0, and @modelcontextprotocol/server, @modelcontextprotocol/node and @modelcontextprotocol/hono at 2.0.0. You are exposed if clients you do not fully trust can reach your server over Streamable HTTP. Check the installed versions:

npm ls @modelcontextprotocol/sdk @modelcontextprotocol/server @modelcontextprotocol/node @modelcontextprotocol/hono

@modelcontextprotocol/sdk

Ecosystem
npm
Affected
>= 1.10.0, < 1.30.1
Fixed in
1.30.1
Check
npm ls @modelcontextprotocol/sdk

@modelcontextprotocol/server

Ecosystem
npm
Affected
>= 2.0.0, < 2.1.0
Fixed in
2.1.0
Check
npm ls @modelcontextprotocol/server

@modelcontextprotocol/node

Ecosystem
npm
Affected
>= 2.0.0, < 2.1.0
Fixed in
2.1.0
Check
npm ls @modelcontextprotocol/node

@modelcontextprotocol/hono

Ecosystem
npm
Affected
>= 2.0.0, < 2.0.1
Fixed in
2.0.1
Check
npm ls @modelcontextprotocol/hono

How to fix it

On 1.x, upgrade @modelcontextprotocol/sdk to 1.30.1 or later. On 2.x, upgrade @modelcontextprotocol/server to 2.1.0, @modelcontextprotocol/node to 2.1.0 and @modelcontextprotocol/hono to 2.0.1 or later. Upgrade every one you have installed.

npm install @modelcontextprotocol/[email protected]

After the fix, bodies over 4 MiB get a 413 response and batches over 100 messages get a 400. If your clients send larger bodies, raise the new maxRequestBodySize option. If you cannot upgrade yet, cap request body size in a reverse proxy. The advisory names no workaround for batch length.

How to tell if you were hit

Look for an MCP server process whose memory climbs sharply or that restarts after out-of-memory kills. Check access logs or proxy logs for unusually large POST bodies to the MCP endpoint, and for single requests that carry a very long JSON array of messages. Unexplained stalls where other clients time out while one request runs also fit. The advisory does not list log lines for this flaw.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

In affected versions, MCP servers reachable over HTTP put no limit on the size of a POST body or on the number of messages in a JSON-RPC batch. Large requests could exhaust the server's memory, and one long batch could block it from serving anyone else. No credentials were needed, unless your application authenticates requests before they reach the SDK.

Am I affected?

Yes, if clients you do not fully trust can reach your server over Streamable HTTP. A body parser such as express.json() does not protect you, because it does not limit batch length. Servers that only use stdio are not affected.

Affected versions:

  • @modelcontextprotocol/sdk 1.10.0 through 1.30.0
  • @modelcontextprotocol/server 2.0.0
  • @modelcontextprotocol/node 2.0.0
  • @modelcontextprotocol/hono 2.0.0

Fix

Upgrade to:

  • 1.x: @modelcontextprotocol/sdk 1.30.1 or later
  • 2.x: @modelcontextprotocol/server 2.1.0, @modelcontextprotocol/node 2.1.0 and @modelcontextprotocol/hono 2.0.1 or later. Upgrade every one you have installed.

Bodies over 4 MiB now get 413, and batches over 100 messages get 400. If your clients send larger bodies, raise the new maxRequestBodySize option.

If you cannot upgrade yet, cap request body size in a reverse proxy.

Credited to cybercraftsolutionsllc, hewei-gikaku, Jvr2022, Gal3m, mohammad228, shmulc8, JustasMonkev, subchat.

Questions

Does this need authentication to exploit?

No. The advisory says no credentials are needed, unless your application authenticates requests before they reach the SDK. Any client that can reach the HTTP endpoint can send the oversized body or long batch.

Are stdio MCP servers affected?

No. Only servers that accept requests over Streamable HTTP are affected. A server that runs over stdio alone has no HTTP body or batch to abuse.

Does express.json() protect my server?

No. The advisory says a body parser such as express.json() does not limit JSON-RPC batch length. Upgrade the SDK, or at least cap body size in a reverse proxy.

Will the fix break clients that send large requests?

It can. Bodies over 4 MiB now return 413 and batches over 100 messages return 400. If legitimate clients need more, raise the new maxRequestBodySize option.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

Coverage on the Beam blog

More MCP TypeScript SDK vulnerabilities

All MCP TypeScript SDK entries