nginx2root:五个 nginx 漏洞及源站防护

2026年11月18日,F5 和 nginx.org 披露了 nginx 中的十个漏洞。其中五个由 Xint 研究团队详细说明,并以 nginx2root 之名发布,属于内存损坏漏洞,未认证攻击者可利用它们使 nginx worker 崩溃,或者根据 Xint 的研究,在服务器上执行命令。Xint 还发现了一个 Linux 内核漏洞,可将该立足点变为宿主机上的 root,包括从 Docker 容器内部实现。其他团队独立发现了这两个 HTTP/2 漏洞:F5 还就 CVE-2026-123007 向 Rapid7、Wiz Research 和 Ikotas Labs 致谢,并就 CVE-2026-123633 向 Metnir、Wiz Research 和 Palo Alto Networks Unit 42 致谢。
nginx 是一个 HTTP Web 服务器,同时也用作反向代理、内容缓存、负载均衡器、TCP/UDP 代理服务器和邮件代理服务器。nginx 运行在全球很大一部分 Web 服务器上,因此这是需要立即修补的事件。不过,如果你的 nginx 服务器只能通过 Cloudflare 的代理访问,攻击者就无法触达这些漏洞中最严重问题所涉及的易受攻击代码路径,从而在你更新服务器期间为你提供保护。
以下是 Cloudflare 的现状、这层保护覆盖的范围、它的边界,以及这些漏洞如何运作。
nginx2root 包含五个相互独立的漏洞。每个都能单独生效,且每个都需要不同的配置。
受影响的配置
首个受影响的版本
CVE-2026-123007
整数溢出导致堆越界读/写
已启用 HTTP/2
1.9.5(2015)
CVE-2026-123633
释放后使用
HTTP/2 通过 proxy_pass 连接到后端,worker 的 worker_connections 不足
CVE-2026-121810
释放后使用
HTTP/3(QUIC)通过 proxy_pass 连接到后端
CVE-2026-123634
释放后使用
resolver + 带变量的 proxy_pass + 子请求(mirror 或 SSI)
CVE-2026-113425
释放后使用
邮件代理启用 proxy 和 auth_http
F5 将每个漏洞评为 High(CVSS 3.1:8.1)和 Critical(CVSS 4.0:9.2),并指出代码执行需要禁用或绕过 ASLR(地址空间布局随机化)。对于 CVE-2026-123007,Xint 的分析文章展示了它如何泄露内存地址来做到这一点。
CVE-2026-123007 是最需要担心的一个。它只需要开启 HTTP/2,而 HTTP/2 在 TLS 部署中通常会启用;自 HTTP/2 支持在 1.9.5 中发布以来,它一直存在于每一个 nginx 版本中。Xint 通过公共互联网,对 AWS、GCP 和 Azure 上的服务器运行了该漏洞利用程序。Xint 在披露前的 11 月 10 日搜索了 Shodan,发现 5670 万台匹配 product:nginx 的主机。在报告了版本的 1194 万台主机中,98.9% 位于受影响范围内。截至 11 月 19 日,Censys 的 nginx2root 暴露追踪器统计到约 880 万个启用了 HTTP/2 且运行可能受影响版本的服务。版本字符串不能证明主机存在漏洞,因为各发行版会向后移植修复,但暴露面很大。
同一批 nginx 版本还修复了另外五个漏洞。其中最严重的是 CVE-2026-118899,在通过 TLS 1.3 读取请求体时会出现无限循环,可让未认证的攻击者拖住一个 worker 进程,影响 nginx 1.13.0 及更高版本。
这个 Linux 内核漏洞是 nginx2root 的第六部分。Xint 在内核的 SCTP 发送路径中发现了一个释放后使用(use-after-free)漏洞,该漏洞自 Linux 4.15(2018 年)起就已存在:当一次发送操作处于等待状态时,其 SCTP 关联可能被移动到另一个 socket,而等待中的这次发送随后可能将其释放。已经能以 nginx worker 身份执行代码的攻击者,可利用它在宿主机上获取 root 权限,而 Xint 就是在运行于 Docker 容器内的 nginx 上做到这一点的。许多发行版会在程序首次打开 SCTP socket 时自动加载 SCTP 模块,因此从不使用 SCTP 的主机也可能暴露在风险之中。截至 11 月 18 日,尚无内核修复可用,Xint 在修复出现之前一直未公开细节。
截至 11 月 19 日,nginx2root 的五个 CVE 均未出现在 CISA 的已知被利用漏洞(Known Exploited Vulnerabilities)目录中,我们也没有看到在野利用的报告。Xint 和 Wiz Research 尚未公开其漏洞利用代码。Rapid7 发布了一个概念验证,并称其仅适用于对本地新启动的容器演示该攻击。GitHub 上还流传着一些伪造的“漏洞利用”代码。
nginx2root 中最危险的漏洞存在于 nginx 解析和管理 HTTP/2 与 HTTP/3 连接的方式中。要触发这些漏洞,攻击者必须直接向 nginx 进程发送顺序经过精心编排的协议帧流:数十亿个 WINDOW_UPDATE 帧、一个会压住响应数据的 SETTINGS 帧、填满发送缓冲区的 PING 帧、不完整的 HEADERS 帧,以及在恰到好处的时机发出的 RST_STREAM。
当你的 DNS 记录通过 Cloudflare 代理时,该连接终止于我们的边缘。
当你的 DNS 记录通过 Cloudflare 代理时,该连接终止于我们的边缘。Cloudflare 读取客户端的 HTTP 请求,应用你的安全和缓存规则,然后通过一条由 Cloudflare 控制的连接向你源站发起自己的请求。攻击者发送的流控帧、PING、SETTINGS 和流重置都会被我们的边缘处理,不会被转发。你的 nginx 只会看到 Cloudflare 选择发送的请求,并按 Cloudflare 的组帧方式封装。当 Cloudflare 通过 HTTP/2 连接你的源站时,这一点同样成立:Cloudflare 在该连接上运行自己的流控,并且仅在自身流量需要时发送 WINDOW_UPDATE 和 RST_STREAM 帧,因此客户端无法让它中继攻击所需的数十亿个 WINDOW_UPDATE 帧。
Rapid7 在针对 CVE-2026-123007 的分析中提出了同样的观点:如果 HTTP/2 连接被代理,攻击者的帧“很可能不会以允许利用的方式被重新传输”。这使 HTTP/2 和 HTTP/3 的每一种攻击都失效。
攻击者需要什么
在 Cloudflare 的 HTTP 代理背后
CVE-2026-123007
直接控制通往 nginx 的单条连接上的 HTTP/2 WINDOW_UPDATE、SETTINGS、PING 和 RST_STREAM
受保护。控制帧终止于 Cloudflare 的边缘。
CVE-2026-123633
在直连 HTTP/2 连接上发送 HEADERS 帧的第一部分,并且具备耗尽 nginx 连接槽位、重置 TCP 连接的能力
已防护。客户端的 HTTP/2 连接在 Cloudflare 处终止。
CVE-2026-121810
直接与 nginx 建立 QUIC/HTTP/3 连接
已防护。HTTP/3 在 Cloudflare 边缘终止。我们不会通过 HTTP/3 与源站通信
CVE-2026-123634
一个请求及其 mirror 或 SSI 子请求等待同一次 DNS 查询,而主请求在该应答被处理期间结束。在 Xint 的漏洞利用中,nginx 的解析器必须能够访问攻击者的 DNS 服务器。
未完全防护。这取决于你的配置如何构建 proxy_pass。请打补丁。
CVE-2026-113425
直接与 nginx 邮件代理建立 IMAP/POP3/SMTP 连接
不受保护。Cloudflare 的 HTTP 代理不承载邮件流量。
要通过 Cloudflare 获得防护,有一个前提条件:你的源站必须无法被直接访问。如果攻击者能找到你源站的 IP 并直接连接(HTTP/2 走 TCP 443 或 80,HTTP/3 走 UDP 443,或者邮件端口),那么 Cloudflare 就不在链路中,防护也就不适用。你应确保源站服务器只能通过 Cloudflare 的代理访问,可采用以下方式之一:
Xint 自己的暴露面检查也指出了同一点:“如果 nginx 前面有 CDN 或反向代理,测试只能到达代理层,因此还应直接针对 nginx 服务器运行测试。”
在以下几种情况下,Cloudflare 的 HTTP 代理无法提供防护。
Cloudflare 的 WAF 规则与这些漏洞无关。这些是协议层面的缺陷。由于 Cloudflare 的代理负责解析 HTTP 协议消息,并生成新的消息去向源站获取信息,因此位于 Cloudflare HTTP 代理之后的源站无需任何规则即可免受 HTTP/2 和 HTTP/3 缺陷的影响。所以我们没有发布托管规则。这种防护来自连接终止,而非模式匹配。
Cloudflare Radar 的 Zero Wire 中关于 nginx2root 的条目包含了完整清单、一段可交给智能体对你的设备群进行只读评估的提示词,以及各家厂商公告的链接。
让我们通过查看代码来深入了解这五个漏洞的细节。我们查看的是 nginx 1.31.8(commit 140aa94),这是修复前发布的最新代码,并将其与 1.31.9 中的修复进行对比(这些修复也包含在稳定分支的 1.30.7 版本中)。
关于方法论的说明:我们的分析基于公开公告,为了验证我们对代码的解读,我们使用 AddressSanitizer 构建了公开的 1.31.8 和 1.31.9 版本,并针对五个漏洞中的四个进行了测试(流控制、HTTP/2 释放后使用、解析器和邮件代理)。每个漏洞在 1.31.8 上都会触发故障,而在 1.31.9 上运行正常。我们没有复现 HTTP/3 漏洞;该部分基于修复提交和已发布的分析。
五个漏洞中有四个是释放后使用漏洞。这是手动管理内存且没有语言支持的程序中常见的问题:代码的一部分释放了另一部分仍在使用的一个对象。
原文较长,译文为节选;译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(nginx2root: Five new nginx vulnerabilities, and how Cloudflare protects origins from the worst of them)
On November 18, 2026, F5 and nginx.org disclosed ten vulnerabilities in nginx. Five of them, detailed by the Xint research team and published under the name nginx2root, are memory corruption flaws that an unauthenticated attacker can use to crash an nginx worker or, per Xint's research, run commands on the server. Xint also found a Linux kernel bug that turns that foothold into root on the host, including from inside a Docker container. Other teams found the two HTTP/2 bugs independently: F5 also credits Rapid7, Wiz Research and Ikotas Labs for CVE-2026-123007, and Metnir, Wiz Research, and Palo Alto Networks Unit 42 for CVE-2026-123633.
nginx is an HTTP web server that also serves as reverse proxy, content cache, load balancer, TCP/UDP proxy server, and mail proxy server. nginx runs a large share of the world's web servers, so this is a patch-now event. But if your nginx server is reachable only through Cloudflare's proxy, attackers cannot reach the vulnerable code paths for the most serious of these bugs, giving you protection while you update your servers.
Here is where Cloudflare stands, what that protection covers, where it stops, and how the bugs work.
The short version
- Cloudflare's edge is not affected. Much of the proxy that handles customer traffic at our edge now runs on FL2, written in Rust. We reviewed the parts still built on our heavily modified nginx fork against all five bugs before disclosure, and an update closing the related code paths finished rolling out globally before the vulnerabilities were published. The same releases fix five other nginx CVEs, including CVE-2026-118899, an infinite loop while reading a request body over TLS 1.3.
- Origins behind Cloudflare's HTTP proxy are shielded from the HTTP/2 and HTTP/3 attacks. For proxied hostnames, Cloudflare terminates every client HTTP/2 and HTTP/3 connection at our edge and opens a separate connection to your origin. The attacker's frames never reach your nginx.
- The resolver and mail proxy vulnerabilities depend on specific configuration. Many configurations of nginx will not be vulnerable, but the safest way to be sure is to update your install or disable features.
- You should still patch. Update to nginx 1.30.7 or 1.31.9 (or your vendor's fixed build) and restart. Some configurations, covered below, are not protected by the proxy.
What was disclosed
nginx2root is five independent bugs. Each one works on its own and each one needs a different configuration.
CVE | Bug class | Affected configuration | First affected release |
CVE-2026-123007 | Integer overflow leading to out-of-bounds heap read/write | HTTP/2 enabled | 1.9.5 (2015) |
CVE-2026-123633 | Use-after-free | HTTP/2 with | 1.19.7 |
CVE-2026-121810 | Use-after-free | HTTP/3 (QUIC) with | 1.25.0 |
CVE-2026-123634 | Use-after-free |
| 0.6.18 |
CVE-2026-113425 | Use-after-free | Mail proxy with | 0.5.33 |
F5 rates each one High (CVSS 3.1: 8.1) and Critical (CVSS 4.0: 9.2), and notes that code execution requires disabling or bypassing ASLR (Address Space Layout Randomization). For CVE-2026-123007, Xint's write-up shows how it leaked memory addresses to do exactly that.
CVE-2026-123007 is the one to worry about most. It only needs HTTP/2 turned on, which is commonly enabled on TLS deployments, and it has been in every nginx release since HTTP/2 support shipped in 1.9.5. Xint ran the exploit over the public Internet against servers on AWS, GCP and Azure. Xint searched Shodan on November 10, before the disclosure, and found 56.7 million hosts matching product:nginx. Of the 11.94 million that reported a version, 98.9% fell in the affected range. As of November 19, Censys's nginx2root exposure tracker counts about 8.8 million services running a potentially affected version with HTTP/2 enabled. Version strings don't prove a host is vulnerable, since distributions backport fixes, but the exposure is large.
The same nginx releases also fix five other bugs. The most serious, CVE-2026-118899, is an infinite loop when reading a request body over TLS 1.3 that lets an unauthenticated attacker stall a worker, in nginx 1.13.0 and later.
The Linux kernel bug is the sixth part of nginx2root. Xint found a use-after-free in the kernel's SCTP send path, present since Linux 4.15 (2018): while a send operation waits, its SCTP association can be moved to another socket, and the waiting send can then free it. An attacker who already runs code as the nginx worker can use it to gain root on the host, and Xint did this from an nginx running inside a Docker container. Many distributions load the SCTP module automatically the first time a program opens an SCTP socket, so hosts that never use SCTP can still be exposed. As of November 18, no kernel fix was available and Xint was withholding the details until there is one.
As of November 19, none of the five nginx2root CVEs is in CISA's Known Exploited Vulnerabilities catalog, and we have not seen reports of exploitation in the wild. Xint and Wiz Research have not released their exploits. Rapid7 has published a proof of concept, which it describes as suitable only for demonstrating the attack against a freshly started local container. Fake 'exploits' are also circulating on GitHub.
Why Cloudflare's proxy protects your origin
nginx2root's most dangerous bugs live in how nginx parses and manages HTTP/2 and HTTP/3 connections. To trigger them, an attacker has to send a carefully ordered stream of protocol frames directly to the nginx process: billions of WINDOW_UPDATE frames, a SETTINGS frame that holds response data back, PING frames that fill the send buffers, partial HEADERS frames, RST_STREAM at exactly the right moment.
When your DNS record is proxied through Cloudflare, that connection ends at our edge.
Cloudflare reads the client's HTTP request, applies your security and caching rules, and then makes its own request to your origin over a connection Cloudflare controls. The flow-control frames, pings, settings, and stream resets that the attacker sends are consumed by our edge. They are not forwarded. Your nginx only ever sees the requests Cloudflare chooses to send, framed the way Cloudflare frames them. This also holds when Cloudflare connects to your origin over HTTP/2: Cloudflare runs its own flow control on that connection and sends WINDOW_UPDATE and RST_STREAM frames only as its own traffic needs, so a client can't make it relay the billions of WINDOW_UPDATE frames the attack requires.
Rapid7 makes the same point in its analysis of CVE-2026-123007: if the HTTP/2 connection is proxied, the attacker's frames "will likely not be retransmitted" in a way that allows exploitation. This breaks each of the HTTP/2 and HTTP/3 attacks.
CVE | What the attacker needs | Behind Cloudflare's HTTP proxy |
CVE-2026-123007 | Direct control over HTTP/2 | Protected. Control frames terminate at Cloudflare's edge. |
CVE-2026-123633 | The first part of a HEADERS frame on a direct HTTP/2 connection, plus the ability to exhaust nginx connection slots and reset the TCP connection | Protected. The client's HTTP/2 connection terminates at Cloudflare. |
CVE-2026-121810 | A direct QUIC/HTTP/3 connection to nginx | Protected. HTTP/3 terminates at Cloudflare's edge. We do not communicate to origins over HTTP/3 |
CVE-2026-123634 | A request and its mirror or SSI subrequest waiting on the same DNS lookup, and the main request ending while the answer is processed. In Xint's exploit, nginx's resolver had to reach the attacker's DNS server. | Not fully protected. Depends on how your config builds |
CVE-2026-113425 | A direct IMAP/POP3/SMTP connection to the nginx mail proxy | Not protected. Cloudflare's HTTP proxy does not carry mail traffic. |
There is one condition to be protected by Cloudflare here: your origin must not be reachable directly. If an attacker can find your origin's IP and connect to it directly (TCP 443 or 80 for HTTP/2, UDP 443 for HTTP/3, or the mail ports), Cloudflare isn't in the path and the protection doesn't apply. You should ensure that your origin servers can only be accessed through Cloudflare’s proxies, using one of the following approaches:
- Cloudflare Tunnel. Your origin makes an outbound-only connection to Cloudflare and exposes no inbound ports.
- Firewall to Cloudflare IP ranges. Accept inbound HTTP/HTTPS only from Cloudflare's published IP ranges. This must be done using an IP firewall, not based on configuration in your nginx server.
- Authenticated Origin Pulls (mTLS). Your origin rejects any TLS connection that doesn't present Cloudflare's client certificate.
Xint's own exposure check makes the same point: "If a CDN or reverse proxy sits in front of nginx, the test only reaches the proxy, so also run it directly against the nginx server."
Where the protection does not apply
There are several situations in which Cloudflare’s HTTP proxy does not provide protection.
- Spectrum TCP/UDP applications. For these configurations, traffic from the Internet is passed unmodified through to your origin. If your origin is running nginx, patch or disable the affected features.
- nginx mail proxy. Cloudflare's HTTP proxy does not carry IMAP, POP3 or SMTP. Restrict mail listeners to trusted networks until patched.
- CVE-2026-123634 (resolver). This depends on how your configuration builds the
proxy_passtarget from the request, combined with a carefully timed cancellation of an HTTP request. Passing your traffic through Cloudflare’s proxy makes it harder to exploit this, but does not provide full protection. Update regardless. - DNS-only (grey-cloud), internal or non-proxied nginx. Any nginx server an attacker can reach without going through Cloudflare, including internal services behind a compromised host, needs to be patched.
Cloudflare’s WAF rules are not relevant to these vulnerabilities. These are protocol-level bugs. Because Cloudflare’s proxy handles parsing the HTTP protocol messages, and creates new messages to fetch information from origin servers, origins behind Cloudflare's HTTP proxy are protected from the HTTP/2 and HTTP/3 bugs without needing a rule. We have therefore not released a managed rule. The protection comes from connection termination, not from pattern matching.
What to do now
- Find every nginx server. Include nginx Plus, distribution packages, container images and appliances. Run
nginx -Vandnginx -Ton each and note HTTP/2, HTTP/3/QUIC listeners,proxy_passwith variables plus SSI ormirror, and anymailblock. - Patch. Update nginx Open Source to 1.30.7 or 1.31.9, nginx Plus to 37.0.8.1 or 37.3.0.1, or your distribution's fixed package. F5 lists nginx Plus R34 to R36 as affected with no fixed build, so move those to a fixed 37.x release. Then restart nginx or complete a binary upgrade. A config reload does not replace the running binary.
- Check backport versions carefully. Distributions often patch without changing the version
nginx -vreports. Compare the full package version against your distribution's advisory. - Make sure your origin is only reachable through Cloudflare. Use Tunnel, IP allowlisting or Authenticated Origin Pulls.
- If you can't patch yet, disable what you don't need.
http2 off;(nginx 1.25.1 and later; on older versions, removehttp2from thelistendirective) blocks CVE-2026-123007 and CVE-2026-123633. Removing QUIC listeners and settinghttp3 off;blocks CVE-2026-121810. Pointproxy_passat fixed upstream groups for CVE-2026-123634. Don't rely onmirror_request_bodyalone: Xint's tested setup set it tooff, and the defaultonstopped that exploit, but SSI and other subrequests can still reach the bug. Bind mail listeners to trusted networks for CVE-2026-113425. Restart so old connections close. - Block SCTP if you don't use it. Add
install sctp /bin/falseto a file in/etc/modprobe.d/to stop the kernel module from loading. This doesn't unload an already-loaded module or disable SCTP built into the kernel. When your distribution ships a kernel update for the SCTP bug, install it and reboot. Blocking the module is a stopgap until then.
The Cloudflare Radar Zero Wire entry for nginx2root has the full checklist, a prompt you can give an agent to run a read-only assessment of your fleet, and links to every vendor advisory.
Technical deep dive
Let’s dig into the details of the five bugs by looking through the code. We’re looking at nginx 1.31.8 (commit 140aa94) which was the most recent code published before the fixes, and comparing this to the fixes in 1.31.9 (which were also included in release 1.30.7 on the stable branch).
A note on methodology: we based our analysis on the public advisories, and to verify our reading of the code, we built the public 1.31.8 and 1.31.9 releases with AddressSanitizer and ran tests for four of the five bugs (flow control, HTTP/2 use-after-free, resolver and mail proxy). Each one faults on 1.31.8 and runs clean on 1.31.9. We did not reproduce the HTTP/3 bug; that section is based on the fix commit and the published analysis.
One pattern, in four places
Four of the five bugs are use-after-free bugs. This is a common issue with programs that manually manage memory without language support: one part of the code frees an object that another part is still using.
nginx is event driven. A handler runs, calls other code, and that code returns to the handler. Three of the bugs occur when the called code tears down the connection or request the handler is working on. In the fourth, a second connection still holds a pointer to the object.
- CVE-2026-123633 and CVE-2026-121810. A request needs a connection slot to reach its upstream. nginx is low on slots, so it closes an idle connection to free one. The connection it chooses is the one the request belongs to.
- CVE-2026-123634. A resolver callback ends a request. Cleanup of that request frees a second resolver context that the resolver is about to call next.
- CVE-2026-113425. When a write to a mail client fails, the client connection is closed while the connection to the authentication service still points at its session.
F5 rates all four as potential code execution if address space layout randomization (ASLR) is disabled or bypassed, and in its tests Xint reports code execution with the privileges of the nginx worker.
The fifth bug, CVE-2026-123007, is of a different kind: an accounting error that becomes a length error.
CVE-2026-123007: two flow-control pieces that each look correct
HTTP/2 flow control limits the amount of response data a server may send. nginx tracks a send window for each stream and one for the connection, h2c->send_window. The client enlarges a window with a WINDOW_UPDATE frame, and the protocol caps every window at 2^31 − 1.
nginx enforces that cap when a WINDOW_UPDATE arrives (ngx_http_v2_state_window_update()):
if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
/* logs "client violated connection flow control" */
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_FLOW_CTRL_ERROR);
}On its own, this check is correct. But the connection window also grows in a second place. When nginx queues DATA frames for a stream, it subtracts their length from the window. If the stream is canceled before those frames go out, ngx_http_v2_filter_cleanup() takes them off the queue and returns the credit:
h2c->send_window += window;Nothing caps this line. As the fix commit describes, if the client enlarges the connection window after the frames are queued and before the stream is terminated, the refund pushes the window past 2^31 − 1.
From that point the first check no longer works. h2c->send_window is an unsigned size_t, so NGX_HTTP_V2_MAX_WINDOW - h2c->send_window wraps around to a very large number and every subsequent WINDOW_UPDATE is accepted. The client can then raise the window as far as it wants.
The window is unsigned, but the code that sizes DATA frames compares it as a signed value (ngx_http_v2_send_chain()):
if (limit == 0 || limit > (off_t) h2c->send_window) {
limit = h2c->send_window;
}
...
if ((off_t) frame_size > limit) {
frame_size = (size_t) limit;
}After the window passes 2^63, it is negative as an off_t. The frame size becomes the window value itself, a number between 2^63 and 2^64, and nginx builds a buffer whose last pointer lies before its pos pointer.
Over TLS, that buffer reaches a memcpy() in ngx_ssl_send_chain() with that length. Our TLS test stops at that point under AddressSanitizer. Xint's write-up explains how, with the window pushed close to 2^64, this turns into a controlled out-of-bounds write and an address leak, and Xint, Rapid7, and Wiz each report code execution from it. This post goes no further than the fault.
Over cleartext HTTP/2, the same invalid buffer follows a different output path. Our cleartext test also faults under AddressSanitizer on 1.31.8 and runs clean on 1.31.9. The public write-ups address the TLS case.
How much traffic the known attacks require
The biggest step a WINDOW_UPDATE can take is 2^31 − 1, and a WINDOW_UPDATE frame is 13 bytes. Bringing a 64-bit window near its top therefore requires about 2^33 frames: roughly 8.6 billion frames, or about 112 GB (104 GiB).
Rapid7, which published a proof of concept, gives the same figure and adds that nginx limits control-frame traffic relative to other traffic on the connection, so its run also sends about 15 GiB of other request traffic. Its total comes to approximately 128 GB of HTTP/2 data: about two minutes on a 10 Gbit/s link and about seventeen minutes at 1 Gbit/s. Rapid7 estimates the WINDOW_UPDATE traffic needed to reach 2^63 at about 2^32 frames, or 52 GiB, half of the 104 GiB figure. It also notes that these figures describe its route and are not a proven minimum.
For defenders, this is the useful fact about the bug. At this volume, the known attacks are hard to hide: nginx receives tens of gigabytes from a single client over one long-lived connection and sends little back, much more than the requests in the access log account for.
Why it was difficult to find
The refund line has existed in nginx since HTTP/2 support arrived in 1.9.5 in 2015. Two things made it difficult to notice.
First, each piece looks correct on its own. The check on WINDOW_UPDATE is the right check. The refund is the right refund. The bug is that the check relies on an assumption the refund does not preserve.
Second, testing that waits for a crash is very unlikely to reach it, because a crash requires tens of gigabytes of input. The bad state itself can be reached with very little traffic: Censys published a cleartext test that reaches what it calls the corrupted flow-control state with a 5.69 MB capture. A test that asserts "the send window never exceeds its protocol maximum" after every frame would flag the bad state as soon as a test sequence got there. A test that waits for memory corruption would not.
The fix
The fix (6 lines added) introduces a counter, h2c->send_queued, for DATA that is queued but not yet sent. The WINDOW_UPDATE check now includes those bytes in the window:
if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window - h2c->send_queued) {From the client's perspective, queued frames still count toward the window, so the client can no longer refill credit that nginx is about to refund. On a fixed version the attempt is rejected with a flow-control error.
CVE-2026-123633: where two protections interact
An nginx worker has a fixed number of connection slots (worker_connections), which the client and upstream connections share. Since 1.19.2, when free slots run low (1/16 of the total or fewer), ngx_get_connection() calls ngx_drain_connections(), which closes connections marked "reusable": connections with nothing in progress, such as idle keep-alive connections.
This works only if a reusable connection truly has nothing in progress. For HTTP/2 that was not always the case. Two commits landed on the same day in February 2021 and were released together in 1.19.7:
- "HTTP/2: fixed reusing connections with active requests" fixed a case in which a cleartext HTTP/2 connection could remain reusable while it had a request.
- "HTTP/2: reuse of connections with incomplete frames" registered a connection as reusable while it waits for the remainder of a partly received frame, so that a client cannot hold slots with partial frames.
The second change is the relevant one here. As the fix commit explains, if the remainder of that frame is a HEADERS frame, a stream is created, but the reusable status was not reset until the connection next went idle. The connection then has a request and remains in the reusable queue.
If that request is proxied, nginx requests a slot for the upstream connection. If slots are short, the drain runs inside that call and can choose this same connection. The drain instructs the connection to close and nginx attempts to send GOAWAY. If that send fails, nginx frees the connection and every stream on it. Control then goes back to the upstream code, which continues to use the request it was called for.
Each change made sense on its own. The interaction between them was subtle and stayed unnoticed until this year. F5's advisory credits Albert Ebb of Metnir, Nir Ohfeld at Wiz Research, Xint.io and memN0ps of Palo Alto Networks Unit 42; nginx.org's changelog credits Albert of Vexera AI.
The fix
Two lines added: ngx_http_v2_create_stream() now calls ngx_reusable_connection(h2c->connection, 0). A connection that has a stream is never reusable, regardless of the state it was in before.
CVE-2026-121810: the same idea, in QUIC
According to the fix commit and Xint's analysis, the HTTP/3 bug reaches the same result by a different route.
In nginx's QUIC code, each QUIC connection uses one connection slot and each stream uses another. A QUIC connection may be drained only when every stream remaining in its tree can be cancelled, and nginx determines this by walking the connection's tree of streams.
ngx_quic_create_stream() removes the QUIC connection from the reusable queue and then requests a slot for the new stream. Before the fix, the new stream was added to the tree only after that. If the slot request triggered a drain that closed another, idle stream of the same QUIC connection, the code handling the closed stream walked the tree, did not find the stream being created, concluded the connection was idle, and made it reusable again. A later drain, for example when the new request connects to its upstream, could then close the QUIC connection while that request was running.
F5's advisory states that exploitation "also depends on conditions beyond the attacker's control". Xint writes that the bug "is triggered by a slightly different mechanism" from the HTTP/2 one.
The fix
Four lines added: the stream goes into the tree before the slot is requested, and is taken out again on the error paths.
CVE-2026-123634: freeing the next item of a list during the walk
When proxy_pass contains a variable, nginx resolves the host name while handling the request. If a lookup for the same name is already in progress, the new request waits on the same resolver node. When the answer arrives, nginx detaches the list of waiting contexts and calls each in turn:
next = rn->waiting;
rn->waiting = NULL;
while (next) {
ctx = next;
...
next = ctx->next;
ctx->handler(ctx);
}The loop stores next before the handler call, so a handler may free its own context. The trouble starts when a handler frees a different context in the same list. This happens when two contexts belong to one request, as with a request and its mirror subrequest resolving the same name (the case Xint tested; F5 also lists SSI subrequests). If the first handler ends the request, the request's cleanup calls ngx_resolve_name_done() for the second context. That function searches the node's waiting list for the context, does not find it because the list has been detached, and frees the context regardless. The loop then advances to the freed context.
Usually nginx logs this. On vulnerable versions, when the search fails, it writes
could not cancel <name> resolvingto the error log at alert level. This line is worth searching for. It is not proof either way: the fix commit notes that one variant, while following a CNAME, produced no alert.
The fix
A context cancelled while it sits in a detached list is no longer freed immediately. Its handler is swapped for one that frees it when the loop gets to it (31 lines added). The fix also downgrades the alert to a debug message, so the line above shows up at alert level only on unpatched versions.
CVE-2026-113425: two connections, one session
With auth_http, the mail proxy asks an HTTP service to verify each login. During the wait, it holds two connections for one session: the client connection and the connection to the authentication service. The second points at the session and uses the memory pool of the client connection.
Before the fix, the reply the protocol handler had prepared for the client remained queued while the authentication request was in progress, and the client's write handler was still ngx_mail_send(). If that handler ran and the write failed because the client had reset the connection, it closed the client connection and destroyed the session. The authentication connection still pointed at the session, and the next event on that connection used freed memory.
Xint describes two conditions for this: the client's write event must already be registered (for example, because the client stopped reading replies), and the login command and the reset must be handled in the same pass of the event loop. Valid credentials are not needed, because this happens before the login is checked.
The fix
Two added lines discard the queued reply when the authentication request begins. The same release contains three further commits that block client writes while the proxy waits for the authentication response, while it connects to the upstream and reads its greeting, and while it resolves an SMTP client's address and name.
What the fixes share
The five fixes each involve minor corrections to the code. They add between 2 and 31 lines each, and the mail proxy fix came with three further commits. There is no design change needed. Each fix restores an invariant that the rest of the code already depended on:
- a send window never goes above the protocol maximum
- a connection with a request in progress is never reusable
- an object that other code is about to use is not freed out from under it
In every case, one code path failed to keep a rule that the rest of the code relied on, and the fix makes that path keep it. As code is modified over time, it is very easy for these kinds of rules to become broken.
What to watch for
Attempts to exploit this will typically trigger some characteristic log messages. Three of these messages (the two at info and the one at warn) fall below nginx's default error_log level of error and appear only if a lower level is set. The alert messages are logged by default.
Bug | Log messages or other signals |
CVE-2026-123007 | A single long-lived HTTP/2 connection on which nginx receives tens of gigabytes from a client and sends little back, much more than its logged requests account for. On fixed versions a rejected attempt logs |
CVE-2026-123633, CVE-2026-121810 |
|
CVE-2026-123634 |
|
CVE-2026-113425 | Worker crashes in a mail proxy using |
All five | Unexpected programs launched by an nginx worker process, for example from an |
Timeline
Date (UTC) | Event |
Oct 11, 2026 | Xint discovers the vulnerabilities |
Oct 16, 2026 | Reported to F5 via HackerOne |
Oct 27, 2026 | Reports delivered to the nginx development team |
Nov 10, 2026 | Xint completes patch validation |
Nov 18, 2026 | Public disclosure; nginx 1.30.7 and 1.31.9 released |
The bugs will keep coming
CVE-2026-123007 sat in nginx for more than ten years. The SCTP bug has been in the Linux kernel since 2018. Xint says one of its researchers found CVE-2026-123007 by hand and an automated Xint scan found the other four nginx bugs. Several other teams found the two HTTP/2 bugs independently. Meanwhile, nginx's advisory list has gone from two entries in 2025 to 36 so far this year. AI-assisted research is finding bugs in heavily reviewed code faster than before, and more disclosures like this one are coming.
That's a large part of why it's worth putting Cloudflare in front of your origin. A protocol bug in your web server becomes much less of a risk when the attacker can't speak that protocol to your server directly. Our edge is not affected, and the HTTP/2 and HTTP/3 attacks against your nginx end at our network. Patch anyway, lock down your origin so Cloudflare is the only way in, and use the Radar Zero Wire page to check your fleet.
Sources
正文保留英文原文,标题与摘要由机器翻译。
原文发布于 Cloudflare Blog(nginx2root: Five new nginx vulnerabilities, and how Cloudflare protects origins from the worst of them),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。