MCP TypeScript SDK exposed to memory exhaustion vulnerability
Start here
A GitHub security advisory disclosed that versions of @modelcontextprotocol/sdk before 1.32.0 and versions of @modelcontextprotocol/server before 2.3.0 do not limit the number of array elements and object keys when validating requests, so a single HTTP request within the default 4 MiB size limit can exhaust server memory, and the process aborts with JavaScript heap out of memory, with no credentials required unless the request is authenticated before reaching the SDK. Subsequent reporting said that the affected versions are @modelcontextprotocol/sdk from 1.3.0 up to before 1.32.0, and the fixed version is 1.32.0.
Generated by AI from reports · Updated 2026-10-22
Storyline
- · 3 reports· Attention44MCP TypeScript SDK fixes redirect and OAuth credential flaws
- · 1 reports· Attention42MCP TypeScript SDK cross-origin redirect leaks request headers and request body
- · 1 reports· Attention35MCP TypeScript SDK fixes task authorization vulnerability
- · 1 reports· Attention41MCP TypeScript SDK missing token audience validation
- · 2 reports· Attention41
MCP TypeScript SDK exposed to memory exhaustion vulnerabilityThis event
- · 1 reports· Attention45MCP TypeScript SDK cross-client message leakage vulnerability
- · 3 reports· Attention42MCP Python SDK vulnerability: issuer still must be passed after upgrade
Progress timeline
- GitHub Security AdvisoriesSelectedMCP TypeScript SDK: a single HTTP request can exhaust server memory, fixed version released
A GitHub security advisory discloses that versions of @modelcontextprotocol/sdk before 1.32.0 and versions of @modelcontextprotocol/server before 2.3.0 do not limit the number of array elements and object keys when validating requests; a single HTTP request within the default 4 MiB size limit can exhaust server memory, and the process aborts with JavaScript heap out of memory, with no credentials required unless the request is authenticated before reaching the SDK. stdio-only servers are not affected; the highest risk is McpServer tools whose input contains arrays or records. The fixed versions add an McpServer option maxToolInputElements that is off by default and must be manually set to a value slightly higher than the tool's maximum input; calls exceeding the limit return isError: true; it is also recommended to lower maxRequestBodySize to the size the tool actually needs.
- MCP TypeScript SDKSelectedMCP TypeScript SDK: a single HTTP request can exhaust server memory within the default size limit
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.