multer 非同期 fileFilter の処理でサービス停止のおそれ
Summary
Node.js 向けのファイルアップロード用ミドルウェア multer の 2.0.0 以降 2.5.0 未満で、非同期の fileFilter を使う場合に、1 件のリクエストでプロセスがクラッシュするおそれがあります。リクエストが途中で中断されると未処理のエラーイベントが発生し、サービスが停止します。修正版の 2.5.0 以降へ更新してください。回避策として同期の fileFilter を使う方法があります。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Node.js 向けのファイルアップロード用ミドルウェア multer の 2.0.0 以降 2.5.0 未満で、非同期の fileFilter を使う場合に、1 件のリクエストでプロセスがクラッシュするおそれがあります。リクエストが途中で中断されると未処理のエラーイベントが発生し、サービスが停止します。修正版の 2.5.0 以降へ更新してください。回避策として同期の fileFilter を使う方法があります。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| multermulter |
≥ 2.0.0, < 2.5.0→ 2.5.0 |
2.5.0 |
| npmmulter |
≥ 2.0.0, < 2.5.0→ 2.5.0 |
2.5.0 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-113872 node-multer Fix available
- Ubuntu UBUNTU-CVE-2026-113872 node-multer No fixed version in this record
Original description The description as published by the source.
multer is a middleware for Node.js that handles multipart/form-data file uploads. In versions from 2.0.0 before 2.5.0, when multer is configured with an asynchronous fileFilter, a single request can crash the Node.js process. If the request is aborted while one file's asynchronous fileFilter is still pending, the pending callback later resumes a parsing stream that multer has already torn down, and the underlying parser emits an error on a stream that no longer has an error listener, which Node raises as an unhandled error event so the process exits. Any application using multer with an asynchronous fileFilter is affected regardless of storage engine, while uploads using a synchronous fileFilter are not affected. The issue is fixed in multer 2.5.0, and users should upgrade to 2.5.0 or later. As a workaround, use a synchronous fileFilter.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory cna.openjsf.org
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- REDHAT Red Hat
- web github.com
- web github.com
- web github.com