NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-113872: multer vulnerable to Denial of Service via a pending asynchronous fileFilter after request teardown

highCVSS 3.1 7.5GHSA-q7qp-rjg7-q26m

multer 2.0.0 up to 2.5.0 can be crashed by a single unauthenticated upload request when the app uses an asynchronous `fileFilter`. A late busboy error after multer tears down the request becomes an unhandled `'error'` event and Node exits. Upgrade to multer 2.5.0, or switch to a synchronous `fileFilter`.

Published Oct 23, 2026 · Analysis Nov 1, 2026

What an attacker can do

multer is the Express middleware for multipart/form-data uploads. With an async fileFilter, the filter callback for one file can still be pending when the request is aborted, for example because another file in the same request was rejected. multer tears down the parsing stream and removes busboy's listeners. When the pending callback later fires, it resumes the stream that was already torn down. busboy then reports an error, for example a truncated form, on a stream with no error listener. Node raises that as an unhandled 'error' event and the process exits.

The attacker needs only the ability to send a multipart request to an upload route: no login, no valid file. They send two files, and arrange for the second to fail while the first filter is still waiting, which is easy when the filter does a database or network lookup. Each such request can take down the server until the supervisor restarts it. Synchronous filters are not affected, and neither storage engine choice nor file contents matter. The vector rates availability only.

Who is affected

Affected: multer >= 2.0.0, < 2.5.0, in apps whose fileFilter is asynchronous, meaning it waits on something before it calls its callback. Synchronous filters are not affected, and the storage engine is irrelevant.

npm ls multer

Then open the code that configures multer({ fileFilter }) and check whether the filter does async work before calling cb.

multer

Ecosystem
npm
Affected
>= 2.0.0, < 2.5.0
Fixed in
2.5.0
Check
npm ls multer

How to fix it

Upgrade to multer 2.5.0.

npm install [email protected]

The fix in lib/make-middleware.js adds a no-op error listener to busboy in the teardown step, after busboy.removeAllListeners(), so a late error cannot crash the process. A regression test, test/async-file-filter-teardown-crash.js, covers the held-callback case.

Workaround from the advisory: use a synchronous fileFilter. If you need an async check, do it after multer in your own handler.

How to tell if you were hit

Look for Node process crashes or restarts with an unhandled 'error' event from busboy in the stack trace, close to upload requests. The message may say the form was truncated or ended unexpectedly. In access logs, find multipart POSTs to the upload route just before each restart, especially several from one address. A rising container restart count on the upload service is a further sign.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

When multer is configured with an asynchronous fileFilter, a single request can crash the Node.js process. If a request is aborted (for example when one file is rejected) while another file's async fileFilter is still pending, the pending callback later resumes a parsing stream that multer has already torn down. busboy then emits an error on a stream that no longer has an error listener, which Node raises as an unhandled 'error' event, and the process exits. A single unauthenticated request is enough, so any application using multer with an asynchronous fileFilter is affected, regardless of storage engine. Uploads using a synchronous fileFilter are not affected.

Patches

Users should upgrade to multer 2.5.0 or later.

Workarounds

Use a synchronous fileFilter.

Credited to santihabib, UlisesGascon, bjohansebas.

Questions

Is my app affected if the fileFilter is synchronous?

No. The advisory says uploads that use a synchronous fileFilter are not affected. Only filters that finish asynchronously leave a callback pending after teardown.

Does the storage engine matter for CVE-2026-113872?

No. The advisory states any application with an asynchronous fileFilter is affected regardless of the storage engine.

Does the attacker need to be logged in?

Not unless your upload route itself requires it. The flaw adds no extra requirement, so whoever can reach the route can crash the process.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More npm vulnerabilities

All npm entries