Listen to this Post
In affected versions of the Model Context Protocol SDK, servers put no validation limits on how many array elements and object keys can be submitted within a single incoming request. Because this validation occurs prior to execution or size enforcement, an attacker can craft a malicious HTTP payload containing deeply nested structures or massive arrays that stay entirely within the default 4 MiB size limit. When the server processes these unbounded structures, it recursively validates every individual element and object key, consuming immense amounts of runtime memory. This uncontrolled resource allocation quickly exhausts available system memory, causing the Node.js process to abort with a fatal “JavaScript heap out of memory” error. Consequently, the server crashes, resulting in a complete denial of service for all legitimate users and connected clients. No pre-existing credentials or authentication are required to trigger this vulnerability, provided that unauthenticated remote HTTP clients can reach the SDK transport endpoint. Deployments utilizing `McpServer` instances whose tool inputs process arrays or records face the highest risk exposure. Standard input/output (stdio) based servers remain unaffected because they do not process unauthenticated HTTP request streams. To mitigate this memory exhaustion vector, maintainers introduced the `maxToolInputElements` configuration option alongside enhanced request body size controls. However, because these protections are disabled by default even after upgrading, administrators must explicitly configure both element count limits and request size restrictions across all affected server transports or API handlers to fully secure their applications against resource exhaustion attacks.
DailyCVE Form:
Platform: Model Context Protocol
Version: 1.3.0 through 1.31.0
Vulnerability: Memory Exhaustion DoS
Severity: High severity
date: October 15 2026
Prediction: Already patched today
What Undercode Say:
npm install @modelcontextprotocol/sdk@latest
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
const server = new McpServer(
{ name: "SecureServer", version: "1.0.0" },
{ maxToolInputElements: 10_000 }
);
Exploit: (Educational Purposes!)
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "vulnerableTool",
"arguments": {
"payload": ["item1", "item2", / thousands of elements /]
}
},
"id": 1
}
An attacker transmits an HTTP POST request containing an oversized array or object structure within the nominal 4 MiB body limit. The server’s validation logic recursively evaluates all elements without restriction, immediately exhausting heap memory and crashing the server process.
Protection: from this CVE
Upgrade `@modelcontextprotocol/sdk` to version `1.32.0` or later, and `@modelcontextprotocol/server` to `2.3.0` or later. Explicitly set `maxToolInputElements` on your `McpServer` instance (e.g., 10_000) and enforce strict request body limits via `maxRequestBodySize` or custom framework body parser limits.
Impact:
Complete denial of service via abrupt application crashes, unavailability of AI model tools, potential service degradation, and operational disruption without requiring any prior authentication or credentials.
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

