Skip to content
HighVulnerability

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

Published
Record updated
View JSON
Affected
  • @modelcontextprotocol/hono >= 2.0.0, < 2.0.1, fixed in 2.0.1
  • @modelcontextprotocol/node >= 2.0.0, < 2.1.0, fixed in 2.1.0
  • @modelcontextprotocol/server >= 2.0.0, < 2.1.0, fixed in 2.1.0
  • and 1 more

Summary

Affected versions of the MCP TypeScript SDK put no limit on the size of HTTP POST bodies or on the number of messages in a JSON-RPC batch, so large requests can exhaust server memory and a long batch can block other clients. Exploitation needs no credentials unless the application authenticates requests before they reach the SDK, and stdio-only servers are not affected.

Mitigation

Upgrade @modelcontextprotocol/sdk to 1.30.1 or later for 1.x, and to @modelcontextprotocol/server 2.1.0, @modelcontextprotocol/node 2.1.0 and @modelcontextprotocol/hono 2.0.1 or later for 2.x, upgrading every installed package. Bodies over 4 MiB now get 413 and batches over 100 messages get 400; raise the maxRequestBodySize option if clients send larger bodies. If upgrading is not possible yet, cap request body size in a reverse proxy.