The nginx2root bugs went public on 18 November 2026. Like most people I thought "fine, I'll just upgrade nginx." Then I looked at my server.
It runs Ubuntu's packaged nginx, and on Ubuntu "just upgrade" wasn't an option yet. This post covers what I did instead on 20 November. I checked whether I was exposed, turned off the vulnerable features, nearly panicked over a Cloudflare false alarm, and blocked the kernel module that turns a compromised worker into root.
Update, 21 November 2026: the fix is out. Ubuntu published USN-9159-1 on 19 November, covering all five nginx2root CVEs. On 26.04 LTS the fixed version is
1.28.3-2ubuntu1.13. If that's available to you, skip to the update section: upgrade, restart, and re-enable HTTP/2. The mitigation steps are still useful if you're on a distro without a fix yet, can't upgrade straight away, or just want to know what was exposed.
What nginx2root is (the short version)
My primary source is Cloudflare's write-up: nginx2root. Read it. The summary:
- nginx2root is five memory-corruption bugs in nginx: four use-after-free bugs and one integer overflow in HTTP/2 flow control. An unauthenticated attacker can crash a worker or, according to Xint's research, run code as the worker.
- Xint also found a separate use-after-free in the Linux kernel's SCTP code that can turn that foothold into root.
| CVE | Affected configuration | First affected release |
|---|---|---|
| CVE-2026-123007 | HTTP/2 enabled | 1.9.5 |
| CVE-2026-123633 | HTTP/2 with proxy_pass, worker low on worker_connections
|
1.19.7 |
| CVE-2026-121810 | HTTP/3 (QUIC) with proxy_pass
|
1.25.0 |
| CVE-2026-123634 |
resolver + proxy_pass with variables + a mirror or SSI subrequest |
0.6.18 |
| CVE-2026-113425 | Mail proxy with proxy on and auth_http
|
0.5.33 |
Fixed upstream releases are nginx Open Source 1.30.7 or 1.31.9, and nginx Plus 37.0.8.1 or 37.3.0.1.
The one that matters for most of us is the first row. CVE-2026-123007 needs nothing more than HTTP/2 being on. If you serve HTTPS from nginx and switched on HTTP/2 years ago because every performance guide said to, you're in scope.
Why I couldn't "just upgrade"
My server runs the nginx package from Ubuntu 26.04 LTS:
$ nginx -v
nginx version: nginx/1.28.3
That doesn't tell you much, for two reasons:
-
Ubuntu backports security fixes without changing the upstream version number. A patched Ubuntu nginx will still say 1.28.3.
nginx -vcan't tell you whether you're patched; the package revision and changelog can. - There was no fixed package at the time. As of 18 November 2026, Canonical's and Debian's security trackers listed every supported release as vulnerable.
I could have switched to the nginx.org packages, but that's a bigger change than I wanted to make in a hurry on a server that otherwise just works. So the plan was to mitigate now and upgrade as soon as Ubuntu shipped a fix.
Here's how to check where your own server stands:
# Refresh package lists, then compare "Installed" with "Candidate"
sudo apt update && apt-cache policy nginx
# Show the exact installed revisions of every nginx package
dpkg-query -W 'nginx*'
# Does the *candidate* version's changelog mention the fix? (see the warning below)
apt changelog nginx 2>/dev/null | grep -E 'CVE-2026-12(3007|3633)'
Careful with that last one. apt changelog downloads the changelog of the version apt would install, not the one you have. A match means a fixed package is available, not that you're running it. I nearly misread it this way myself once the fix shipped. To know whether you're patched, compare the installed version with the fixed version listed in the Ubuntu notice for your release:
# 26.04 LTS example: prints "patched" only if the installed nginx is the fixed version or newer
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' nginx)" ge 1.28.3-2ubuntu1.13 \
&& echo patched || echo "NOT patched"
When I did this on 20 November I didn't have a fixed package yet, so I moved on to mitigation.
Step 1: Find where HTTP/2 and HTTP/3 are enabled
Don't just grep /etc/nginx. nginx -T dumps the full configuration nginx actually loads, with every included file, so you see the real picture. This awk prints each match along with the file it came from:
# List every listen line with http2/quic, and every "http2 on" / "http3 on", with its source file
sudo nginx -T 2>/dev/null | awk '
/^# configuration file/ { f = $4 }
/^[[:space:]]*(listen[^#;]*[[:space:]](http2|quic)|http[23][[:space:]]+on)/ { print f, $0 }'
A quicker alternative that greps the files directly:
# Find HTTP/2 enabled on listen lines or via the http2 directive
grep -rnE '^\s*(listen\b[^#;]*\bhttp2\b|http2\s+on\b)' /etc/nginx/
HTTP/2 can be switched on in two ways, so you need to look for both:
-
listen 443 ssl http2;is the older style. It has been deprecated since 1.25.1, but it still works on 1.28. -
http2 on;is the newer directive (1.25.1+). It's off by default, so it only matters if you set it.
Step 2: Turn HTTP/2 off
I did two things:
-
Removed
http2from everylistenline. Alisten ... http2still turns HTTP/2 on even ifhttp2 off;is set elsewhere, so this part isn't optional. -
Added
http2 off;to thehttp { }block in the mainnginx.conf.
One more thing: a server block with its own http2 on; overrides the http-level setting. If step 1 found any of those, change them to off or delete them.
# Back up the whole config first
sudo cp -a /etc/nginx /etc/nginx.bak-$(date +%F)
# Strip " http2" from every listen line that has it
sudo grep -rlE '^\s*listen\b[^#;]*\bhttp2\b' /etc/nginx/ \
| xargs -r sudo sed -i -E '/^\s*listen\b/ s/\s+http2\b//'
# Test the config, then restart (not reload) so existing HTTP/2 connections close
sudo nginx -t && sudo systemctl restart nginx
Then run the step 1 command again. It should print nothing.
Step 3: Verify it (and the Cloudflare false alarm)
My first check went against my public hostname:
$ curl -s -o /dev/null --http2-prior-knowledge -w '%{http_version}\n' https://www.alessiomichelini.com/
2
Still HTTP/2? I had a brief panic. Then I checked who was actually answering:
$ curl -sI https://www.alessiomichelini.com/ | grep -iE '^(server|cf-ray)'
server: cloudflare
cf-ray: a5db45a6cf2ffea0-AMS
The site is proxied by Cloudflare, so that 2 came from Cloudflare's edge, not from my nginx. Visitors talk HTTP/2 to Cloudflare, and Cloudflare opens its own connection to my origin.
To test the origin itself, run curl on the server with --resolve. That sends the request to localhost but keeps the right hostname for SNI and the certificate:
# Ask the local nginx directly, offering HTTP/2 via ALPN
$ curl -sk -o /dev/null --http2 -w '%{http_version}\n' \
--resolve www.alessiomichelini.com:443:127.0.0.1 https://www.alessiomichelini.com/
1.1
The origin only speaks HTTP/1.1 now, so it's mitigated, and visitors still get HTTP/2 from Cloudflare.
Being behind Cloudflare is a real layer of protection here, with caveats. The Cloudflare post explains that the HTTP/2 and HTTP/3 attacks don't reach nginx when your origin is only reachable through Cloudflare (Tunnel, IP allowlisting, or Authenticated Origin Pulls). It still recommends patching. It also says the proxy doesn't protect you from the mail proxy bug or the resolver bug, or on DNS-only (grey-cloud) hostnames. And if anyone can connect to your origin IP directly, none of that protection applies.
So it's worth checking whether your origin answers directly. Run this from outside your network:
# Hit the origin IP directly, bypassing Cloudflare
curl -sk -o /dev/null -m 5 -w '%{http_code}\n' \
--resolve www.example.com:443:YOUR_SERVER_PUBLIC_IP https://www.example.com/
# timeout / 000 = only reachable via Cloudflare
Step 4: Check for the bugs that don't need HTTP/2
Turning off HTTP/2 covers CVE-2026-123007 and CVE-2026-123633. The other three depend on other features, so look for those too:
# HTTP/3 (QUIC) listeners or "http3 on" (CVE-2026-121810)
sudo nginx -T 2>/dev/null | grep -nE '^\s*(listen\b[^#;]*\bquic\b|http3\s+on\b)'
# Ingredients for CVE-2026-123634: resolver, mirror, SSI
sudo nginx -T 2>/dev/null | grep -nE '^\s*(resolver|mirror|ssi on)\b'
If you find any, Cloudflare's suggested mitigations are:
-
HTTP/3: remove the QUIC listeners or set
http3 off;. -
resolver + variable
proxy_pass+mirror/SSI: pointproxy_passat fixed upstream groups. -
Mail proxy: bind mail listeners to trusted networks. This only matters if you actually have a
mail { }block.
Neither command found anything on my server.
Step 5: Block the SCTP kernel module (the step to root)
This is the step people skip, and it's cheap. The nginx bugs give an attacker code execution as the nginx worker. The SCTP kernel bug is what turns that into root. If you don't use SCTP (and almost nobody running a web server does), stop the module from loading.
The rule has to go in a file under /etc/modprobe.d/ whose name ends in .conf (any name works):
# Make any attempt to load sctp run /bin/false instead
echo 'install sctp /bin/false' | sudo tee /etc/modprobe.d/disable-sctp.conf
Then verify it. Here's my real output:
$ modprobe -n -v sctp
insmod /lib/modules/7.0.0-44-generic/kernel/net/ipv4/udp_tunnel.ko.zst
insmod /lib/modules/7.0.0-44-generic/kernel/net/ipv6/ip6_udp_tunnel.ko.zst
install /bin/false
$ lsmod | grep sctp
$
How to read that:
-
install /bin/falsemeans the rule is active. - The
insmodlines are SCTP's helper dependencies.-nis a dry run, so nothing was actually loaded, and those lines are harmless. - Empty
lsmodoutput means SCTP isn't loaded right now, so no reboot is needed. If it is loaded, the rule won't unload it: runsudo modprobe -r sctpor reboot.
Cloudflare's post also notes that this stopgap doesn't help if SCTP is built into the kernel instead of being a module. The real fix is your distribution's kernel update once it ships.
Gotchas worth knowing
These are the things that would have caught me out:
-
nginx -vlies (sort of) on Ubuntu. Distro backports keep the upstream version number. Check the package revision, not the version string. -
apt changelogshows the candidate, not what's installed. A CVE match there means a fix is available. Compareapt-cache policy nginx(ordpkg --compare-versions) against the fixed version in the Ubuntu notice. -
listen ... http2still enables HTTP/2 on 1.28, even though it's deprecated. Addinghttp2 off;isn't enough; remove it from thelistenlines too. - Reload isn't enough. Restart, so existing HTTP/2 connections are closed. The same goes for the upgrade: a running nginx keeps the old binary until it restarts.
-
Behind Cloudflare, a public curl tests the edge, not your origin. Use
--resolve host:443:127.0.0.1on the server. -
--http2-prior-knowledgeis meant for plainhttp://. Forhttps://use--http2, which negotiates via ALPN. - Cloudflare only protects you if the origin isn't directly reachable. That means Tunnel, an IP allowlist, or Authenticated Origin Pulls.
- The SCTP block is cheap insurance against the nginx-worker-to-root chain. One line, no reboot if the module isn't loaded.
The Cloudflare post also suggests watching your nginx error log for worker process ... exited on signal 11 while you're unpatched, since crashing workers are the first symptom of these bugs being poked at.
Update: the fix is out, now patch properly
Ubuntu published USN-9159-1 on 19 November 2026. It fixes all five nginx2root CVEs (plus a few unrelated nginx ones). On Ubuntu 26.04 LTS the fixed version is 1.28.3-2ubuntu1.13 for nginx, nginx-core, nginx-full, nginx-light and nginx-extras. Other releases have their own version numbers, so look yours up in the notice.
The mitigation was always a stopgap, so here's how to finish the job:
# 1. Upgrade the nginx packages (skip if unattended-upgrades already did)
sudo apt update && sudo apt install --only-upgrade nginx nginx-common nginx-core
# 2. Confirm the installed version is the fixed one (26.04 example)
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' nginx)" ge 1.28.3-2ubuntu1.13 \
&& echo patched || echo "NOT patched"
# 3. Restart so the running nginx actually uses the patched binary
sudo nginx -t && sudo systemctl restart nginx
Step 3 matters even if unattended-upgrades installed the package for you. The Ubuntu notice only says a standard system update makes the necessary changes, so don't assume nginx was restarted; restart it yourself.
Once you're patched, turn HTTP/2 back on. Since I'd already stripped http2 from every listen line, the cleanest way was to flip the one directive in the http { } block of nginx.conf from http2 off; to http2 on;, then restart and rerun the origin check from the verify step:
# Should now print 2 again: the origin speaks HTTP/2
curl -sk -o /dev/null --http2 -w '%{http_version}\n' \
--resolve www.alessiomichelini.com:443:127.0.0.1 https://www.alessiomichelini.com/
Keep the SCTP block. It works around the kernel bug, which an nginx update doesn't touch. Leave /etc/modprobe.d/disable-sctp.conf in place until you've rebooted into a kernel that fixes it (and if you never use SCTP, there's no harm in keeping it for good).
Checklist
Copy this into your notes or ticket.
If a fixed package is available:
- [ ] `apt-cache policy nginx`: Installed = the fixed version for your release (26.04: 1.28.3-2ubuntu1.13)
- [ ] `nginx -t && systemctl restart nginx` after the upgrade
- [ ] HTTP/2 re-enabled if you'd turned it off; origin test with `--resolve ...127.0.0.1` prints `2`
- [ ] `/etc/modprobe.d/disable-sctp.conf` in place until a fixed kernel is installed and booted
If you can't patch yet:
- [ ] `nginx -T` grep shows no `http2` / `quic` / `http2 on` / `http3 on`
- [ ] `http2 off;` in `http { }`, `http2` removed from all `listen` lines
- [ ] `nginx -t && systemctl restart nginx`
- [ ] Origin test with `--resolve ...127.0.0.1` prints `1.1`
- [ ] Origin not reachable directly (if behind a CDN)
- [ ] No risky `resolver` + variable `proxy_pass` + `mirror`/SSI combo
- [ ] `/etc/modprobe.d/disable-sctp.conf` in place; `lsmod | grep sctp` empty
- [ ] Check the installed version (not `apt changelog`) against your distro's notice, then upgrade, restart and re-enable HTTP/2
If you're on a distro nginx that still has no fixed package, I hope the mitigation steps save you some time. If you're on Ubuntu, upgrade and restart today.
Top comments (0)