{"schema":"threatline.record/2","record":{"id":"CVE-2026-111768","aliases":["GHSA-46jr-4wx8-v453"],"summary":"MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation","details":"### Summary\nIn 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`.\n\nNo credentials are needed, unless you authenticate requests before they reach the SDK.\n\n### Am I affected?\nYes, 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.\n\nAffected versions:\n\n- `@modelcontextprotocol/sdk` 1.3.0 through 1.31.0\n- `@modelcontextprotocol/server` 2.0.0 through 2.2.0\n\n### Fix\nUpgrade to:\n\n- 1.x: `@modelcontextprotocol/sdk` 1.32.0 or later\n- 2.x: `@modelcontextprotocol/server` 2.3.0 or later\n\n**Upgrading alone changes nothing.** The patched versions add an `McpServer` option, `maxToolInputElements`, that is off by default. Make both of these changes:\n\n1. 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.\n2. 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.\n\nIf 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.","categories":["Libraries & packages"],"product":"@modelcontextprotocol/sdk","vendor":"","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:06:38Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@modelcontextprotocol/sdk"},"range":">= 1.3.0, < 1.32.0"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:06:38Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@modelcontextprotocol/server"},"range":">= 2.0.0, < 2.3.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:15:05.222078887Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"name":"@modelcontextprotocol/sdk","ecosystem":"npm","purl":"pkg:npm/%40modelcontextprotocol/sdk"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.3.0"},{"fixed":"1.32.0"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:15:05.222078887Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"name":"@modelcontextprotocol/server","ecosystem":"npm","purl":"pkg:npm/%40modelcontextprotocol/server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.3.0"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:06:38Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@modelcontextprotocol/sdk"},"version":"1.32.0"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:06:38Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@modelcontextprotocol/server"},"version":"2.3.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:15:05.222078887Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"name":"@modelcontextprotocol/sdk","ecosystem":"npm","purl":"pkg:npm/%40modelcontextprotocol/sdk"},"version":"1.32.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-46jr-4wx8-v453","source_modified_at":"2026-10-20T20:15:05.222078887Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"name":"@modelcontextprotocol/server","ecosystem":"npm","purl":"pkg:npm/%40modelcontextprotocol/server"},"version":"2.3.0"}],"cvss":7.5,"severity":"High","kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-10-20T20:06:35Z","modified_at":"2026-10-20T20:15:05.222078887Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-20T20:06:38Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-46jr-4wx8-v453","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-20T20:15:05.222078887Z"}],"sources":["GitHub Advisory Database","OSV"],"references":[{"url":"https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-46jr-4wx8-v453","source":"GitHub Advisory Database"},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/pull/2926","source":"GitHub Advisory Database"},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/pull/2927","source":"GitHub Advisory Database"},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/commit/6d8dbc6cb590edf766fcb66b636ca6b654e99c37","source":"GitHub Advisory Database"},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/commit/fd26801b3b387742fe24a90ed4b275dd6072209f","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-20T20:15:05.222078887Z","content_hash":"4c288a776eef07a6724dec4beb24209e182e7351df27b872839e438573461486"}}
