Uncaught ExceptionAffected versions of this package are vulnerable to Uncaught Exception via a late busboy error event emitted after teardown in lib/make-middleware.js. When an asynchronous fileFilter is in use, a single request can trigger an unhandled error event on the busboy instance after the request has already finished and all listeners have been removed, crashing the Node.js process.
Note: This is only exploitable when multer is configured with an asynchronous fileFilter.
How to fix Uncaught Exception? Upgrade org.mvnpm:multer to version 2.5.0 or higher.
| |
Denial of Service (DoS)Affected versions of this package are vulnerable to Denial of Service (DoS) via incomplete cleanup of uploaded files when a request is aborted before the storage engine assigns a file path. When an upload is aborted mid-flight, the finishAbort function in make-middleware.js snapshots only the files that already have a path at the moment of abort; any file whose storage engine completes naming and writing after that snapshot is never added to the removal list and is never deleted, leaving orphaned files on disk (or in the configured storage backend). An attacker can repeatedly send and abort multipart upload requests to accumulate unbounded orphaned files, exhausting available disk space.
How to fix Denial of Service (DoS)? Upgrade org.mvnpm:multer to version 2.4.0 or higher.
| |
Denial of Service (DoS)Affected versions of this package are vulnerable to Denial of Service (DoS) via the appendField call in make-middleware.js when processing multipart form field names. An attacker can send a request containing an invalid field name that causes appendField to throw an uncaught exception, crashing the Node.js process. The fix wraps the call in a try/catch and rejects the request with an INVALID_FIELD_NAME error instead of propagating the exception.
How to fix Denial of Service (DoS)? Upgrade org.mvnpm:multer to version 2.3.0 or higher.
| |
Race ConditionAffected versions of this package are vulnerable to Race Condition in the fileFilter parameter. An attacker can upload files exceeding the intended size limit by exploiting a race condition when asynchronous filtering is used together with file size restrictions.
How to fix Race Condition? Upgrade org.mvnpm:multer to version 2.3.0 or higher.
| |
Denial of Service (DoS)Affected versions of this package are vulnerable to Denial of Service (DoS) via the diskStorage engine's _handleFile function, which fails to close or destroy the destination write stream when an upload is aborted before it completes. Each aborted request leaks an open file descriptor and retains its disk blocks until the process exits, allowing an attacker to exhaust the process's available file descriptors by repeatedly initiating and aborting multipart file uploads, causing a denial of service.
Note: This is only exploitable when diskStorage is used as the multer storage engine.
How to fix Denial of Service (DoS)? Upgrade org.mvnpm:multer to version 2.3.0 or higher.
| |
Uncaught ExceptionAffected versions of this package are vulnerable to Uncaught Exception via the appendField call in make-middleware.js when processing multipart form field names. An attacker submitting a malformed or invalid field name in a multipart upload request causes an unhandled exception that crashes the process. The fix wraps the appendField call in a try/catch and aborts with an INVALID_FIELD_NAME error code instead of propagating the exception.
How to fix Uncaught Exception? Upgrade org.mvnpm:multer to version 2.3.0 or higher.
| |