CVE-2026-111768: MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation
Summary In affected versions, servers put no limit on how many array elements and object keys they validated in one request. One HTTP request within the default 4 MiB size limit could exhaust the server's memory, and the process aborted with JavaScript heap out of memory. No credentials are needed, unless you authenticate requests before they reach the SDK.
Published Oct 20, 2026
Affected packages
@modelcontextprotocol/sdk
- Ecosystem
- npm
- Affected
- >= 1.3.0, < 1.32.0
- Fixed in
- 1.32.0
- Check
npm ls @modelcontextprotocol/sdk
@modelcontextprotocol/server
- Ecosystem
- npm
- Affected
- >= 2.0.0, < 2.3.0
- Fixed in
- 2.3.0
- Check
npm ls @modelcontextprotocol/server
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
In affected versions, servers put no limit on how many array elements and object keys they validated in one request. One HTTP request within the default 4 MiB size limit could exhaust the server's memory, and the process aborted with JavaScript heap out of memory.
No credentials are needed, unless you authenticate requests before they reach the SDK.
Am I affected?
Yes, if clients you do not fully trust can reach your server over HTTP. The risk is highest for McpServer tools whose input contains an array or a record. stdio-only servers are not affected.
Affected versions:
@modelcontextprotocol/sdk1.3.0 through 1.31.0@modelcontextprotocol/server2.0.0 through 2.2.0
Fix
Upgrade to:
- 1.x:
@modelcontextprotocol/sdk1.32.0 or later - 2.x:
@modelcontextprotocol/server2.3.0 or later
Upgrading alone changes nothing. The patched versions add an McpServer option, maxToolInputElements, that is off by default. Make both of these changes:
- Set
maxToolInputElementsjust above the largest input your tools need, for examplenew McpServer(info, { maxToolInputElements: 10_000 }). It counts array elements and object keys in a call's arguments. A call over the limit gets anisError: trueresult. - Lower the request size limit to what your tools need. The option covers tool arguments only, and the size limit covers everything else. Set
maxRequestBodySizeon the transport orcreateMcpHandler(). If you parse the body yourself, for example withexpress.json()or Fastify, set that parser's limit.
If you cannot upgrade yet, make the second change. maxRequestBodySize needs @modelcontextprotocol/sdk 1.30.1 or @modelcontextprotocol/server 2.1.0. Below that, use a reverse proxy.
Credited to root-Brainoverflow.
References
- https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-46jr-4wx8-v453
- https://github.com/modelcontextprotocol/typescript-sdk/pull/2926
- https://github.com/modelcontextprotocol/typescript-sdk/pull/2927
- https://github.com/modelcontextprotocol/typescript-sdk/commit/6d8dbc6cb590edf766fcb66b636ca6b654e99c37
- https://github.com/modelcontextprotocol/typescript-sdk/commit/fd26801b3b387742fe24a90ed4b275dd6072209f
- https://github.com/advisories/GHSA-46jr-4wx8-v453
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
Coverage on the Beam blog
More MCP TypeScript SDK vulnerabilities
All MCP TypeScript SDK entriesCVE-2026-111767
MCP TypeScript SDK: Experimental tasks were not tied to the session that created them
high8.6Oct 20, 2026CVE-2026-111769
MCP TypeScript client SDK: HTTP client transports and OAuth requests followed cross-origin redirects and re-sent custom headers and request bodies
medium6.5Oct 20, 2026CVE-2026-111771
MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service
medium6.8Oct 20, 2026CVE-2026-104850
MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
high7.5Oct 6, 2026CVE-2026-25536
@modelcontextprotocol/sdk has cross-client data leak via shared server/transport instance reuse
high7.1Feb 4, 2026CVE-2026-0621
Anthropic's MCP TypeScript SDK has a ReDoS vulnerability
high8.7Jan 5, 2026
