MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length
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 other clients. No credentials were required unless the host application authenticates requests before they reach the SDK.
Am I affected?
You are affected if clients that are not fully trusted can reach your server over Streamable HTTP. Standard body parsers such as express.json() do not mitigate this vulnerability because they do not limit batch length. Servers that communicate strictly using stdio are not affected.
Affected versions:
@modelcontextprotocol/sdk1.10.0 through 1.30.0@modelcontextprotocol/server2.0.0@modelcontextprotocol/node2.0.0@modelcontextprotocol/hono2.0.0
What to do
Remediation
Upgrade affected dependencies to fixed releases:
- For 1.x branches: update to
@modelcontextprotocol/sdk1.30.1 or later. - For 2.x branches: update to
@modelcontextprotocol/server2.1.0,@modelcontextprotocol/node2.1.0, and@modelcontextprotocol/hono2.0.1 or later. Upgrade every affected package installed in your project.
Following the update, request bodies exceeding 4 MiB will return 413, and batches containing more than 100 messages will return 400. If clients require larger payloads, configure the maxRequestBodySize setting accordingly.
Workarounds
If upgrading immediately is not possible, cap request body sizes using a reverse proxy.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @modelcontextprotocol/hono | >= 2.0.0, < 2.0.1 | 2.0.1 |
| npm package | @modelcontextprotocol/node | >= 2.0.0, < 2.1.0 | 2.1.0 |
| npm package | @modelcontextprotocol/sdk | >= 1.10.0, < 1.30.1 | 1.30.1 |
| npm package | @modelcontextprotocol/server | >= 2.0.0, < 2.1.0 | 2.1.0 |
References
- https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-f897-62hf-6gxq
- https://github.com/modelcontextprotocol/typescript-sdk/pull/2698
- https://github.com/modelcontextprotocol/typescript-sdk/pull/2717
- https://github.com/modelcontextprotocol/typescript-sdk/commit/7b781ed4e25355a25d15974f3c76de81299694ed
- https://github.com/modelcontextprotocol/typescript-sdk/commit/a9f6eb709b85459d01e8f2a9e881fef2621756c1
- https://github.com/modelcontextprotocol/typescript-sdk
- https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.30.1
- https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/@modelcontextprotocol/hono@2.0.1
- https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/@modelcontextprotocol/node@2.1.0
- https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/@modelcontextprotocol/server@2.1.0
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-770- Platform
- npm
- Package
@modelcontextprotocol/hono, @modelcontextprotocol/node, @modelcontextprotocol/sdk- Disclosed
- 27.10.2026
- Updated
- 02.11.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-f897-62hf-6gxq - CC BY 4.0
Vulnerability history: @modelcontextprotocol/sdk
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 9
- First → latest
- 12.2025 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 7
- Medium 2
Disclosures per year
- 2025: 1
- 2026: 8
-
MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.