blog.rust.gay

nginx2root is a reminder that version strings are not patch status

On 18 November, F5 published a security release for nginx that fixes two critical HTTP/2 remote code execution bugs. Within hours, the story had a name: nginx2root. Xint Research says it found five nginx vulnerabilities, each of which can lead to remote code execution on its own, plus a Linux kernel bug in the SCTP subsystem that can be chained with any of them to gain root on the host. In a demo, Xint chained CVE-2026-123007 with the kernel bug to escape a Docker container running nginx and get root on the underlying host.

The most important number is not the CVSS score. It is the age of the code. CVE-2026-123007 affects every official nginx release from 1.9.5, which introduced HTTP/2 in 2015, through 1.31.8. The vulnerable code was still present in the development branch as of 10 November 2026. A server running a recent release is not automatically safe. A server reporting a version outside the range is not automatically safe either, because distributions backport fixes without changing the upstream version string.

That is the operational problem in one sentence: version strings are not patch status.

What was found

The two bugs that got the most attention are in nginx's HTTP/2 implementation. CVE-2026-123007 is a flow-control accounting error that leads to an invalid memory copy. Wiz says it is exploitable in default configurations with HTTP/2 enabled, and Xint demonstrated code execution on a server serving ordinary static files, with no backend application or third-party module. CVE-2026-123633 is a use-after-free in HTTP/2 connection handling. It affects nginx 1.19.7 through 1.31.8 when HTTP/2 is used as a reverse proxy to an upstream server.

The other three nginx bugs are narrower but still serious. CVE-2026-123634 requires a resolver directive, a request-derived proxy_pass destination, and mirror with mirror_request_body off; other features that create subrequests, such as SSI, may reach the same bug. CVE-2026-121810 is a use-after-free in HTTP/3 when nginx proxies to an upstream. CVE-2026-113425 affects the mail proxy when proxy on and auth_http are configured. Xint lists all five with their first affected release and whether disabling HTTP/2 blocks them.

The kernel bug is separate from nginx. Xint says it can be chained with any of the five nginx bugs to escalate from the nginx worker to root on the host. The container escape is the part that should change how platform teams think about nginx. A container boundary does not protect you from a kernel bug. If the host kernel is unpatched, a compromised worker can become a compromised node.

The exposure is large, but the scan is not a diagnosis

Wiz cites Netcraft's figure that nginx powers more than 225 million websites. Xint's Shodan query on 10 November returned 56.7 million hosts for product:nginx. Of those, 11.94 million, or 21.1%, reported an identifiable version. Among the hosts with an identifiable version, 98.9% fell within the 1.9.5 through 1.31.8 range affected by CVE-2026-123007.

Those numbers are alarming, but they are not a vulnerability count. A reported version string can be wrong. The host may not have the HTTP/2 module compiled in. HTTP/2 may be disabled on the listening port. The distribution may have backported the fix without changing the version. A CDN or load balancer in front of nginx may terminate HTTP/2 before traffic reaches the vulnerable server. The Shodan number is a prioritization signal, not a list of exploitable hosts.

The same caveat applies to nginx -v. Ubuntu 24.04 ships nginx 1.24.0, Ubuntu 22.04 ships 1.18.0, and Debian 12 ships 1.22.1. All three are inside the affected upstream range, but a current package may include a backported fix. Xint gives a concrete example: Ubuntu 22.04 originally shipped 1.18.0-6ubuntu14; by 26 October, security updates had brought the package to 1.18.0-6ubuntu14.22, while nginx -v still reported 1.18.0. If you only look at the upstream version, you will misclassify a patched host as vulnerable, or a vulnerable host as patched.

How to check a host

Start with the binary and the build flags:

nginx -v
nginx -V 2>&1 | grep -q -- '--with-http_v2_module' \
  && echo 'HTTP2_MODULE=present' \
  || echo 'HTTP2_MODULE=absent'

If the module is absent, CVE-2026-123007 and CVE-2026-123633 are not reachable through that binary. If it is present, check the running configuration, not just the file on disk:

sudo nginx -T 2>&1 \
  | sed 's/#.*//' \
  | grep -nE 'listen[[:space:]].*http2|^[[:space:]]*http2[[:space:]]+on[[:space:]]*;'

Output such as listen 443 ssl http2; or http2 on; means HTTP/2 is enabled. No output means it is not. nginx -T reads the configuration from disk. If you changed the configuration without reloading nginx, the running configuration may differ. Check the process's actual configuration or reload it before trusting the result.

Finally, test from outside the network:

openssl s_client -connect example.com:443 -servername example.com -alpn h2 </dev/null 2>&1 \
  | grep -E 'ALPN protocol:|No ALPN negotiated|Connection refused|connect:errno|handshake failure'

If the output says ALPN protocol: h2, the server accepts HTTP/2 from the internet. If it says No ALPN negotiated, it does not. If a CDN or reverse proxy sits in front of nginx, the test only reaches the proxy. Run it directly against the nginx server as well.

The package check is the part most teams skip:

dpkg-query -W -f='${Package} ${Version}\n' nginx nginx-core nginx-full 2>/dev/null
rpm -q nginx

Compare the full package version against the distribution's security advisory. Do not compare only the upstream version. If you run nginx from a vendor appliance, a container image, or a custom build, you need the vendor's build metadata. The upstream release notes will not tell you which patches were backported into your binary.

The AI discovery story is real, but narrower than the headline

Wiz says it used its Atlas AI vulnerability-research harness, with Gemini 4 Carbon and ChatGPT 5.6 Sol to validate impact, to discover both HTTP/2 bugs. Xint says a researcher found CVE-2026-123007 while preparing for ZeroDay Cloud 2026, and a fully automated scan found the other four a few days later. Multiple independent teams, including Ikotas Labs, Metnir, and Rapid7, reported overlapping findings to F5.

That is a meaningful shift. Memory-safety bugs in mature C code have historically been expensive to find because they require tracing subtle interactions across multiple code paths. AI tools lower the cost of that search. They do not lower the cost of patching, testing, and rolling out a fix to millions of hosts. The bottleneck has moved from discovery to response, and response is still a human and organizational problem.

The headline "AI found more critical bugs" is therefore half right. AI helped find them faster, and automated scanning found four more without human guidance. But the reason this is a crisis is not that the bugs are new. It is that the code is old, the deployments are heterogeneous, and the patch status is hard to verify. A model that finds a ten-year-old bug is impressive. A model that patches every distribution, container image, and vendor appliance is not available.

The disclosure timeline was tight

Wiz's timeline shows how little slack exists between discovery and disclosure. It reported the HTTP/2 use-after-free, later CVE-2026-123633, to F5 on 21 October, with a confirmed remote code execution and a proposed fix. F5 confirmed that another team had already reported the same bug. F5 supplied a patch for review on 10 November. Wiz reported the second HTTP/2 bug, CVE-2026-123007, on 16 November. F5 confirmed the match on 17 November and shipped the release on 18 November.

That is a fast turnaround for a mature C codebase, but it is also a narrow window for downstream consumers. Distributions need to backport the fix, rebuild packages, run their own tests, and publish advisories. Container base images need to be rebuilt. Vendors need to certify appliances. The upstream release is the starting gun, not the finish line. A team that waits for a vendor notice may be patching days or weeks after the public write-up, which is exactly when scanning and exploitation increase.

The timeline also explains why the "five bugs" framing matters. The two HTTP/2 bugs were reported separately, and the other three came from a broader audit. A patch that fixes only the first CVE leaves the others open. A mitigation that disables HTTP/2 covers two of the five. The only complete fix is the release that contains all of them, plus the kernel fix for the chain. This is not a case where a single workaround buys indefinite safety.

Mitigation, not just upgrade

The complete fix is nginx 1.31.9. If you cannot upgrade immediately, disabling HTTP/2 on affected listening ports blocks CVE-2026-123007 and CVE-2026-123633. It does not block CVE-2026-121810, CVE-2026-123634, or CVE-2026-113425. That is why "just disable HTTP/2" is not a complete mitigation. It is a targeted workaround for the two bugs that affect the broadest set of configurations.

The kernel chain adds another layer. If you run nginx in a container, patch the host kernel as well as the container image. If you run nginx on a VM, patch the VM's kernel. If you run a managed nginx service, ask the provider which CVEs are fixed in the build you are actually using. The container escape means the security boundary is the host, not the container.

There is also a configuration question. Xint's CVE-2026-123634 is reachable only with a specific combination of resolver, a request-derived proxy_pass destination, and mirror with mirror_request_body off. If you use those features, review them. If you do not, the bug is not reachable through that path. The same logic applies to the mail proxy. A precise inventory is more useful than a blanket panic.

What to do next

First, build an inventory of every nginx binary you operate: edge proxies, internal reverse proxies, ingress controllers, sidecars, appliances, and container images. Record the upstream version, the full package version, the build flags, and whether HTTP/2 or HTTP/3 is enabled. A spreadsheet is fine. The point is to stop treating "nginx" as a single thing.

Second, patch to 1.31.9 or the distribution's fixed package. Rebuild container images instead of patching running containers. If you use a vendor appliance, get the vendor's fixed release and its CVE list. If you cannot patch, disable the affected protocol on the exposed listener and document the residual risk.

Third, patch the kernel. The nginx bugs are the headline, but the container escape depends on a separate SCTP flaw. A host that is patched for nginx but not for the kernel is still a host that can be escalated. If you do not need SCTP, disabling the module is a reasonable defense in depth, but it is not a substitute for the kernel fix.

Fourth, monitor the exploit market. A ten-year-old HTTP/2 bug with a public technical write-up and multiple independent discoverers is a high-value target. The window between disclosure and exploitation is likely to be short. If you see scanning for HTTP/2 settings or unusual nginx worker crashes, treat it as a signal, not noise.

The broader lesson is that patch management has to operate on build metadata, not version strings. nginx is not uniquely bad at this. It is a mature project with a long support tail, many distributors, and a huge installed base. That is exactly the environment where version strings become unreliable. The teams that respond well will be the ones that can answer a simple question: which binary is actually running, and which patches are actually in it?

Sources


← back to posts