ThinkFacility Sign in
  1. Home
  2. Security
  3. npm package (multer)
Highnpm package (multer)

multer 2.x before 2.5.0: one upload request can crash your Express app

Anyone running a Node.js or Express app that takes file uploads through multer with an async fileFilter.

How to fix it

You haveUpdate to
2.0.0 and later, before 2.5.0→2.5.0

Check your version

Which version your project has
npm ls multer

Update

In your project
npm update multer
npm ls multer
Still old? A dependency pins it
npm explain multer
Then check what's left
npm audit

If you can't update yet

Switch your fileFilter to a synchronous one until you can update.

Only apps that give multer an asynchronous fileFilter are hit, whatever storage engine they use. One upload request from someone who isn't logged in is enough to stop the whole Node.js process.

If npm ls still shows an old version under another package, update that package, or add an "overrides" entry for this one in package.json.

Sources