# CVE-2026-5038: Multer Denial of Service via incomplete cleanup in diskStorage

Source: https://junglewise.ai/threats/cve-2026-5038-multer-denial-of-service-via-incomplete-cleanup-in-diskstorage  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-15. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-5038 · Severity: medium · CVSS 5.3 · Published 2026-06-15

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.

Technologies: [multer (npm)](https://junglewise.ai/threats/technologies/npm-multer). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-5038 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-5038 being exploited in the wild.

**How severe is CVE-2026-5038?** Medium severity, with a CVSS score of 5.3, published 15 June 2026.

**Which products and versions are affected?** multer (npm) SEMVER:introduced=2.0.0-alpha.1,fixed=2.2.0.

**Is there a fix for CVE-2026-5038?** Yes. multer (npm): upgrade to 2.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-5038 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-5038?** Check whether you run multer (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- multer (npm): upgrade to 2.2.0 or later

  ```sh
  npm install multer@2.2.0
  ```


## 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

## Identifiers

- CVE-2026-5038
- GHSA-3p4h-7m6x-2hcm

## 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

## References

- [https://github.com/expressjs/multer/security/advisories/GHSA-3p4h-7m6x-2hcm](https://github.com/expressjs/multer/security/advisories/GHSA-3p4h-7m6x-2hcm)
- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/expressjs/multer](https://github.com/expressjs/multer)

## Related threats

- [multer denial of service in asynchronous fileFilter after request teardown](https://junglewise.ai/threats/cve-2026-113872-multer-is-a-middleware-for-node-js-that-handles-multipart-form)
- [Express multer Denial of Service via orphaned disk writes](https://junglewise.ai/threats/cve-2026-88932-express-multer-denial-of-service-via-orphaned-disk-writes)
- [multer denial of service via oversized array index](https://junglewise.ai/threats/cve-2026-82333-multer-denial-of-service-via-oversized-array-index-in-field-names)
- [multer Denial of Service via crafted multipart field names](https://junglewise.ai/threats/cve-2026-77078-multer-denial-of-service-via-crafted-multipart-field-names)
- [multer file size limit bypass via async fileFilter race condition](https://junglewise.ai/threats/cve-2026-77063-multer-file-size-limit-bypass-via-async-filefilter-race-condition)
