Sep 9, 2026·4 min read·37 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.
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.
CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.