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.
Status note: everything here is as of 20–21 November 2026. Before you follow it, check whether Ubuntu has shipped a fixed nginx package since then (there's a one-liner for that below). If it has, upgrade instead. That's the real fix.
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. 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 ships a fix.
Here's how to check where your own server stands:
# Show the exact installed package revisions (not just the upstream version)
dpkg-query -W nginx nginx-common
# Refresh package lists and see if an nginx update is waiting
sudo apt update && apt list --upgradable 2>/dev/null | grep nginx
# Look for the CVE IDs in the package changelog: empty output = not fixed yet
apt changelog nginx 2>/dev/null | grep -E 'CVE-2026-12(3007|3633)'
On my server the changelog didn't mention the CVEs 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. Checkapt changelog, not the version string. -
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.
-
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.
What's left
This is a mitigation, not a fix. I'm watching apt changelog nginx for the CVE IDs. Once Ubuntu ships the patched package, I'll upgrade, restart nginx, and turn HTTP/2 back on. The Cloudflare post also suggests watching your nginx error log for worker process ... exited on signal 11 in the meantime, since crashing workers are the first symptom of these bugs being poked at.
Checklist
Copy this into your notes or ticket:
- [ ] `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
- [ ] Watch `apt changelog nginx` for the fix, then upgrade and re-enable HTTP/2
If you're in the same position as me, on a distro nginx with no fixed package yet, I hope this saves you some time. And if Ubuntu has shipped the fix by the time you read this, ignore most of it and run apt upgrade.
Top comments (0)