MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- The rating the maker of the software gives it. Shown when it differs from the CVSS level.What do these mean? →
- High (ghsa)
- Fix
- Fixed in 1.30.1, 2.1.0, 2.0.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The MCP TypeScript SDK (the `@modelcontextprotocol` server, Node, and Hono packages, plus the older `@modelcontextprotocol/sdk` package) is affected when MCP servers are exposed over HTTP to untrusted clients. Attackers could send oversized POST bodies or very long JSON-RPC batches, exhausting the server's memory and blocking it from serving other clients.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
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.
Timeline
- Advisory published
- Record last updated
- First seen by cve.now
Affected versions
- @modelcontextprotocol/sdknpm
From 1.10.0 · fixed in 1.30.1
- @modelcontextprotocol/servernpm
From 2.0.0 · fixed in 2.1.0
- @modelcontextprotocol/nodenpm
From 2.0.0 · fixed in 2.1.0
- @modelcontextprotocol/hononpm
From 2.0.0 · fixed in 2.0.1