AAK-MCP-TSSDK-CVE-2026-111768-001: MCP TypeScript SDK: one HTTP request can exhaust server memory (validation work, body size, batch length)
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
McpTypeScriptSdkValidationMemory
What it detects
The official MCP TypeScript SDK's HTTP servers put no limit on how many array elements and object keys they validated in one request, so one request inside the default 4 MiB limit could exhaust the server's memory, and the process aborted with JavaScript heap out of memory (CVE-2026-111768, CVSS 3.1 7.5, GHSA-46jr-4wx8-v453). No credentials are needed unless requests are authenticated before they reach the SDK. It affects @modelcontextprotocol/sdk 1.3.0 up to 1.32.0 and @modelcontextprotocol/server 2.0.0 up to 2.3.0. stdio-only servers are not affected. The HTTP transports also put no limit on the size of a POST body or on the number of messages in a JSON-RPC batch, so a large body could exhaust memory and one long batch could keep the server from answering anyone else (GHSA-f897-62hf-6gxq, CVSS 3.1 7.5, no CVE id): @modelcontextprotocol/sdk 1.10.0 up to 1.30.1 and @modelcontextprotocol/server 2.0.0, inside the ranges above, and the @modelcontextprotocol/node 2.0.0 and @modelcontextprotocol/hono 2.0.0 adapters, which this rule does not read.
How to fix
Upgrade to @modelcontextprotocol/sdk 1.32.0 or @modelcontextprotocol/server 2.3.0 or later and pin it. The advisory says upgrading alone changes nothing, because the patched versions add an option that is off by default: set maxToolInputElements on McpServer just above the largest input your tools need, and lower maxRequestBodySize on the transport, or your own body parser's limit, to what they need. If you cannot upgrade yet, make the second change. Upgrade @modelcontextprotocol/node to 2.1.0 and @modelcontextprotocol/hono to 2.0.1 or later where you use them, since each reads the request body itself.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-TSSDK-CVE-2026-111768-001
Limitations
Reports @modelcontextprotocol/sdk from 1.3.0 up to 1.32.0 and @modelcontextprotocol/server from 2.0.0 up to 2.3.0 where a package.json, lockfile or MCP config states the version, reporting a range that admits an affected version. latest is fixed and states no version, so it is not reported. It reads the version, not the code: a fixed release without maxToolInputElements set, which the advisory says is still exposed, is not reported, and a stdio-only server on an affected version is reported without being exposed. @modelcontextprotocol/node 2.0.0 and @modelcontextprotocol/hono 2.0.0, which GHSA-f897-62hf-6gxq also names, are not read: AAK-KNOWN-VULN-001 reports them from OSV's record after aak update, and not before, so a project on either adapter with a fixed @modelcontextprotocol/server gets no finding from the bundled data. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-111768
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI08 (Cascading Failures)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-08 (MCP-Specific Vuln)
- Incidents and advisories: GHSA-f897-62hf-6gxq
- CSA AI Controls Matrix (AICM): STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-TSSDK-CVE-2026-111768-001.md: the page then shows that text, with the registry reference appended under it.