Multer, a popular Node.js middleware for handling multipart/form-data, offers a convenient solution for processing file uploads. Examining versions 1.3.0 and its predecessor, 1.2.1, reveals subtle yet potentially impactful differences for developers. The core functionality remains consistent between the two versions; both are designed to parse incoming request data containing files, making the uploaded files accessible to your application. The dependency list is identical, with key packages like busboy for parsing the data stream, mkdirp for creating directories, and type-is for content-type validation remaining unchanged. Similarly, the development dependencies for testing and linting remain consistent, including mocha, express, and standard.
The primary distinction lies in the release date. Version 1.3.0 was released on January 25, 2017, while version 1.2.1 came out on December 14, 2016. This suggests that 1.3.0 likely incorporates bug fixes, performance improvements, or minor feature enhancements accumulated during that intervening period. While the absence of explicit changelogs makes pinpointing specific changes difficult, upgrading to 1.3.0 is generally advisable to benefit from these accumulated improvements, ensuring greater stability and reliability in your file upload handling. Developers should always check the project's GitHub repository for a more detailed changelog or commit history to understand the precise nature of the updates.
All the vulnerabilities related to the version 1.3.0 of the package
Multer vulnerable to Denial of Service via memory leaks from unclosed streams
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.
Users should upgrade to 2.0.0
None
Crash in HeaderParser in dicer
This affects all versions of the package dicer
. A malicious attacker can send a modified form to the server and crash the Node.js service. A complete denial of service can be achieved by sending the malicious form in a loop.