Back to all posts
Tutorial
9 min read

Nginx HTTP/2 RCE: How to Check and Patch

DevToolLab Team

DevToolLab Team

November 19, 2026

Nginx HTTP/2 RCE: How to Check and Patch

To fix the Nginx HTTP/2 remote code execution bugs, CVE-2026-123007 and CVE-2026-123633, upgrade to Nginx 1.31.9 or 1.30.7, or to your Linux distribution's patched package, then reload. Both bugs need HTTP/2 turned on. If you cannot patch today, set http2 off; and remove http2 from every listen line on the port, because the old listen parameter keeps HTTP/2 on.

Nginx sits in front of code that is not Nginx: Node and Python APIs, static sites, Kubernetes ingress. A flaw in it reaches all of them no matter how careful the application is, and distribution packages hide the fix behind an old version number. The nginx.org security advisories page published both fixes on November 18, 2026, and lists every release from 1.9.5, shipped in September 2015, through 1.31.8 as vulnerable to CVE-2026-123007.

The nginx.org security advisories page listing the HTTP/2 flow control memory corruption (CVE-2026-123007, severity major) and the HTTP/2 use-after-free (CVE-2026-123633), both fixed in 1.31.9 and 1.30.7
The nginx.org security advisories page listing the HTTP/2 flow control memory corruption (CVE-2026-123007, severity major) and the HTTP/2 use-after-free (CVE-2026-123633), both fixed in 1.31.9 and 1.30.7

The example through this post is api.example.com: a Node.js API behind Nginx on an Ubuntu 24.04 EC2 instance in us-east-1, with HTTP/2 on for its TLS listener.

What the Two HTTP/2 Bugs Do Inside a Worker

Both are memory-safety bugs in Nginx's HTTP/2 code, and neither needs a login. Wiz Research's write-up describes CVE-2026-123007 as an integer underflow in HTTP/2 flow-control accounting that leads to an invalid memory copy, and Wiz demonstrated code execution on a server that only served static files. CVE-2026-123633 is a use-after-free: an HTTP/2 connection stays on Nginx's list of connections it may close while a request on it is still running, and when a worker runs short of worker_connections while opening a backend connection, it frees the connection under that request. That one needs Nginx to proxy, which is exactly what api.example.com does.

F5, which maintains Nginx, scores both 9.2 (Critical) under CVSS 4.0 and 8.1 (High) under CVSS 3.1 in the NVD record, while nginx.org's own page rates CVE-2026-123007 "major" and CVE-2026-123633 "medium". The Xint researchers who also reported the bugs went further in their nginx2root write-up: they chained CVE-2026-123007 with an unpatched Linux kernel flaw in SCTP and got root on the host, including from inside a Docker container. Wiz says it built working exploits and is not releasing them, and neither CVE was on CISA's Known Exploited Vulnerabilities list on November 19, 2026.

The Fastest Way to See If a Site Speaks HTTP/2

Paste the hostname into the HTTP/2 Checker. It negotiates TLS with the server and reports whether it agreed to h2, plus the server header when the site sends one. A "no" means these two CVEs cannot reach that listener. Behind a CDN, the checker talks to the CDN, not your Nginx, so test the origin hostname too, and it cannot see a backported fix, so the server-side checks below still apply.

Check the Nginx Version That Actually Runs

On a distribution package, nginx -v is not the answer. Ubuntu fixed both bugs in the 24.04 package 1.24.0-2ubuntu7.20, and a fully patched api.example.com still prints the old upstream number. This ran in an Ubuntu 24.04 container after the upgrade:

Bash
$ nginx -v
nginx version: nginx/1.24.0 (Ubuntu)
$ dpkg-query -W nginx
nginx	1.24.0-2ubuntu7.20
$ zgrep CVE-2026-123007 /usr/share/doc/nginx/changelog.Debian.gz
    - debian/patches/CVE-2026-123007.patch: Account for queued frames when
    - CVE-2026-123007

The package version is what moves, so compare it with your distribution's tracker; rpm -q nginx is the RHEL-family equivalent. Official Docker images and source builds carry the upstream number, so there nginx -v is accurate. Anything from 1.9.5 through 1.31.8 is vulnerable to CVE-2026-123007, 1.19.7 through 1.31.8 to CVE-2026-123633, and 1.30.7 and 1.31.9 are fixed. Here is a test container on the last vulnerable mainline image:

Bash
$ docker exec web nginx -v
nginx version: nginx/1.31.8

Check Whether HTTP/2 Is Turned On

Dump the configuration Nginx actually loaded and look for http2 in both of its forms: the http2 on; directive from Nginx 1.25.1 and later, and the older http2 parameter on a listen line. On the test container, a copy of api.example.com's server block:

Bash
$ docker exec web nginx -T 2>/dev/null | grep -nE 'http2|listen'
138:    listen 443 ssl;
139:    http2 on;

Then ask the running server what it negotiates. curl's %{http_version} prints 2 when the connection used HTTP/2 (-k is only there because the test certificate is self-signed):

Bash
$ curl -sk --http2 -o /dev/null -w '%{http_version}\n' https://localhost:8443/
2

Read every listen line on the port, not just your site's file. One server block with the old listen 443 ssl http2; keeps HTTP/2 on for every site sharing port 443: in our test, api.example.com had http2 off; in its own block and still negotiated HTTP/2 because a neighboring www block used the old parameter. With that neighbor switched to http2 on;, api.example.com dropped to HTTP/1.1.

Patch Ubuntu and Debian With apt

Ubuntu already ships the fix for every supported release, per Ubuntu's CVE-2026-123007 page, which rates it High priority. The same package versions fix CVE-2026-123633. Checked November 19, 2026:

Ubuntu releaseFixed nginx package
26.04 LTS (resolute)1.28.3-2ubuntu1.13
24.04 LTS (noble)1.24.0-2ubuntu7.20
22.04 LTS (jammy)1.18.0-6ubuntu14.23
20.04 LTS (focal)1.18.0-0ubuntu1.7+esm5 (Ubuntu Pro)
Ubuntu's CVE-2026-123007 page showing a publication date of November 18, 2026, Ubuntu priority High, a CVSS 3 score of 8.1 and F5's description of the HTTP/2 flow control flaw
Ubuntu's CVE-2026-123007 page showing a publication date of November 18, 2026, Ubuntu priority High, a CVSS 3 score of 8.1 and F5's description of the HTTP/2 flow control flaw

On api.example.com the whole patch was an upgrade and a reload. This ran on a container that started on the vulnerable 1.24.0-2ubuntu7 package:

Bash
$ sudo apt update && sudo apt install --only-upgrade nginx
# (apt output trimmed)
$ sudo nginx -t && sudo nginx -s reload
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
2026/11/19 11:29:47 [notice] 968#968: signal process started
$ dpkg-query -W nginx
nginx	1.24.0-2ubuntu7.20

Debian is behind. Its security tracker still listed bookworm (1.22.1-9+deb12u10) and trixie (1.26.3-3+deb13u10) as vulnerable on November 19, 2026, with only unstable fixed. Until a Debian advisory lands, turn HTTP/2 off as shown below, or install the fixed build from nginx.org's own repository using its Linux packages instructions. This ran on a clean Debian 12 container:

Bash
sudo apt install curl gnupg2 ca-certificates lsb-release debian-archive-keyring
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
  | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
https://nginx.org/packages/debian `lsb_release -cs` nginx" \
  | sudo tee /etc/apt/sources.list.d/nginx.list
printf "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
  | sudo tee /etc/apt/preferences.d/99nginx
sudo apt update && sudo apt install nginx
nginx -v
# nginx version: nginx/1.30.7

Mind the config layout before you switch a live server. The nginx.org package's nginx.conf only includes /etc/nginx/conf.d/*.conf, not Debian's sites-enabled, so a site configured the Debian way stops loading untill you move it or add the include. Run nginx -T before the reload.

Patch Docker Images by Rebuilding

Official images carry the upstream number, so the fix is a tag change. Docker Hub's nginx image had 1.31.9 (mainline) on November 18 and 1.30.7 (stable) early on November 19, 2026. Pin FROM nginx:1.31.9-alpine or FROM nginx:1.30.7 instead of latest, rebuild and redeploy; restarting a container from the old image changes nothing. The same check as before then shows the fixed build:

Bash
$ docker exec web nginx -v
nginx version: nginx/1.31.9

Patch RHEL, AlmaLinux and Rocky Linux

Red Hat's CVE page rates CVE-2026-123007 Critical and listed RHEL 8, 9 and 10 as affected with no fixed package on November 19, 2026. AlmaLinux and Rocky Linux rebuild Red Hat's sources, so they usually follow its timing. Until then, nginx.org's RHEL 9 repository already carries nginx-1.30.7-1.el9.ngx, set up through the same Linux packages page, or turn HTTP/2 off.

Kubernetes: ingress-nginx Will Not Get a Fix

The community ingress-nginx controller is retired: its repository is archived, best-effort maintenance ended in March 2026, and its last release, controller v1.15.1 on March 19, 2026, builds Nginx 1.27.1, inside both vulnerable ranges. Its use-http2 ConfigMap option defaults to "true", and every Ingress proxies to a backend, so a default install meets the conditions for both CVEs. Set use-http2: "false" in the controller's ConfigMap now, then plan the move the project itself recommends, to a Gateway API implementation.

If You Cannot Patch Today

Turning HTTP/2 off blocks both CVEs. Set http2 off; in each affected server block, remove http2 from every listen line on the port, then test and reload. On the test container running 1.31.8:

Bash
$ docker exec web nginx -t && docker exec web nginx -s reload
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
2026/11/19 11:30:05 [notice] 55#55: signal process started
$ curl -sk --http2 -o /dev/null -w '%{http_version}\n' https://localhost:8443/
1.1

The trap is the old parameter. With listen 443 ssl http2; and http2 off; in the same block, nginx -t passed with only a deprecation warning and the server kept negotiating HTTP/2:

Bash
$ docker exec web nginx -t
2026/11/19 11:30:07 [warn] 69#69: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/default.conf:2
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/default.conf:2
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
$ curl -sk --http2 -o /dev/null -w '%{http_version}\n' https://localhost:8443/
2

After the reload, check that no old workers linger: ps -o pid,args | grep 'nginx:' should show no worker process is shutting down lines. Wiz's advice is to turn HTTP/2 back on once the upgrade is in. For the kernel half of Xint's chain, hosts that do not use SCTP can put install sctp /bin/false in a .conf file under /etc/modprobe.d/, which stops modprobe loading the module but does not unload one already loaded.

Common Errors and Warning Signs

the "listen ... http2" directive is deprecated. This nginx -t warning means a listen line still turns HTTP/2 on. On a server you think is mitigated, it means the mitigation is not active yet.

worker process 82 exited on signal 11. A worker segfault, logged as an [alert] in the error log. F5's own description says CVE-2026-123007 is "typically followed by an NGINX worker segmentation fault", so a crash like that which occured on an unpatched server deserves a look. Wiz treats crashes as warning signs, not confirmed indicators.

nginx/1.24.0 (Ubuntu) in a scanner report. A scanner that reads only the server header will flag a patched Ubuntu or Debian build. Check the package version against the tracker before opening an incident.

When Not to Rely on This

Turning HTTP/2 off covers these two CVEs only. The same November 18 release fixed eight more, and Xint's table lists three that it does not block: CVE-2026-121810 (HTTP/3 when proxying), CVE-2026-123634 (the resolver directive with request-derived upstream names) and CVE-2026-113425 (the mail proxy with auth_http). The upgrade is the fix; everything else buys time.

Conclusion

For api.example.com the fix was one apt upgrade, confirmed with dpkg-query because nginx -v still says 1.24.0. Ubuntu is patched today, Debian and RHEL were not on November 19, 2026, Docker users change a tag, and ingress-nginx users have to turn HTTP/2 off themselves because no fixed controller is coming. If you take the HTTP/2-off route, read the nginx -T output for every listen line on the port, because one leftover http2 parameter keeps the whole port on HTTP/2.

  • HTTP/2 Checker - confirm whether a hostname negotiates h2 before and after you turn HTTP/2 off.
  • Nginx Config Generator - build a clean server block with the http2 directive instead of the deprecated listen parameter.
  • HTTP Response Headers Checker - see whether your server header gives away the Nginx version to every scanner.
  • Port Checker - find out whether an origin's port 443 is reachable from the internet, which decides how urgent the patch is.

Related Posts

How to Flush DNS on Mac, Windows, Linux

Run ipconfig /flushdns on Windows, dscacheutil and killall -HUP mDNSResponder on macOS, resolvectl flush-caches on Linux, and learn which cache you can't clear.

By DevToolLab Team•

OpenSSH 10.6p2: Check and Patch Alpine

OpenSSH 10.6p2 fixes a password login bypass on Linux systems without PAM, Alpine included. Check your host, set PasswordAuthentication no, then upgrade.

By DevToolLab Team•

CVE-2026-98432: Check and Patch Linux

CVE-2026-98432 lets a remote peer corrupt Linux kernel memory in the TCP handshake. Check your kernel, patch and reboot, or drop IPv4 options until you can.

By DevToolLab Team•