Multer vulnerable to Denial of Service via memory leaks from unclosed streams
Affected releases · multer
- 1.x and older0.0.1 – 1.4.4No fix, no longer updated
1.x has no fix yet; the newest fixed line:
npm install multer@2.0.0Every release on a timeline
Not affected
2.0.0 – 2.5.0
9 releases, latest
Affected
1.0.0 – 1.4.4
17 releases
Affected
0.0.1 – 0.1.8
15 releases
What happens
Impact
Multer <2.0.0 is vulnerable to a resource exhaustion and memory leak issue due to improper stream handling. When the HTTP request stream emits an error, the internal busboy stream is not closed, violating Node.js stream safety guidance.
This leads to unclosed streams accumulating over time, consuming memory and file descriptors. Under sustained or repeated failure conditions, this can result in denial of service, requiring manual server restarts to recover. All users of Multer handling file uploads are potentially impacted.
Patches
Users should upgrade to 2.0.0
Workarounds
None
References