Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2026-111768 — @modelcontextprotocol/sdk

HIGHFix: modelcontextprotocol/typescript-sdk#2926

CVE-2026-111768 is a high-severity (CVSS 7.5) vulnerability in @modelcontextprotocol/sdk. A fix is available for @modelcontextprotocol/sdk — see the affected versions and patch details below.

MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation

Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 20, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

78Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@modelcontextprotocol/sdknpm
42.1Mdownloads / week
@modelcontextprotocol/servernpm
9.1Mdownloads / week

Description

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/sdk 1.3.0 through 1.31.0
  • @modelcontextprotocol/server 2.0.0 through 2.2.0

Fix

Upgrade to:

  • 1.x: @modelcontextprotocol/sdk 1.32.0 or later
  • 2.x: @modelcontextprotocol/server 2.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:

  1. Set maxToolInputElements just above the largest input your tools need, for example new McpServer(info, { maxToolInputElements: 10_000 }). It counts array elements and object keys in a call's arguments. A call over the limit gets an isError: true result.
  2. Lower the request size limit to what your tools need. The option covers tool arguments only, and the size limit covers everything else. Set maxRequestBodySize on the transport or createMcpHandler(). If you parse the body yourself, for example with express.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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npm@modelcontextprotocol/sdk≥ 1.3.0&&< 1.32.01.32.0npm install @modelcontextprotocol/sdk@1.32.0
📦npm@modelcontextprotocol/server≥ 2.0.0&&< 2.3.02.3.0npm install @modelcontextprotocol/server@2.3.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @modelcontextprotocol/sdk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @modelcontextprotocol/sdk to 1.32.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-111768 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### 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:
O3 Security · Impact-Aware SCA

Is CVE-2026-111768 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-111768: Fixed in 1.32.0 (High 7.5)