Sep 9, 2026·4 min read·32 visits
Unauthenticated remote attackers can crash Express.js applications using multer < 2.3.0 by sending crafted multipart requests that trigger an unhandled RangeError in the V8 engine.
CVE-2026-77078 is a critical denial of service vulnerability in the multer Node.js package, allowing unauthenticated remote attackers to crash the runtime process using a single crafted multipart/form-data HTTP payload.
The multer middleware is a highly utilized package within the Node.js ecosystem for handling multipart/form-data payloads, primarily used in Express-based web applications. This middleware exposes a substantial attack surface because it processes untrusted file uploads and text field inputs directly from HTTP request streams. A security flaw exists in how the library accumulates multipart field parameters during asynchronous stream parsing.\n\nUnauthenticated remote attackers can leverage this component's parsing behavior to trigger a process-wide Denial of Service (DoS) using minimal network resources. By exploiting this issue, attackers can force target servers offline with a single, low-overhead HTTP request, creating severe operational availability risks.
The flaw lies in the interaction between multer's field accumulation mechanism and the V8 JavaScript engine's internal array limits. When parsing multipart payloads, the middleware uses bracket-notation syntax to construct structured data objects or arrays from incoming field names, such as converting items[] into an active array structure.\n\nThe V8 engine enforces a strict physical boundary of 4,294,967,295 elements for standard array allocations. If an application receives a field explicitly indexed at this limit followed by a push operation, the engine throws a synchronous RangeError: Invalid array length exception. Because the parsing flow operates inside an asynchronous stream lifecycle, the exception cannot be caught by standard outer try-catch blocks. The uncaught error propagates to the top of the event loop, causing the Node.js runtime to terminate immediately.
The vulnerability resides in the make-middleware.js module where fields are appended dynamically. The application processes each field using the appendField utility but fails to enclose this call within any error-handling routine.\n\njavascript\n// Vulnerable implementation in lib/make-middleware.js\nappendField(req.body, fieldname, value)\n\n\nThe patch introduces structured exception handling to intercept failures arising from invalid field mutations. This prevents the runtime from encountering unhandled errors during stream processing.\n\njavascript\n// Patched implementation in lib/make-middleware.js\ntry {\n appendField(req.body, fieldname, value)\n} catch {\n return abortWithCode('INVALID_FIELD_NAME', fieldname)\n}\n\n\nThe error definition mapping is updated in lib/multer-error.js to map the INVALID_FIELD_NAME code to a descriptive string value.\n\njavascript\n// Patched implementation in lib/multer-error.js\nLIMIT_FIELD_ARRAY_INDEX: 'Field name array index too large',\nSTREAM_DESTROYED: 'File stream was destroyed',\nINVALID_FIELD_NAME: 'Invalid field name'\n\n\nThis structural modification is robust as it converts engine-level runtime crashes into recoverable middleware validation errors.
Exploitation requires sending a single, malformed multipart/form-data POST request containing two specifically structured fields. The first field allocates a sparse array at the boundary index of $2^{32} - 2$, which forces the internal JavaScript array length to $2^{32} - 1$. The second field uses empty bracket syntax ([]) to append a new element to the same array name.\n\nmermaid\ngraph LR\n A["Attacker Payload"] --> B["First Part: items[4294967294]='x'"]\n B --> C["Second Part: items[]='y'"]\n C --> D["V8 Engine Array Resize"]\n D --> E["Uncaught RangeError"]\n E --> F["Node.js Process Crash"]\n\n\nBecause sparse arrays do not allocate contiguous memory in V8, the initial allocation does not trigger an out-of-memory error. This ensures the attack remains extremely low-overhead, executing rapidly and consuming negligible network bandwidth. No authentication is necessary to reach the parsing logic if the target endpoint accepts public file uploads or form submissions.
The vulnerability has a CVSS v3.1 base score of 7.5, reflecting a high-severity availability impact. An unauthenticated attacker can consistently terminate the target server process, resulting in persistent denial of service.\n\nIf the application is not configured with automatic process managers like PM2 or orchestrators like Kubernetes, manual administrator intervention is required to restart the service. Even with process auto-restart configurations, continuous exploitation can keep the server in a perpetual crash loop, consuming system resources and preventing legitimate traffic from being served.
The primary solution is to upgrade multer to version 2.3.0 or later, which wraps appendField logic in an appropriate error handling wrapper. For deployments unable to patch immediately, Web Application Firewalls (WAFs) should be configured to drop requests with field names containing excessively large array indices.\n\nAdditionally, ensure that the Node.js application is executed within a robust runtime supervisor such as systemd or container orchestration environments to guarantee automatic service recovery.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
multer ExpressJS Project | < 2.3.0 | 2.3.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-248 (Uncaught Exception) |
| Attack Vector | Network (AV:N) |
| CVSS Severity | 7.5 (High) |
| EPSS Score | 0.00291 (Percentile: 21.34%) |
| Impact Type | Denial of Service (DoS) via Process Termination |
| Exploit Status | Proof of Concept (PoC) Available |
| CISA KEV Status | Not Listed |
The product does not handle or incorrectly handles an exceptional condition, leading to an uncaught exception that causes program termination.
A verification bypass vulnerability in virtualenv allows unverified Python wheel installation when using pip seeding with the download flag. Affected versions fail to perform SHA-256 digest validation against PyPI metadata before invoking pip.
Insecure temporary file usage (CWE-377) in virtualenv app-data seeder creates dangling symlinks pointing to deleted temporary directories, allowing local attackers on shared systems to execute arbitrary code.
A Time-of-Check Time-of-Use (TOCTOU) race condition in the Python `filelock` library (versions 4.1.0 to 4.2.0) allows local unprivileged attackers to cause arbitrary directory deletion by swapping file system targets during lock cleanup or dead owner sweeps.
A local race condition and mutual exclusion bypass vulnerability exists in filelock versions 4.1.0 through 4.2.0. On Linux filesystems with rapid inode reuse, a local attacker can manipulate modification timestamps and lock files to cause waiting processes to falsely evict active soft lock markers.
vLLM prior to version 0.31.0 contains an uncontrolled resource consumption vulnerability (CWE-400) in its HTTP API request handling logic. Unauthenticated remote attackers can transmit per-request keyword arguments (`mm_processor_kwargs` and `media_io_kwargs`) that are passed directly into internal multimodal preprocessing pipelines, causing CPU/GPU memory exhaustion and crashing the engine process.
An insufficient verification of data authenticity vulnerability in SiYuan prior to version 3.7.4 allows an attacker to overwrite arbitrary installed marketplace packages (plugins, widgets, themes, and templates). By providing a mismatched package name and package archive repository URL during a Bazaar installation request, arbitrary file write into trusted plugin directories can be achieved, enabling persistence and execution across application restarts.