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 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.
| |
Incomplete CleanupAffected versions of this package are vulnerable to Incomplete Cleanup in the diskStorage function. An attacker can exhaust disk space by repeatedly initiating and aborting multipart uploads, causing orphaned partial files to accumulate on disk.
How to fix Incomplete Cleanup? Upgrade org.mvnpm:multer to version 2.2.0 or higher.
| |
Uncontrolled RecursionAffected versions of this package are vulnerable to Uncontrolled Recursion via deeply nested field names in multipart form data. An attacker can exhaust CPU and memory resources by sending a single HTTP request with a crafted multipart body containing excessively nested field names.
How to fix Uncontrolled Recursion? Upgrade org.mvnpm:multer to version 2.2.0 or higher.
| |