Jorge Turbica / blog · Blog ← All articles ES · Leer en español
Technologies

Two unauthenticated RCEs in NGINX HTTP/2, one hidden since 2015: upgrade to 1.30.7 or 1.31.9

NGINX fixes 10 CVEs; two allow unauthenticated code execution when HTTP/2 is on. Affects 1.9.5 onwards. Patched in 1.30.7 and 1.31.9.

An NGINX server doing nothing but serving static files, with no backend and no third-party modules, can end up running an attacker's code. That is what Wiz Research demonstrated with CVE-2026-123007, an HTTP/2 flow-control bug that has been in the code since NGINX 1.9.5, back in 2015. On 18 November 2026, NGINX 1.30.7 (stable) and 1.31.9 (mainline) shipped with a fix for it and for nine other vulnerabilities.

The two that matter

Both critical bugs live in the HTTP/2 module and only affect servers that have it enabled (http2 on; or the http2 parameter on listen). Wiz scores them at CVSS 4.0 9.2.

CVEWhat breaksWhen it is exploitableAffected versions
CVE-2026-123007HTTP/2 flow-control window overflowHTTP/2 enabled, even for static content1.9.5 – 1.31.8
CVE-2026-123633HTTP/2 connection use-after-freeNGINX as a reverse proxy, running low on worker_connections1.19.7 – 1.31.8

CVE-2026-123007 is the nastier one because it needs nothing unusual in the config. When a client cancels a stream that still has queued data, NGINX refunds the unused credit to send_window without checking HTTP/2's maximum. If the client has already grown the window with WINDOW_UPDATE, the counter overshoots, the next bounds check is computed with unsigned integers and wraps around, and eventually a negative length reaches the TLS send path as an out-of-bounds memory copy. Wiz confirmed remote code execution with an ASLR bypass on the official 1.31.7 and 1.31.8 builds, over TLS on 64-bit systems.

CVE-2026-123633 is harder to hit: an HTTP/2 connection stays on NGINX's list of "reusable" connections while it is processing a request. If NGINX needs to open an upstream connection and is short of slots, it closes that connection and frees its memory while the request is still in flight. That is why it mostly affects NGINX as a reverse proxy under load.

Wiz and four other teams (Ikotas Labs, Metnir, Rapid7 and Xint) found the bugs independently. Wiz says it used its own AI analysis harness to find them, the same pattern as Java4Shell in OpenJDK: memory bugs that sat unnoticed for years and that models are now helping to surface.

The other eight

The same release fixes a use-after-free in HTTP/3 (CVE-2026-121810, exploitable with HTTP/3 as a proxy), another in the resolver when the attacker controls the upstream hostname (CVE-2026-123634), another in the mail proxy with auth_http (CVE-2026-113425), an infinite loop while reading the request body over TLS 1.3 (CVE-2026-118899), and four lesser bugs in try_files with alias, PROXY protocol v2, ssl_preread and SNI-based client certificate validation in the stream module. Every version up to 1.31.8 is hit by at least one of them.

The caveat that matters is severity. The nginx.org advisory rates CVE-2026-123007 as major and CVE-2026-123633 as medium, while Wiz gives both a 9.2. If your patching process prioritises by the vendor's label, it may push this to the next window. With a working exploit already demonstrated, don't let it.

How to upgrade

With the official Docker image, pin the fixed version and redeploy:

bash
docker pull nginx:1.30.7      # stable branch
docker pull nginx:1.31.9      # mainline branch

With the nginx.org packages, upgrade from their repository:

bash
# Debian / Ubuntu
sudo apt update && sudo apt install nginx
# RHEL and derivatives
sudo yum install nginx

For NGINX Plus the fixed releases are 37.0.8.1 and 37.3.0.1 (or 37.0.7.1 and 37.2.0.1 if only CVE-2026-123633 applies to you).

If you can't upgrade right away, Wiz recommends turning HTTP/2 off for now: http2 off; in the affected server blocks (NGINX 1.25.1 or later) and remove http2 from your listen directives. Then reload and make sure the old workers have exited, since they are the ones still running the vulnerable code.

Checklist before you call it done

  • Find everything that runs NGINX, not just edge proxies: container base images, sidecars and appliances that bundle it.
  • Check the version with nginx -v and look for HTTP/2 in the effective config with nginx -T | grep -E 'http2|listen'.
  • Validate the config with nginx -t before reloading.
  • After rollout, check that no worker processes from the old version are left.
  • Watch for unexpected worker crashes or processes spawned by NGINX. Wiz lists them as general warning signs rather than confirmed indicators. For CVE-2026-123007, a long-lived HTTP/2 connection sending lots of WINDOW_UPDATE frames is the pattern to look for.

According to Wiz, a CDN or WAF terminating HTTP/2 in front of NGINX may blunt part of the attack, depending on the implementation. It is not a reason to delay the upgrade.

Sources

Jorge Turbica

Software Engineer and SRE. I write about the real challenges I run into in production.

See portfolio ↗