NGINX2Root: pre-auth RCE in nginx HTTP/2 (CVE-2026-123007)
NGINX2Root was disclosed on Nov 18: five nginx vulnerabilities, each demonstrated with a working unauthenticated remote code execution exploit, plus an unpatched Linux kernel bug that takes the nginx worker to root on the host. The one that matters most is CVE-2026-123007, memory corruption in HTTP/2 flow control, scored 9.2 under CVSS 4.0. It has been in every release since HTTP/2 support arrived in nginx 1.9.5 in 2015, and it needs only HTTP/2 over TLS: Wiz reached code execution on a server that only served static files. Five research teams found it independently, and Rapid7 published a proof of concept. nginx 1.30.7 and 1.31.9, released the same day, fix all five vulnerabilities.
Our read: this is real pre-auth RCE in one of the most widely deployed web servers, and the version number is a poor guide to who is exposed. A server is in play only if an attacker can negotiate HTTP/2 with nginx itself, and the public exploit has to push about 128 GB down a single connection to get code execution. Whether a listener negotiates HTTP/2 can be checked from the outside in one TLS handshake, and that is where triage should start.
How it works
HTTP/2 flow control gives nginx a send window for each connection: a counter of how many response bytes the client has agreed to receive. nginx subtracts from it when it queues DATA frames, and adds the amount back if a stream is cancelled before its data goes out. That refund is never checked against the protocol maximum of 2^31-1. So the client stops reading until responses pile up in nginx’s output queue, tops the window back up to the maximum with WINDOW_UPDATE, then cancels the streams. The refund lands on top, and the window is now above a limit the rest of the code assumes it cannot cross.
The check on later WINDOW_UPDATE frames computes the room left as NGX_HTTP_V2_MAX_WINDOW - h2c->send_window, in unsigned arithmetic. With the window already over the maximum, the subtraction wraps to an enormous positive number, and nginx accepts every increment from then on. Each frame is valid HTTP/2 on its own; only the running total is wrong. That is why there is no request for a WAF rule to match, and nothing in the access log.
The attacker keeps adding credit until the 64-bit counter, read as a signed number, is slightly negative. nginx uses it as a DATA frame length, builds a buffer whose end pointer sits before its start, and the TLS send path passes the difference to memcpy as a length just under 2^64. On x86-64 glibc that call does not crash: the vectorized copy computes its end address with wraparound, moves a few hundred bytes outside the intended buffers, and returns. Arranged carefully, one such copy sends heap and code pointers back to the client and overwrites heap metadata next to the TLS buffer. The published chains use the leak to defeat ASLR and the overwrite to redirect a cleanup callback, which runs a command as the nginx worker.
The expensive part is the counter. Each WINDOW_UPDATE costs 13 bytes and adds at most 2^31-1, so climbing a 64-bit range takes billions of frames on one TLS connection: about 60 GB to crash a worker, by Upwind’s estimate, and about 128 GB for Rapid7’s code-execution chain. That is two minutes at 10 Gbit/s, 17 minutes at 1 Gbit/s, and out of reach below roughly 300 Mbit/s because of nginx’s default one-hour connection lifetime. It rules out slow, wide spraying. It does not rule out a targeted attack from a cloud VM with a fast link.
What we know
- Versions: nginx 1.9.5 through 1.31.8. Fixed in 1.30.7 (stable) and 1.31.9 (mainline), NGINX Plus 37.0.8.1 and 37.3.0.1, and F5’s NGINX Ingress Controller 5.8.0. The older R-series NGINX Plus releases, through R36, get no fix. Fixed official Docker images are out. At the time of writing, Debian, Ubuntu, Red Hat, and Amazon Linux have shipped no fixed package.
- The version trap: distributions backport fixes without changing what
nginx -vprints, so compare the full package version with the distribution’s advisory. From the outside it is harder still: only 21% of the 56.7 million nginx hosts in the Shodan snapshot published with the disclosure report a version at all. The headline figure, 98.9% of hosts in the affected range, is 98.9% of that fifth, and the other 45 million are unknown, not safe. - Reach: HTTP/2 is off in nginx’s stock configuration and on wherever someone wrote
http2 on;orlisten 443 ssl http2;. The attacker also has to deliver exact frames to nginx itself. A CDN or L7 load balancer that terminates HTTP/2 rebuilds them, which Rapid7 says will likely break the attack and Wiz says depends on the implementation: reduced risk, not a fix. An L4 load balancer, TLS passthrough, or an origin address reachable around the CDN leaves nginx exposed. - Kubernetes: the community ingress-nginx controller enables HTTP/2 by default (
use-http2: "true") and bundles nginx 1.27.1. The project was retired in March and its repository is archived, so no fix is coming. It is the first place we would look. - Exploit status: Rapid7’s proof of concept is public and, by its own README, suitable only against “a local freshly started Docker container”. That is not the ceiling: another of the teams that found the bug says its unreleased exploit worked over public IPs on AWS, GCP, and Azure while the server handled normal traffic, and Wiz confirmed code execution with an ASLR bypass on official 1.31.7 and 1.31.8 builds. No exploitation in the wild had been reported as of Nov 18.
- The other four: CVE-2026-123633 is a use-after-free in HTTP/2 when nginx proxies to an upstream, and turning HTTP/2 off stops it too. The rest are outside HTTP/2: CVE-2026-121810 (HTTP/3 with an upstream), CVE-2026-123634 (resolver, with a request-derived
proxy_passandmirror), and CVE-2026-113425 (mail proxy withauth_http). nginx.org labels three of the five “medium”; F5 scores all five 9.2. - Root: the kernel bug is a use-after-free in SCTP, present since Linux 4.15 in 2018 and still unpatched. On many distributions the module loads on demand the first time a process opens an SCTP socket. The researchers who reported it went from an nginx worker inside a Docker container to root on the host, against an AWS server over its public IP.
What to do now
- Find the nginx that speaks HTTP/2 to the internet. From outside, run
openssl s_client -connect HOST:443 -servername HOST -alpn h2;ALPN protocol: h2in the output means the listener is in scope. Test the origin address as well as the public hostname, because behind a CDN the check only reaches the CDN. Include ingress controllers, appliances, container images, and products built on nginx such as OpenResty. - Upgrade, then restart. nginx 1.30.7 or 1.31.9, NGINX Plus 37.0.8.1 or 37.3.0.1, NGINX Ingress Controller 5.8.0. A reload keeps the old binary running, so restart, and rebuild images instead of restarting containers.
- If you cannot patch today, turn HTTP/2 off. Remove
http2from everylistenline and, on nginx 1.25.1 and later, sethttp2 off;in each server block that shares the listener. gRPC needs HTTP/2 and will break. This covers the two HTTP/2 bugs only. For the others, remove QUIC listeners and sethttp3 off;, pointproxy_passat a fixed upstream instead of a request-derived name, and keep the mail proxy away from untrusted clients. - On community ingress-nginx, set
use-http2: "false"in the controller ConfigMap now. Then plan the migration. - Block SCTP where it is not used.
install sctp /bin/falsein a file under/etc/modprobe.d/stops the module from loading on demand. It does not unload a module that is already loaded. - Hunt at the connection level. The access log will not show the attack. Look for one TLS connection receiving tens of gigabytes while sending almost nothing,
worker process ... exited on signal 11in the error log, and any process started by an nginx worker, which is the clearest sign of success.
What happens next
Distribution packages are the next fix to land, and the SCTP bug has no kernel patch yet. Expect the public exploit to be adapted to more builds; Wiz expects wide attacks to start with packaged products, where every customer runs the same build. Expect more of these, too: nginx.org listed two advisories in all of 2025 and 26 this year before this release, and five teams found the same HTTP/2 bug within weeks of each other. If nginx is on your perimeter, we will tell you which listeners negotiate HTTP/2 directly with the internet and which sit behind something that terminates it, without anything dangerous touching your infrastructure. Get a POV in minutes.