GHSA-46jr-4wx8-v453: MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation
- Identifiers
- CVE-2026-111768GHSA-46jr-4wx8-v453
- Published
- Record updated
- Affected
- @modelcontextprotocol/server >= 2.0.0, < 2.3.0, fixed in 2.3.0
- @modelcontextprotocol/sdk >= 1.3.0, < 1.32.0, fixed in 1.32.0
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
Summary
The MCP TypeScript SDK (`@modelcontextprotocol/sdk` 1.3.0 through 1.31.0, and `@modelcontextprotocol/server` 2.0.0 through 2.2.0) placed no limit on the number of array elements and object keys it validated per request. A single HTTP request within the default 4 MiB size limit can exhaust server memory and abort the process with `JavaScript heap out of memory`. No credentials are needed unless requests are authenticated before reaching the SDK, and stdio-only servers are not affected.
Mitigation
Upgrade to `@modelcontextprotocol/sdk` 1.32.0 or later, or `@modelcontextprotocol/server` 2.3.0 or later, then set the new `maxToolInputElements` option on `McpServer` (off by default), for example `new McpServer(info, { maxToolInputElements: 10_000 })`. Also lower the request size limit with `maxRequestBodySize` on the transport or `createMcpHandler()`, or the body parser's limit if the body is parsed manually. If upgrading is not possible yet, set `maxRequestBodySize`, which requires `@modelcontextprotocol/sdk` 1.30.1 or `@modelcontextprotocol/server` 2.1.0, or use a reverse proxy.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- @modelcontextprotocol/sdknpmLLM dependency since 2024-11-11 · 18 tracked dependents
- @modelcontextprotocol/servernpmNo LLM dependency detected · 3 tracked dependents
Topics
Related items
- HighGHSA-22jm-h49p-29qw: MCP TypeScript SDK: Experimental tasks were not tied to the session that created themSame vendor · GitHub Advisory Database
- MediumGHSA-6prh-2h8m-c8cw: MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodiesSame vendor · GitHub Advisory Database
- HighCVE-2026-96620: Claude Agent SDK argument injection via resume option enabling command executionSame vendor · NVD/CVE Database
- MediumGHSA-84m7-p3x7-pcfv: MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource ExhaustionSame vendor · GitHub Advisory Database
- HighCVE-2026-86063: Claude Code is an agentic coding tool. Prior to 2.1.179, the Claude Code and Claude Desktop plugin installation flow…Same vendor · NVD/CVE Database