安全更新
Caution
Node.js 漏洞会直接影响 Express。 Therefore, keep a watch on Node.js vulnerabilities and make sure you are using the latest stable version of Node.js.
下方清单列举了在对应版本更新中已修复的 Express 漏洞。
Note
If you believe you have discovered a security vulnerability in Express, please see Security Policies and Procedures.
4.x
- 4.21.2
- 依赖包
path-to-regexp已完成升级,用于修复一处安全漏洞。
- 依赖包
- 4.21.1
- 依赖包
cookie已升级以修复一处漏洞,若项目使用res.cookie,你的应用可能受此漏洞影响。
- 依赖包
- 4.20.0
- 4.19.0, 4.19.1
- Fixed open redirect vulnerability in
res.locationandres.redirect(advisory, CVE-2024-29041).
- Fixed open redirect vulnerability in
- 4.17.3
- 依赖
qs已更新以修复一处安全漏洞。 若使用了下述 API:req.query、req.body、req.param,该问题可能对你的应用造成影响。
- 依赖
- 4.16.0
- The dependency
forwardedhas been updated to address a vulnerability. 如果使用了下列API,这可能会影响您的应用程序:req.host,req.hostname,req.ip,req.ips,req.protocol。 - The dependency
mimehas been updated to address a vulnerability, but this issue does not impact Express. - 依赖
send已完成更新,用于防范Node.js 8.5.0相关漏洞。 该问题仅会在 Node.js 8.5.0 特定版本中运行 Express 时产生影响。
- The dependency
- 4.15.5
- The dependency
debughas been updated to address a vulnerability, but this issue does not impact Express. - The dependency
freshhas been updated to address a vulnerability. 若你的应用使用了以下 API,则会受到影响:express.static、req.fresh、res.json、res.jsonp、res.send、res.sendfile、res.sendFile、res.sendStatus。
- The dependency
- 4.15.3
- The dependency
mshas been updated to address a vulnerability. 如果将不可信的字符串输入传递给以下 API 中的maxAge选项,你的应用可能会受到影响:express.static、res.sendfile和res.sendFile。
- The dependency
- 4.15.2
- The dependency
qshas been updated to address a vulnerability, but this issue does not impact Express. 更新至 4.15.2 是良好实践,但修复该漏洞并非必须执行此操作。
- The dependency
- 4.11.1
- 修复了
express.static、res.sendfile和res.sendFile中的根路径泄露漏洞。
- 修复了
- 4.10.7
- Fixed open redirect vulnerability in
express.static(advisory, CVE-2015-1164).
- Fixed open redirect vulnerability in
- 4.8.8
- Fixed directory traversal vulnerabilities in
express.static(advisory , CVE-2014-6394).
- Fixed directory traversal vulnerabilities in
- 4.8.4
- Node.js 0.10 在特定情况下可能会发生文件描述符(
fd)泄漏,从而影响express.static和res.sendfile。 恶意请求可能导致文件描述符(fd)泄漏,最终引发EMFILE错误并造成服务器无响应。
- Node.js 0.10 在特定情况下可能会发生文件描述符(
- 4.8.0
- 查询字符串中包含极高索引的稀疏数组,可能导致进程内存耗尽并使服务器崩溃。
- 深度嵌套的查询字符串对象会导致进程阻塞,使服务器暂时无法响应。
3.x
Express 3.x 已终止生命周期,不再提供维护支持
3.x 版本自2015年8月1日最后一次更新后,已知及潜在的安全、性能漏洞均不再修复。 强烈建议使用最新版本的 Express。
If you are unable to upgrade past 3.x, please consider Commercial Support Options.
- 3.19.1
- 修复了
express.static、res.sendfile和res.sendFile中的根路径泄露漏洞。
- 修复了
- 3.19.0
- Fixed open redirect vulnerability in
express.static(advisory, CVE-2015-1164).
- Fixed open redirect vulnerability in
- 3.16.10
- 在
expres.static中固定的目录遍历脆弱性。
- 在
- 3.16.6
- Node.js 0.10 在特定情况下可能会发生文件描述符(
fd)泄漏,从而影响express.static和res.sendfile。 恶意请求可能导致文件描述符(fd)泄漏,最终引发EMFILE错误并造成服务器无响应。
- Node.js 0.10 在特定情况下可能会发生文件描述符(
- 3.16.0
- 查询字符串中包含极高索引的稀疏数组,会导致进程内存耗尽并使服务器崩溃。
- 深度嵌套的查询字符串对象会导致进程阻塞,使服务器暂时无法响应。
- 3.3.0
- 尝试使用不支持的方法重写时返回的 404 响应,曾存在跨站脚本攻击漏洞。