{"id":"CVE-2026-111768","kind":"vulnerability","aliases":["CVE-2026-111768","GHSA-46jr-4wx8-v453"],"related":[],"title":"MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation","description":"### 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.","summary":"The MCP TypeScript SDK did not limit how many array elements and object keys it validated per HTTP request, so one request under the default 4 MiB body limit can exhaust server memory and crash the Node process with an out-of-memory abort. An unauthenticated remote client can trigger it on any HTTP MCP server that exposes tools with array or record inputs.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"@modelcontextprotocol/sdk","fixed":["1.32.0"],"affected":">= 1.3.0, < 1.32.0","ecosystem":"npm"},{"name":"@modelcontextprotocol/server","fixed":["2.3.0"],"affected":">= 2.0.0, < 2.3.0","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["ai-tooling","cwe-770","http-transport","mcp","node.js","self-hosted","typescript"],"not_affected_if":["auth-required","no-array-or-record-tool-inputs","patched-version","stdio-only"],"how_to_check":"Check the installed version: npm ls @modelcontextprotocol/sdk @modelcontextprotocol/server\nAffected if sdk is 1.3.0 to 1.31.0 or server is 2.0.0 to 2.2.0, and the server uses HTTP transport with McpServer tools that take arrays or records.","fix":"Upgrade @modelcontextprotocol/sdk to 1.32.0 or @modelcontextprotocol/server to 2.3.0, then set maxToolInputElements (e.g. new McpServer(info, { maxToolInputElements: 10_000 })) and lower maxRequestBodySize on the transport or createMcpHandler(). If you cannot upgrade, set maxRequestBodySize (needs sdk 1.30.1 or server 2.1.0) or enforce a body limit at a reverse proxy.","status":"open","published_at":"2026-10-20T20:06:35+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","triaged_at":"2026-10-23T20:56:10+00:00","updated_at":"2026-10-23T20:56:10+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-10-23T20:56:10Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade @modelcontextprotocol/sdk to 1.32.0 or @modelcontextprotocol/server to 2.3.0, then set maxToolInputElements (e.g. new McpServer(info, { maxToolInputElements: 10_000 })) and lower maxRequestBodySize on the transport or createMcpHandler(). If you cannot upgrade, set maxRequestBodySize (needs sdk 1.30.1 or server 2.1.0) or enforce a body limit at a reverse proxy.","reach":"internet","impact":"medium","summary":"The MCP TypeScript SDK did not limit how many array elements and object keys it validated per HTTP request, so one request under the default 4 MiB body limit can exhaust server memory and crash the Node process with an out-of-memory abort. An unauthenticated remote client can trigger it on any HTTP MCP server that exposes tools with array or record inputs.","category":"ai-tooling","who_cares":["mcp","typescript","node.js","http-transport","self-hosted"],"confidence":0.8,"needs_auth":"no","worst_case":"Remote unauthenticated request crashes the Node server process via memory exhaustion","analyst_note":"","how_to_check":"Check the installed version: npm ls @modelcontextprotocol/sdk @modelcontextprotocol/server\nAffected if sdk is 1.3.0 to 1.31.0 or server is 2.0.0 to 2.2.0, and the server uses HTTP transport with McpServer tools that take arrays or records.\nunknown","needs_analyst":false,"not_affected_if":["stdio-only","no-array-or-record-tool-inputs","patched-version","auth-required"],"user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000659,"input_tokens":3490,"output_tokens":619,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-111768':20A,28A '-2026':19A,27A '-770':35B '000':274C '1':222C,256C '1.3.0':212C '1.30.1':357C '1.31.0':214C '1.32.0':225C '10':273C '2':228C,297C '2.0.0':216C '2.1.0':360C '2.2.0':218C '2.3.0':231C '4':70B,137C '46jr':23A '4wx8':24A 'abort':89B,150C 'add':241C 'affect':112C,172C,208C,209C 'ai':32B 'ai-tool':31B 'alon':235C 'argument':286C,312C 'array':54B,106B,121C,198C,277C 'authent':163C 'bodi':72B,332C 'call':284C,288C 'cannot':347C 'chang':236C,255C,353C 'client':93B,175C 'contain':196C 'could':12A,141C 'count':276C 'cover':310C,318C 'crash':79B 'createmcphandl':327C 'credenti':158C 'cve':18A,26A 'cwe':34B 'default':9A,69B,136C,250C 'element':55B,122C,278C 'els':320C 'everyth':319C 'exampl':268C,335C 'exhaust':13A,75B,142C 'expos':103B 'express.json':337C 'fastifi':339C 'fix':219C 'fulli':179C 'get':292C 'ghsa':22A 'ghsa-46jr-4wx8-v453':21A 'heap':153C 'highest':190C 'host':43B 'http':5A,37B,62B,99B,132C,186C 'http-transport':36B 'info':271C 'input':109B,195C,263C 'iserror':294C 'javascript':152C 'key':58B,125C,281C 'largest':262C 'later':227C,233C 'limit':11A,51B,73B,117C,140C,291C,302C,317C,344C 'lower':298C 'make':251C,350C 'mani':53B,120C 'maxrequestbodys':322C,354C 'maxtoolinputel':245C,258C,272C 'mcp':1A,39B,46B,100B 'mcpserver':192C,243C,270C 'memori':15A,77B,88B,146C,156C 'mib':71B,138C 'modelcontextprotocol/sdk':29A,211C,224C,356C 'modelcontextprotocol/server':30A,215C,230C,359C 'need':160C,266C,307C,355C 'new':269C 'node':81B 'node.js':40B 'noth':237C 'object':57B,124C,280C 'one':4A,65B,129C,131C 'option':244C,309C 'out-of-memori':85B 'pars':330C 'parser':342C 'patch':239C 'per':61B 'process':82B,149C 'proxi':366C 'put':115C 'reach':167C,182C 'record':108B,201C 'remot':92B 'request':6A,63B,66B,130C,133C,164C,300C 'result':296C 'revers':365C 'risk':188C 'sdk':3A,48B,169C 'second':352C 'self':42B 'self-host':41B 'server':14A,76B,101B,114C,144C,184C,205C 'set':257C,321C,340C 'size':10A,139C,301C,316C 'stdio':203C 'stdio-on':202C 'summari':110C 'tool':33B,104B,193C,265C,306C,311C 'transport':38B,325C 'trigger':95B 'true':295C 'trust':180C 'typescript':2A,44B,47B 'unauthent':91B 'unless':161C 'upgrad':220C,234C,348C 'use':363C 'v453':25A 'valid':17A,60B,127C 'version':113C,210C,240C 'whose':194C 'within':7A,134C 'x':223C,229C 'yes':173C 'yet':349C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-20T20:06:35+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-46jr-4wx8-v453","url":"https://github.com/advisories/GHSA-46jr-4wx8-v453","severity":"high","published_at":"2026-10-20T20:06:35+00:00","modified_at":"2026-10-20T20:06:38+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","fetched_at":"2026-10-23T19:11:32+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}