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. ### 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
- Products
- @modelcontextprotocol/sdk, @modelcontextprotocol/server
- Affected versions
- Not specified
- Fixed versions
- 1.32.0, 2.3.0
- CVEs
- CVE-2026-111768
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 13:20 UTC · Revision 1
Source evidence
MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation
core-osv · Original sourcePublished 20 Oct 2026, 20:06 UTC
### 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
osv:GHSA-46jr-4wx8-v453
@modelcontextprotocol/sdk
Fixed versions: 1.32.0
@modelcontextprotocol/server
Fixed versions: 2.3.0
Complete source record
{
"id": "d56ca15821f9265dab31b1981a7b7a65ea67d46bfd785c162821e778ca498d43",
"url": "https://osv.dev/vulnerability/GHSA-46jr-4wx8-v453",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation",
"summary": "### 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 ",
"evidence": "osv:GHSA-46jr-4wx8-v453",
"products": [
{
"name": {
"value": "@modelcontextprotocol/sdk",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.32.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "@modelcontextprotocol/server",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.3.0",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "GHSA-46jr-4wx8-v453",
"aliases": [
"CVE-2026-111768",
"GHSA-46jr-4wx8-v453"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.3.0"
},
{
"fixed": "1.32.0"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/sdk",
"purl": "pkg:npm/%40modelcontextprotocol/sdk",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-46jr-4wx8-v453/GHSA-46jr-4wx8-v453.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.0"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/server",
"purl": "pkg:npm/%40modelcontextprotocol/server",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-46jr-4wx8-v453/GHSA-46jr-4wx8-v453.json"
}
}
],
"modified": "2026-10-20T20:15:05.222078887Z",
"provider": "osv",
"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/modelcontextprotocol/typescript-sdk"
],
"provider_metadata": {
"cwe_ids": [
"CWE-770"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2026-10-20T20:06:35Z"
}
},
"related_cves": [
{
"value": "CVE-2026-111768",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 390366,
"published_at": "2026-10-20T20:06:35+00:00"
}