翻译此页面

安全更新

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
    • Fixed XSS vulnerability in res.redirect (advisory, CVE-2024-43796).
    • 依赖包 serve-static 已升级以修复一处安全漏洞
    • 依赖包 send 已升级以修复一处安全漏洞
    • 依赖包 path-to-regexp 已升级以修复一处安全漏洞
    • 依赖包 body-parser 已升级以修复一处安全漏洞,若你启用了 URL 编码,你的应用可能会受此影响。
  • 4.19.0, 4.19.1
  • 4.17.3
    • 依赖qs已更新以修复一处安全漏洞。 若使用了下述 API:req.queryreq.bodyreq.param,该问题可能对你的应用造成影响。
  • 4.16.0
    • The dependency forwarded has been updated to address a vulnerability. 如果使用了下列API,这可能会影响您的应用程序:req.host, req.hostname, req.ip, req.ips, req.protocol
    • The dependency mime has 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 时产生影响。
  • 4.15.5
    • The dependency debug has been updated to address a vulnerability, but this issue does not impact Express.
    • The dependency fresh has been updated to address a vulnerability. 若你的应用使用了以下 API,则会受到影响:express.staticreq.freshres.jsonres.jsonpres.sendres.sendfileres.sendFileres.sendStatus
  • 4.15.3
    • The dependency ms has been updated to address a vulnerability. 如果将不可信的字符串输入传递给以下 API 中的 maxAge 选项,你的应用可能会受到影响:express.staticres.sendfileres.sendFile
  • 4.15.2
    • The dependency qs has been updated to address a vulnerability, but this issue does not impact Express. 更新至 4.15.2 是良好实践,但修复该漏洞并非必须执行此操作。
  • 4.11.1
    • 修复了 express.staticres.sendfileres.sendFile 中的根路径泄露漏洞。
  • 4.10.7
  • 4.8.8
  • 4.8.4
    • Node.js 0.10 在特定情况下可能会发生文件描述符(fd)泄漏,从而影响 express.staticres.sendfile。 恶意请求可能导致文件描述符(fd)泄漏,最终引发EMFILE错误并造成服务器无响应。
  • 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.staticres.sendfileres.sendFile 中的根路径泄露漏洞。
  • 3.19.0
  • 3.16.10
    • expres.static 中固定的目录遍历脆弱性。
  • 3.16.6
    • Node.js 0.10 在特定情况下可能会发生文件描述符(fd)泄漏,从而影响 express.staticres.sendfile。 恶意请求可能导致文件描述符(fd)泄漏,最终引发EMFILE错误并造成服务器无响应。
  • 3.16.0
    • 查询字符串中包含极高索引的稀疏数组,会导致进程内存耗尽并使服务器崩溃。
    • 深度嵌套的查询字符串对象会导致进程阻塞,使服务器暂时无法响应。
  • 3.3.0
    • 尝试使用不支持的方法重写时返回的 404 响应,曾存在跨站脚本攻击漏洞。