CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-77037

CVE-2026-77037: File Descriptor Leak and Denial of Service in Multer Disk Storage

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 9, 2026·5 min read·73 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can exhaust server file descriptors by repeatedly initiating and aborting multipart file uploads in multer v2.2.0, causing a complete denial of service.

A resource consumption vulnerability exists in the multer library version 2.2.0 when utilizing the disk storage engine. When a remote client aborts or truncates an in-progress file upload, multer removes the partial file from the disk but fails to properly close the active write stream. This behavior leaves the underlying file descriptor open in the operating system, allowing a remote attacker to systematically exhaust the server's file descriptor limits and trigger a Denial of Service.

Vulnerability Overview

The library multer is an extremely common Node.js middleware designed to handle multipart/form-data uploads. When dealing with file uploads, applications rely on storage engines to persist the incoming data stream to either memory or disk. The default disk storage engine (diskStorage) writes incoming files directly to the host filesystem as they are parsed from the network socket.

This architecture creates a direct channel between untrusted network inputs and host filesystem operations. Because parsing occurs asynchronously, the middleware must handle unexpected interruptions gracefully. If a client terminates the network connection during an upload, the application must immediately release all associated OS resources, including memory allocations and open file handles.

In version 2.2.0, the cleanup logic fails to manage the lifecycle of the write streams properly. This results in an incomplete cleanup flaw classified under CWE-459. By repeatedly interrupting the upload process, an unauthenticated attacker can exhaust the host's file descriptor table, resulting in a persistent Denial of Service.

Technical Root Cause Analysis

The underlying flaw stems from the way Node.js handles stream piping. In multer version 2.2.0, the multipart parser streams the incoming request body directly into a write stream using the standard .pipe() method:

file.stream.pipe(outStream);

In standard Node.js stream architecture, piping transfers data from a readable source to a writable destination. However, if the source stream emits an error, is destroyed, or is abruptly truncated due to a disconnected client, the .pipe() method does not automatically propagate the closure or destruction to the destination write stream. The destination stream remains in an open state, holding its assigned file descriptor.

When a network socket disconnects prematurely, multer registers the failure and attempts to clean up by invoking fs.unlink() on the partial file path. On POSIX-compliant systems like Linux, the fs.unlink() system call removes the directory entry for the file, which makes it disappear from standard listings. However, because the process still holds an open file descriptor pointing to the deleted file, the operating system retains the physical block pointers and keeps the file descriptor active in /proc/self/fd. On Windows, the OS blocks the deletion entirely, throwing EPERM or EBUSY because the file has an active stream lock.

Code-Level Patch Analysis

To resolve the vulnerability, the development team updated the codebase in commit eef74440b491ef0f976f3d25895e8089ae495df0. The key change replaces the manual .pipe() operation with Node.js's native stream.pipeline utility, which manages the entire lifecycle of piped streams.

// Vulnerable Implementation (storage/disk.js)
file.stream.pipe(outStream)
outStream.on('error', cb)
outStream.on('finish', function () {
  cb(null, { ... })
})
// Patched Implementation (storage/disk.js)
pipeline(file.stream, outStream, function (err) {
  if (err) return cb(err)
 
  cb(null, {
    destination: destination,
    filename: filename,
    path: finalPath,
    size: outStream.bytesWritten
  })
})

The stream.pipeline implementation ensures that if either the incoming request stream or the write stream encounters an error or aborts, the utility automatically invokes .destroy() on both streams, closing the file descriptor immediately. The patch also introduces a global WeakMap named openStreams to link file objects to their active write streams, allowing safe deletion only after the stream is fully closed and the descriptor released.

Exploitation Methodology

Exploiting this vulnerability does not require complex payloads or bypassed authentication mechanisms. An attacker only needs network access to an endpoint that uses the multer disk storage engine. The attack vector targets resource consumption limit constraints in the operating system, such as ulimit -n (the limit of open files permitted per process).

An attacker begins the attack by establishing a TCP connection and sending a standard HTTP POST request with Content-Type: multipart/form-data. As the server begins processing the upload and initializes a write stream, the attacker waits a fraction of a second and then sends a TCP RST (Reset) packet or forcefully destroys the client socket. This causes the underlying socket stream to emit an error, terminating the request mid-stream.

Because the destination write stream is never closed by the vulnerable multer code, one file descriptor remains leaked. By scripting a simple concurrent loop to repeat this cycle several hundred times, the attacker can quickly reach the host operating system's default file descriptor limits (typically 1024 on standard Linux distributions). Once exhausted, the Node.js process cannot accept new TCP sockets or perform critical network and filesystem calls, resulting in a persistent Denial of Service.

Remediation and Mitigation Strategies

The primary remediation for this vulnerability is upgrading the application's dependencies to ensure multer version 2.3.0 or later is installed. The package manager command npm install multer@latest will retrieve the patched version, replacing the vulnerable stream handling structure.

If upgrading the library is not immediately possible due to production freeze rules, developers can implement temporary workarounds. One effective method is configuring a reverse proxy such as Nginx or HAProxy in front of the Node.js application. The proxy can enforce strict request timeout policies, buffer request bodies fully before passing them to Node.js, or limit the maximum rate of concurrent connections from single source IPs.

Alternatively, applications can transition from disk storage to memory storage by configuring multer.memoryStorage(). While this prevents the file descriptor leak, developers must exercise caution as memory-backed storage is susceptible to heap memory exhaustion when processing large file uploads. Process monitoring solutions like pm2 or Kubernetes liveness probes can also be configured to automatically restart the container or process if file descriptor consumption surpasses safety limits.

Official Patches

expressjsOfficial patch implementing pipeline safety fixes

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.35%
Top 72% most exploited

Affected Systems

Node.js applications running multer 2.2.0 configured with diskStorage

Affected Versions Detail

Product
Affected Versions
Fixed Version
multer
expressjs
= 2.2.02.3.0
AttributeDetail
CWE IDCWE-400 (Uncontrolled Resource Consumption) / CWE-459 (Incomplete Cleanup)
Attack VectorNetwork / Unauthenticated
CVSS v3.17.5 (High)
EPSS Score0.00347 (Percentile: 27.68%)
ImpactDenial of Service (DoS) via File Descriptor Exhaustion
Exploit StatusProof of Concept (PoC) available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-400
Uncontrolled Resource Consumption

The software does not control the allocation and maintenance of a limited resource, enabling an actor to exhaust that resource.

Known Exploits & Detection

GitHub Test SuiteIntegration test validating file descriptor count in /proc/self/fd during repeated aborted uploads.

References & Sources

  • [1]GitHub Security Advisory GHSA-qfvm-cv95-jqjf
  • [2]OpenJS Foundation Security Portal
  • [3]Multer Version 2.3.0 Release Notes
  • [4]CVE-2026-77037 Record
  • [5]NVD Registry Details

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

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.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 2 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

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.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

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.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 4 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

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.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 5 hours ago•CVE-2026-128077
6.5

CVE-2026-128077: Authorization Bypass via Request Path Desynchronization in Nuxt and @nuxt/nitro-server

CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 6 hours ago•CVE-2026-128084
4.8

CVE-2026-128084: Integer Truncation and SQL Query Truncation in sqlite3-ruby

Prior to version 2.10.2, the sqlite3-ruby gem explicitly cast 64-bit Ruby string lengths (long) to 32-bit signed integers (int) when invoking the underlying SQLite C API. On 64-bit platforms, providing a string of 4 GiB (2^32 bytes) or larger causes integer truncation, instructing SQLite to process only a prefix of the string. This flaw affects SQL query preparation, bound parameter values, and return values from custom Ruby-defined SQL functions and aggregates, allowing trailing SQL clauses such as WHERE restrictions to be silently dropped under specific conditions.

Alon Barad
Alon Barad
5 views•11 min read