---
id: "GHSA-f897-62hf-6gxq"
kind: "vulnerability"
aliases: ["GHSA-f897-62hf-6gxq"]
title: "MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "@modelcontextprotocol/sdk", "fixed": ["1.30.1"], "affected": ">= 1.10.0, < 1.30.1", "ecosystem": "npm"}, {"name": "@modelcontextprotocol/server", "fixed": ["2.1.0"], "affected": ">= 2.0.0, < 2.1.0", "ecosystem": "npm"}, {"name": "@modelcontextprotocol/node", "fixed": ["2.1.0"], "affected": ">= 2.0.0, < 2.1.0", "ecosystem": "npm"}, {"name": "@modelcontextprotocol/hono", "fixed": ["2.0.1"], "affected": ">= 2.0.0, < 2.0.1", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["ai-tooling", "cwe-770", "mcp", "node", "self-hosted", "streamable-http", "typescript"]
not_affected_if: ["managed-hosting", "stdio-only"]
published_at: "2026-10-27T19:02:00+00:00"
first_seen_at: "2026-10-27T19:04:56+00:00"
updated_at: "2026-10-27T19:05:51+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-f897-62hf-6gxq", "first_seen_at": "2026-10-27T19:04:56+00:00"}]
---

# MCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length

The MCP TypeScript SDK's HTTP server transports and handlers did not cap POST body size or the number of messages in a JSON-RPC batch. A remote client can send oversized or very long batches, exhausting server memory and blocking other users.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@modelcontextprotocol/sdk affected >= 1.10.0, < 1.30.1 fixed 1.30.1
- npm:@modelcontextprotocol/server affected >= 2.0.0, < 2.1.0 fixed 2.1.0
- npm:@modelcontextprotocol/node affected >= 2.0.0, < 2.1.0 fixed 2.1.0
- npm:@modelcontextprotocol/hono affected >= 2.0.0, < 2.0.1 fixed 2.0.1

## How to check

- Run `npm ls @modelcontextprotocol/sdk @modelcontextprotocol/server @modelcontextprotocol/node @modelcontextprotocol/hono` and compare against the affected ranges
- Check whether the server is reachable over Streamable HTTP by untrusted clients (stdio-only servers are not affected)

## Fix

- `@modelcontextprotocol/sdk` to `1.30.1` or later on the 1.x line
- `@modelcontextprotocol/server`, `@modelcontextprotocol/node` to `2.1.0` or later on the 2.x line
- `@modelcontextprotocol/hono` to `2.0.1` or later
- If clients send bodies over 4 MiB, raise the `maxRequestBodySize` option; or cap request body size in a reverse proxy until upgraded

## Timeline

- 2026-10-27T19:04:56+00:00 ghsa https://github.com/advisories/GHSA-f897-62hf-6gxq

## From the sources

### 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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
