字号·· | 护眼
漏洞档案 · 严重

NGINX ngx_http_rewrite_module 堆缓冲区溢出(CVE-2026-42945):未认证远程可利用,可致 worker 重启并可能执行代码

CVE-2026-42945 别名:GHSA-GCGV-V5GF-C543
CVSS 9.2 / 4.0 EPSS 3.4% CISA KEV 在野利用 公开 PoC · 25
综合风险69/ 100
CVSS9.2严重
EPSS3.4%30 天利用概率
机构收录时间2026-05-13更新 2026-11-27

研判简报

NGINX ngx_http_rewrite_module 堆缓冲区溢出(CVE-2026-42945):未认证远程可利用,可致 worker 重启并可能执行代码

概述

NGINX Plus 与 NGINX Open Source 的 ngx_http_rewrite_module 模块存在漏洞:当 rewrite 指令后接 rewrite、if 或 set 指令,且使用未命名 PCRE 捕获(如 $1、$2)并配合含问号(?)的替换字符串时,构造的 HTTP 请求可触发 worker 进程堆缓冲区溢出。未认证攻击者可在满足特定配置条件时远程利用,导致 worker 进程重启;在 ASLR 关闭或可绕过 ASLR 的系统上还可能执行代码。使用受影响版本且配置了上述 rewrite 模式的组织应立即关注。

严重性

CVSS 9.2(4.0),综合风险分 82.67/100,评级 critical;EPSS 30 天利用概率 69.4%(百分位 99.4%,日期 2026-11-24)。攻击面为暴露在网络的 HTTP 入口,无需认证。

利用状态

截至核查日期 2026-11-25:CISA KEV 已收录(收录日期 2026-05-16);Exploit-DB/公开 PoC 记录 25 条,参考链接中含多个 GitHub PoC 仓库(如 DepthFirstDisclosures/Nginx-Rift、p3Nt3st3r-sTAr/CVE-2026-42945-POC、cipherspy/CVE-2026-42945-POC)。CISA SSVC:automatable=no、exploitation=none、technical_impact=total。勒索关联状态材料未给出;Nuclei 模板状态材料未给出。

受影响产品

F5 NGINX Plus >=R36 =R32 =0.6.27 <1.30.1。另列 Red Hat 3scale API Management Platform 2 与 Red Hat Lightspeed proxy 1。组件为 ngx_http_rewrite_module;部署形态涵盖反向代理、负载均衡等 HTTP 前端场景。已达 EoTS 的版本不在评估范围内。

修复版本

官方修复版本:NGINX Plus R36 P4、NGINX Plus R32 P6、NGINX Open Source 1.30.1。Red Hat 相关产品的修复版本材料未给出。

缓解措施

无法立即升级时,按厂商说明应用缓解措施或停用受影响产品(KEV 要求动作,期限材料未给出)。可评估调整 rewrite 配置以规避触发条件(未命名捕获配合含问号替换串),但材料未给出具体配置级缓解方案;WAF 规则有效性材料未给出。

响应步骤

  1. 盘点 NGINX Plus / Open Source 及 Red Hat 相关产品版本,对照受影响区间确认暴露面。
  2. 检查 rewrite 配置中是否存在 rewrite/if/set 后接未命名 PCRE 捕获且替换串含问号的情形。
  3. 升级至 NGINX Plus R36 P4、R32 P6 或 Open Source 1.30.1;Red Hat 产品待厂商指引。
  4. 无法升级的实例按厂商缓解说明处置,并评估下线或隔离暴露的 HTTP 入口。
  5. 监控 worker 异常重启与可疑 crafted HTTP 请求,结合公开 PoC 特征排查利用迹象。
  6. 持续跟踪 KEV 与 EPSS 更新,复核处置优先级。

参考来源

  1. https://www.linkedin.com/posts/patrickmgarrity_cybersecurity-threatintelligence-riskmanagement-share-7461369931851517952-PBjV/kev
  2. https://hunt.io/blog/open-directory-nginx-rift-ghost-cms-multi-cvekev
  3. https://vulncheck.com/xdb/fd01b4cbce66exploit,vulncheck_xdb
  4. https://github.com/DepthFirstDisclosures/Nginx-Riftpoc,github
  5. https://vulncheck.com/xdb/dea2ff4d4596exploit,vulncheck_xdb
  6. https://github.com/p3Nt3st3r-sTAr/CVE-2026-42945-POCpoc,github
  7. https://vulncheck.com/xdb/2a7403b15e6aexploit,vulncheck_xdb
  8. https://github.com/cipherspy/CVE-2026-42945-POCpoc,github
  9. https://vulncheck.com/xdb/e4056965e496exploit,vulncheck_xdb
  10. https://github.com/nanwinata/nginxrift-CVE-2026-42945poc,github
  11. https://vulncheck.com/xdb/9ffb77160a11exploit,vulncheck_xdb
  12. https://github.com/rheodev/CVE-2026-42945poc,github
  13. https://vulncheck.com/xdb/3fad2a378082exploit,vulncheck_xdb
  14. https://github.com/0xBlackash/CVE-2026-42945poc,github
  15. https://vulncheck.com/xdb/0aff7ca5d5f0exploit,vulncheck_xdb
  16. https://github.com/ChamsBouzaiene/ai-vuln-rediscovery-nginx-cve-2026-42945poc,github