Internet & Files 15 min read Hard 7 steps

How to Check and Patch NGINX2Root (CVE-2026-123007)

Check whether your nginx is exposed to NGINX2Root, stop the bugs today, and patch packages, Docker containers, and source builds with modules without downtime.

Published · Last updated
Close-up of a terminal on a dark screen showing the prompt ubuntu@ubuntu:~$ with the word sudo typed after it

When you finish, every nginx you run is on a fixed release, whether it came from a package, a container, or your own build with extra modules, and you know which of the five NGINX2Root bugs could reach it. Source builds are the hard case, and step 7 swaps the running program without dropping a request.

On November 18, 2026, nginx fixed five memory bugs that researchers grouped as NGINX2Root. The main one, CVE-2026-123007, sits in HTTP/2 handling and affects every release since 1.9.5 from 2015. All five are rated 8.1 out of 10 in CVSS 3.1, and the fix is nginx 1.30.7 or 1.31.9. Censys counted about 8.8 million nginx servers that could be exposed.

We tested the source rebuild, the live swap, the HTTP/2 stopgap, and the Docker update on Ubuntu 24.04 with systemd and Docker Desktop in November 2026, upgrading 1.31.8 to 1.31.9 and 1.30.6 to 1.30.7. The package update and checks in step 4 were run on Ubuntu 24.04, from its vulnerable package to the fixed one. The other distributions' versions and the stopgaps for HTTP/3, the resolver, and mail follow the vendors' and Xint's instructions as of November 19, 2026.

What you’ll need

SSH access to the server with sudo The output of nginx -v and nginx -V For source builds: the source folders of any third-party modules A backup of /etc/nginx or your nginx conf folder

1

Find out how nginx was installed and which version runs

On the server, run:nginx -v dpkg -S "$(command -v nginx)" # Debian and Ubuntu rpm -qf "$(command -v nginx)" # RHEL, Rocky, Alma, Amazon Linux docker ps --format '{{.Names}} {{.Image}}'The answers sort you into one of three patch routes. If dpkg or rpm names a package, nginx came from your distribution or from the nginx.org repository, and you patch it in step 4. If dpkg answers no path found and rpm says the file is not owned by any package, nginx was compiled from source, under /usr/local/nginx unless the build set another prefix, and you patch it in steps 6 and 7. If the server runs nginx inside containers, every container counts as its own install, and you patch them in step 5. According to the nginx security advisories, the fixed releases are 1.30.7 (stable) and 1.31.9 (mainline). Every 1.31 release before 1.31.9 and every release before 1.30.7 is vulnerable to at least one of the five bugs, and no older branch gets a fix. Do not trust nginx -v on a distribution package. Distributions copy the fix into their old version and keep the old version number. Ubuntu 24.04's patched package still prints nginx version: nginx/1.24.0 (Ubuntu), the same line as the vulnerable one. For a package, the full package version decides, and step 4 shows how to check it.

2

Check which of the five vulnerable features your configuration turns on

Each of the five bugs lives in one part of nginx, and a server is only exposed through the parts it uses. Print the full configuration nginx is running with, including every included file, and search it:sudo nginx -T | grep -nE 'http2|http3|quic|resolver|mirror|ssi|mail|auth_http'Read the hits against this list. http2 on; or http2 on a listen line means HTTP/2 is on, which exposes CVE-2026-123007 (the main one) and CVE-2026-123633. quic on a listen line or http3 on; exposes CVE-2026-121810. A resolver line combined with a proxy_pass whose address contains a variable, plus ssi on or mirror, exposes CVE-2026-123634. A mail block with auth_http exposes CVE-2026-113425. A source build can only use what was compiled in. Check for the HTTP/2 module with:nginx -V 2>&1 | grep -o -- '--with-http_v2_module'If that prints nothing, the build has no HTTP/2 at all, and the two HTTP/2 bugs cannot reach it. Then test from outside, against the server itself, not only its public hostname:echo | openssl s_client -connect YOUR_SERVER_IP:443 -servername your.domain -alpn h2 2>&1 | grep ALPNThe line ALPN protocol: h2 means HTTP/2 is reachable. No ALPN negotiated means it is not. Run it against the origin IP because a CDN answers for the public name. A CDN in front does not shield nginx either. Cloudflare's documentation says its HTTP/2 connection to the origin is on by default, so Cloudflare speaks HTTP/2 to any nginx that offers it.

Good to know: Patch even if every check comes back clean. The checks tell you how urgent the update is and which stopgap in step 3 applies, not whether you can skip it.

3

If you cannot patch today, turn off the vulnerable features

These stopgaps come from Xint's write-up, the researchers who reported the bugs, and match Red Hat's bulletin. Each one closes only its own bugs. Turning off HTTP/2 blocks CVE-2026-123007 and CVE-2026-123633 and leaves the other three open. HTTP/2. On nginx 1.25.1 and newer, set http2 off; in every server block and remove the word http2 from every listen line, so each server block reads:listen 443 ssl; http2 off;On 1.9.5 to 1.25.0, which have no http2 directive, only remove the word http2 from the listen lines. Anything that needs HTTP/2, such as gRPC, stops working. HTTP/3. Remove the listen lines that contain quic, set http3 off;, and add add_header Alt-Svc 'clear' always; so browsers stop trying HTTP/3. Then sudo ss -lunp 'sport = :443' must not list nginx. Resolver. Replace a proxy_pass that contains a variable with a fixed upstream block that lists the backend's IP address, and turn off mirror and ssi in that location. Setting mirror_request_body on stops the published test exploit but does not fix the bug, Xint says, so do not rely on it. Mail. Remove the mail block, or bind its listeners to the loopback address, for example listen 127.0.0.1:143;. Apply the change with:sudo nginx -t && sudo systemctl reload nginxThe test line must end in test is successful before the reload runs. Then repeat the ALPN check from step 2. With HTTP/2 off, it prints No ALPN negotiated instead of ALPN protocol: h2, and clients connect over HTTP/1.1. If ps -ef | grep nginx still shows workers marked worker process is shutting down a few minutes later, old connections are still open under the old settings. Run sudo systemctl restart nginx to end them.

4

Update a distribution package and check the changelog for the fix

On Debian and Ubuntu, list every installed nginx package and update all of them together, because modules and the shared files come in their own packages:sudo apt update dpkg -l | awk '/^ii/ && /nginx/ {print $2, $3}' sudo apt install --only-upgrade $(dpkg -l | awk '/^ii/ && /nginx/ {print $2}')Then confirm the fix from the changelog file that the installed package put on disk:zgrep -c CVE-2026-123007 /usr/share/doc/nginx/changelog.Debian.gzAny number above 0 means the installed package carries the fix, and 0 means it does not. On Ubuntu 24.04 the fixed package is 1.24.0-2ubuntu7.20, which returns 2. Its changelog lists patches for CVE-2026-123007, CVE-2026-123633, CVE-2026-123634, CVE-2026-113425, and CVE-2026-118899. It has no HTTP/3 patch because nginx 1.24 predates HTTP/3. Do not use apt-get changelog nginx for this check. While an update is waiting, it downloads the changelog of the newest available version, not the installed one, so it lists the CVE as fixed on a server that is still vulnerable. The fixed versions, as of November 19, 2026, per the Ubuntu CVE page and the distributions' own trackers: Ubuntu 26.04: 1.28.3-2ubuntu1.13. Ubuntu 24.04: 1.24.0-2ubuntu7.20. Ubuntu 22.04: 1.18.0-6ubuntu14.23. Ubuntu 20.04 and older get the fix through Ubuntu Pro. Debian 13: 1.26.3-3+deb13u11. Debian 12 is still listed as vulnerable with no fixed package. RHEL 8, 9, and 10: Red Hat lists them as affected and says fixes are coming. No fixed package was out on November 19. Alpine 3.24: 1.30.7-r0. Alpine 3.22 and 3.23: 1.28.3-r8. Amazon Linux 2023: advisory ALAS2023-2026-3494. On RHEL-family systems, compare rpm -q nginx with the version in your vendor's advisory once it is out. If your distribution has no fix yet, apply step 3 now and check again daily, or move to the nginx.org repository. On November 19 it already served 1.30.7 for Ubuntu 24.04, Debian 12, and RHEL 9, and 1.31.9 in its mainline repository. Installing from nginx.org replaces your distribution's nginx package, so back up /etc/nginx first. Last, confirm that the running nginx is the new one:ps -o pid,lstart,cmd -C nginxThe start time on the master process must be later than the upgrade. Ubuntu 24.04's package restarts nginx during the upgrade, so there the master shows a new process ID and start time. If the time is older than the upgrade, run sudo systemctl restart nginx, because a reload does not replace the running program.

5

Recreate Docker containers on a patched nginx image

In the official image, the tags stable, 1.30, and 1.30.7 point to 1.30.7, and mainline, latest, 1.31, and 1.31.9 point to 1.31.9, with -alpine variants of each. Pin an exact version in your compose file, so the file itself shows which release runs:image: nginx:1.30.7-alpineThen pull and recreate:docker compose pull docker compose up -d docker compose exec web nginx -vReplace web with your service name. The last line must print 1.30.7 or 1.31.9. Do not use docker compose restart for this. Restart reuses the existing container, so even after the pull it keeps printing the old version. Only up -d recreates the container on the new image. To check every running container on a host at once:for c in $(docker ps -q); do docker inspect -f '{{.Name}}' "$c"; docker exec "$c" nginx -v; doneContainers without nginx answer with an executable not found error, which you can ignore. If you build your own image FROM nginx, rebuild it with docker build --pull so Docker fetches the patched base image instead of reusing the cached one. The rootless image has moved. nginxinc/nginx-unprivileged is archived and stops at 1.31.7, so switch to nginx/nginx-unprivileged, which has 1.31.9. On Kubernetes, F5's NGINX Ingress Controller 5.8.0 and NGINX Gateway Fabric 2.9.0 ship 1.31.9. The community ingress-nginx controller was archived in March 2026 and will not get this fix, so migrate off it.

6

Rebuild a source build with the same options and modules

Download the fixed release and its signature, import the nginx developers' keys, and check the signature before you build:mkdir -p ~/nginx-build && cd ~/nginx-build wget https://nginx.org/download/nginx-1.30.7.tar.gz wget https://nginx.org/download/nginx-1.30.7.tar.gz.asc for k in arut pluknet sb thresh; do wget -q https://nginx.org/keys/$k.key; gpg --import $k.key; done gpg --verify nginx-1.30.7.tar.gz.asc nginx-1.30.7.tar.gzLook for Good signature. The November 18 tarballs are signed by Sergey Kandaurov's key, fingerprint D678 6CE3 03D9 A902 2998 DC6C C846 4D54 9AF7 5C0A. Use 1.31.9 in the same commands if you run mainline. Your running nginx remembers how it was built. Save that line and reuse it:/usr/local/nginx/sbin/nginx -V 2>&1 | sed -n 's/^configure arguments: //p' | tee configure-args.txtUnpack the new release and put your third-party modules where the saved arguments expect them. If the old build used --add-module=./headers-more-nginx-module-master, the folder must sit inside the new nginx source folder under the same name. Download fresh module source instead of copying the old folder. headers-more released v0.42 on November 19 with a fix for newer nginx versions. Then build, using the saved arguments:tar xzf nginx-1.30.7.tar.gz cd nginx-1.30.7 # unpack your modules here, same folder names as before eval ./configure $(cat ../configure-args.txt) makeWhen the build finishes, run objs/nginx -V. Its configure arguments must match configure-args.txt line for line. Dynamic modules, loaded with load_module, must be rebuilt for the exact new version. A module built for 1.31.8 stops a 1.31.9 server from starting with module "...so" version 1031008 instead of 1031009. Build them with --with-compat --add-dynamic-module= against the new source and install the new .so files with the binary. Install the build:sudo make installIt keeps your nginx.conf as it is, moves the old program to sbin/nginx.old, and copies the new one in place. Do not copy objs/nginx over the running program with cp. Linux refuses to overwrite a running program, and cp stops with Text file busy. make install and mv both work.

Heads up: Moving from 1.30 to the 1.31 mainline brings behavior changes along with the fixes. 1.31.9 rejects header lines without a colon and chunked request bodies with too much framing overhead. If you only want the security fixes, stay on your branch and build 1.30.7.

7

Swap the running nginx for the new build without dropping a request

nginx can replace its own program while it keeps serving, using the signals in nginx's upgrade instructions. The paths below are the defaults for a source build. If your build used another --prefix or --pid-path, use the pid file named by the pid line in your nginx.conf. First check the new program against your configuration:sudo /usr/local/nginx/sbin/nginx -tThen start the new program next to the old one:sudo kill -USR2 $(cat /usr/local/nginx/logs/nginx.pid)The old master renames its pid file to nginx.pid.oldbin, and a new master starts with its own workers. Both sets now share the listening ports. To move all traffic to the new workers, stop the old ones gracefully:sudo kill -WINCH $(cat /usr/local/nginx/logs/nginx.pid.oldbin)Check the result with curl -sI http://localhost/ | grep -i server. It must show the new version, and your sites must answer normally. If you hide the version with server_tokens off, run ps -ef | grep nginx instead, and confirm that every worker belongs to the new master. Until WINCH runs, the old workers keep answering requests, so check the version only after it. If everything works, end the old master:sudo kill -QUIT $(cat /usr/local/nginx/logs/nginx.pid.oldbin)If something is wrong, roll back instead. Send kill -HUP to the old master, which starts its workers again, then kill -QUIT to the new master. The old program takes over and its pid file returns to nginx.pid. The swap works under systemd with a forking service file like the one nginx.org ships, which follows nginx through its pid file. Requests keep getting answers through the whole swap and through a rollback. When the old master quits, systemd takes the new master as the main process by itself, and systemctl status nginx shows its process ID. systemctl reload, stop, and start work normally afterwards. If you use QUIC, set quic_bpf on; first, because nginx says that is what keeps QUIC connections alive across an upgrade. The build folder also has a shortcut. After sudo make install, running sudo make upgrade tests the configuration, sends USR2, waits one second, and sends QUIT to the old master. It never checks that the new workers serve your sites before it ends the old master, and it has no rollback, so on a production server send the signals yourself.

If the server still answers with the old version in its Server header after step 7, look for a second nginx master with ps -ef | grep "nginx: master". A leftover old master means the QUIT signal went to the wrong process, so send it to the pid in nginx.pid.oldbin. If the new build fails nginx -t on a third-party module, update that module first. If no compatible version exists yet, rebuild without it and keep the stopgaps from step 3 in place until one does. If you are waiting on a distribution fix, such as Debian 12 or RHEL, check its security tracker daily and run the changelog check from step 4 after each update. The exploitation status in the FAQs below dates from November 19, 2026, so check the CISA catalog again before you treat the stopgaps as enough.

Questions we get asked about this

Answers from experience, not a textbook.

Not confirmed as of November 19, 2026. None of the five CVEs is in CISA's Known Exploited Vulnerabilities catalog, CISA's own assessment in the CVE records lists exploitation as none, and F5 says it has found no evidence of attacks. Red Hat says a proof of concept is public. The CVE records also say that running code on the server requires bypassing address randomization, which makes the attack harder but not impossible. Patch now, before that changes.

Stay on the branch you already run. 1.30.7 contains only security fixes, which makes it the smallest change for a stable server. 1.31.9 also parses some requests more strictly, as the warning in step 6 explains. If you run something older than 1.30, such as a 1.24 source build, no fix exists for your branch, so move to 1.30.7.

No. A reload rereads the configuration but keeps running the same program, so the old vulnerable code stays in memory. After a package update, restart nginx. After a source build, either restart or do the live swap in step 7.

No. Cloudflare connects to your origin over HTTP/2 by default when nginx offers it, and Cloudflare's documentation does not say that it filters these bugs. Patch the origin, and run the ALPN check from step 2 against the origin IP.

No. Xint also reported a bug in the Linux kernel's SCTP module, which it used to get from the nginx worker to root. It had no CVE and no kernel fix on November 18. Xint's stopgap is a file in /etc/modprobe.d/ containing the line install sctp /bin/false, which only stops the module from loading. It does not unload it if it is already loaded, and it does not help if SCTP is built into the kernel. Run lsmod | grep sctp to see whether it is loaded now.

Yes. The CVE records list NGINX Plus 37.0.8.1 and 37.3.0.1 as the fixed releases. The R-series releases from R33 onward have no fix listed, so move them to a fixed 37.x release.

Like this?

Get the next guide by email.

Subscribe and get new tech guides by email. Read the ones you need and skip the rest.