🌐 Nodejs.cn
security

2025年5月安全更新

Ulises GascónMay 19, 2025

Express 团队发布了 Multer 的新主要版本,修复了两个高严重性的安全漏洞。此更新提高了在 Express 应用中处理文件上传的可靠性和安全性。

🌐 The Express team has released a new major version of Multer addressing two high-severity security vulnerabilities. This update improves the reliability and security of handling file uploads in Express applications.

Warning

我们强烈建议你尽快升级到 Multer v2.0.0 或更高版本。

以下漏洞已被修复:

🌐 The following vulnerabilities have been addressed:

Multer 中间件中的高严重性漏洞 CVE-2025-47935

🌐 High severity vulnerability CVE-2025-47935 in Multer middleware

Multer 版本 <2.0.0 易受拒绝服务攻击,因为不当的流处理导致内存泄漏。

当 HTTP 请求流发出错误时,内部 busboy 流不会关闭,这违反了 Node.js 流安全指南。

🌐 When the HTTP request stream emits an error, the internal busboy stream is not closed, violating Node.js stream safety guidance.

这会导致未关闭的流随时间积累,消耗内存和文件描述符。在持续或重复的故障情况下,这可能导致服务拒绝,需要手动重启服务器才能恢复。所有使用 Multer 处理文件上传的用户都可能受到影响。

🌐 This leads to unclosed streams accumulating over time, consuming memory and file descriptors. Under sustained or repeated failure conditions, this can result in denial of service, requiring manual server restarts to recover. All users of Multer handling file uploads are potentially impacted.

受影响版本: <2.0.0 修补版本: >=2.0.0

有关更多详情,请参见 GHSA-44fp-w29j-9vj5

🌐 For more details, see GHSA-44fp-w29j-9vj5.

Multer 中间件中的高严重性漏洞 CVE-2025-47944

🌐 High severity vulnerability CVE-2025-47944 in Multer middleware

Multer 版本 >=1.4.4-lts.1<2.0.0 易受到通过格式错误的多部分请求造成的拒绝服务攻击。

一个特别构造的请求可能会导致 Multer 内部出现未处理的异常,从而使服务器进程崩溃。

🌐 A specially crafted request can cause an unhandled exception inside Multer, resulting in a crash of the server process.

受影响的版本>=1.4.4-lts.1<2.0.0 已修补的版本>=2.0.0

有关更多详情,请参见 GHSA-4pg4-qvpc-4q3h

🌐 For more details, see GHSA-4pg4-qvpc-4q3h.


Multer v2.0.0 也引入了一个重大更改:

  • 现在支持的最低 Node.js 版本是 10.16.0

我们建议立即升级到最新版本的 Multer,以确保你的应用安全。

🌐 We recommend upgrading to the latest version of Multer immediately to secure your applications.

有兴趣写一篇文章吗?查看我们的指南以开始吧。

阅读指南