Skip to content
MCP TypeScript SDK·Indexed by this site · Originally published· Event →SelectedAttention41

MCP TypeScript SDK: a single HTTP request can exhaust server memory within the default size limit

AI summary

The MCP TypeScript SDK fixed a denial-of-service vulnerability in which, within the default 4 MiB size limit, a single HTTP request could exhaust server memory while validating large numbers of array elements and object keys, terminating the process with JavaScript heap out of memory; unless authentication is performed before the request reaches the SDK, the attack requires no credentials. Affected versions are @modelcontextprotocol/sdk from 1.3.0 up to versions before 1.32.0, with the fix in 1.32.0; @modelcontextprotocol/server is affected from 2.0.0 up to versions before 2.3.0, with the fix in 2.3.0. Servers running only over stdio are not affected, and McpServer tools whose input contains arrays or records are at highest risk.

Why it was selected

The advisory states that under the default 4 MiB request limit a single request can exhaust server memory, and gives mandatory configuration items beyond upgrading, which teams deploying MCP services can use to assess their exposure.

Read originalgithub.com