Executive brief
Multer is a popular Node.js middleware for handling file uploads in web applications. A vulnerability allows attackers to trigger a denial of service by aborting or sending malformed upload requests, causing orphaned temporary files to accumulate on disk and exhaust storage space, potentially disrupting application availability.
Technical details
The vulnerability is an incomplete cleanup issue (CWE-459) in Multer's diskStorage implementation. When file uploads are aborted or malformed multipart requests are sent, partial uploaded files are not properly cleaned up, leading to orphaned files accumulating on disk. This attack requires no authentication and can be triggered remotely by sending incomplete or interrupted multipart/form-data requests. An attacker can repeatedly trigger aborted uploads to exhaust available disk space, causing the application to fail or deny service to legitimate users. The vulnerability affects versions 2.0.0-alpha.1 through 2.1.x and 3.0.0-alpha.1 through 3.0.0-alpha.1, and is fixed in versions 2.2.0 and 3.0.0-alpha.2.
Affected products
- expressjs multer >=2.0.0-alpha.1, <2.2.0; >=3.0.0-alpha.1, <3.0.0-alpha.2
Timeline
- 2026-06-15: disclosed: CVE-2026-5038 published by NVD
- 2026-06-17: disclosed: GHSA-3p4h-7m6x-2hcm published by GitHub
- 2026-06-17: patched: Fix available in versions 2.2.0 and 3.0.0-alpha.2