What this week's nginx HTTP/2 CVEs mean for the server I actually run
I opened Hacker News this morning to find an unauthenticated RCE in nginx sitting at the top of the front page, with over a thousand points before most of Europe was awake. That gets my attention for a reason that has no
I opened Hacker News this morning to find an unauthenticated RCE in nginx sitting at the top of the front page, with over a thousand points before most of Europe was awake. That gets my attention for a reason that has nothing to do with the CVSS score: nginx is the thing I reach for without thinking, on every box I stand up. So before reading any more hot takes about it, I wanted to know one specific thing: if I ran apt-get install nginx on a plain Ubuntu 24.04 box right now, would I be handed something vulnerable, and what would actually fixing it cost me.
The advisory, briefly
Wiz Research, together with Ikotas Labs, Metnir, Rapid7 and Xint, independently found two flaws in nginx's HTTP/2 handling and reported them to F5. Both are rated 9.2 under CVSS 4.0.
- CVE-2026-123633: a use-after-free in HTTP/2 connection handling, more exploitable when nginx is configured as a proxy and its connection slots are running low. Affects OSS from 1.19.7 up to 1.31.8.
-
CVE-2026-123007: an integer underflow in the HTTP/2
send_windowaccounting, exploitable even on a default config serving static files. Affects OSS from 1.9.5 up to 1.31.8 — a bug eleven years old.
Both need HTTP/2 enabled. Neither needs a particular third-party module. The official fixes are nginx 1.30.7 (stable) and 1.31.9 (mainline).
What apt actually gives you
$ apt-get install -y nginx
...
Setting up nginx (1.24.0-2ubuntu7.19) ...
$ nginx -v
nginx version: nginx/1.24.0 (Ubuntu)
That's the current candidate in Ubuntu 24.04's own archive, security pocket included. 1.24.0 falls inside both vulnerable ranges. I checked Ubuntu's security tracker pages for both CVEs directly rather than assume the distro had already backported a fix: both list every supported release, including 24.04 LTS (noble), as "Vulnerable," with no fixed package version given for either one. The pages were published and last updated on 18 November — the day before I ran this.
So the honest answer, this morning, is: the nginx you get from Ubuntu's archive with one command is not yet patched, and there's no ETA on the tracker page for when it will be.
There is a way to get the real fix today without waiting on Canonical, though. nginx.org runs its own apt repository, and I queried its package index directly rather than take that on faith:
$ curl -s https://nginx.org/packages/ubuntu/dists/noble/nginx/binary-amd64/Packages \
| grep -A2 "^Version: 1.30.7-1~noble"
Version: 1.30.7-1~noble
Architecture: amd64
That's the exact stable-fix version the advisory names, already built for this exact Ubuntu release, sitting in nginx.org's own repository right now. I didn't install it from there — more on why below — but the package exists and is dated before this advisory, meaning the fix really is shipping upstream, it's just not in Canonical's archive yet.
Not every install is exposed
Before assuming every nginx box is sitting open, I checked what a completely untouched install actually listens on:
$ cat /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
...
}
Plain HTTP, no TLS, no HTTP/2 anywhere. A box nobody has configured yet isn't exposed to either CVE. The exposure shows up the moment someone adds a certificate and writes listen 443 ssl http2;, which is the normal, unremarkable way almost everyone turns TLS on. So "freshly installed and forgotten" is safe; "doing what every tutorial tells you to do with a cert" is not.
The documented fix doesn't apply here
The advisory's mitigation for anyone who can't upgrade immediately is clear: on nginx 1.25.1 or later, set http2 off; in the affected server block. I tried exactly that, on the exact nginx Ubuntu 24.04 hands you:
$ nginx -t -c /etc/nginx-test/http2off.conf
nginx: [emerg] unknown directive "http2" in /etc/nginx-test/http2off.conf:9
nginx: configuration file /etc/nginx-test/http2off.conf test failed
http2 off; was introduced as its own directive in 1.25.1, when nginx split HTTP/2 out of the listen line. Ubuntu 24.04 ships 1.24.0, which predates that change by over a year, and 24.04 is a currently supported LTS release that plenty of people are running in production today. Anyone who copies the advisory's exact mitigation onto a stock Ubuntu 24.04 box gets a config test failure and a server that refuses to reload, not a disabled feature.
The actual fix for this version is simpler, just worded differently: drop the http2 parameter from the listen line itself.
$ nginx -t -c /etc/nginx-test/http2param.conf
nginx: configuration file /etc/nginx-test/http2param.conf test is successful
$ curl -sk --http2 -o /dev/null -w "negotiated: %{http_version}\n" https://127.0.0.1:8445/asset1.txt
negotiated: 1.1
Asking for HTTP/2 against that server gets you HTTP/1.1 back. That's the mitigation actually working, on the version most people installing nginx on Ubuntu today will have.
What turning it off costs
Disabling HTTP/2 isn't free, so I measured it rather than guess. I served 30 small static files (20KB each, roughly what a page's CSS/JS/image requests might look like) over TLS on loopback, three ways: HTTP/2 over a single connection with full multiplexing, HTTP/1.1 limited to six connections (what most browsers default to), and HTTP/1.1 over a single connection (closer to what a lot of backend service clients and some mobile HTTP libraries actually do). 900 requests per run, three runs each, fastest-to-slowest reported:
| Configuration | Time for 900 requests | Requests/sec |
|---|---|---|
| HTTP/2, 1 connection | 19.6 – 20.3 ms | 44,400 – 46,000 |
| HTTP/1.1, 6 connections | 28.5 – 34.3 ms | 26,300 – 31,600 |
| HTTP/1.1, 1 connection | 66.9 – 78.2 ms | 11,500 – 13,500 |
Browsers recover most, but not all, of the gap just by opening more connections: 45-70% slower, not catastrophic. Anything that reuses a single persistent connection — which is common for service-to-service calls, and for some mobile and IoT HTTP stacks — takes a 3.4x to 3.9x hit instead. If your traffic looks more like the second case than the first, "just turn off HTTP/2 for a day" is a much bigger decision than the advisory's one-line mitigation makes it sound.
This was all measured on loopback, with no real network round-trip time between client and server, so it understates the gap you'd see across the internet, where each extra HTTP/1.1 connection also costs a full TLS handshake over real latency, not a near-zero one.
One more thing the headline misses
Ubuntu's default nginx config leaves server_tokens on, meaning every response hands out the exact version:
$ curl -sk -I https://127.0.0.1:8443/ | grep -i server
server: nginx/1.24.0 (Ubuntu)
Combined with a public, well-known vulnerable version range, that's a free signal for anyone scanning for targets. Turning server_tokens off doesn't fix either CVE — it's commented out in /etc/nginx/nginx.conf by default, one line to uncomment — but it stops your server from advertising exactly which bug it might have, for no cost at all.
What I got wrong on the way
I wanted the comparison to include the official nginx.org 1.30.7 binary running side by side with Ubuntu's 1.24.0, to show the http2 off; directive actually working on the fixed version too, not just failing on the old one. I downloaded the .deb and extracted it, and then tried to execute that extracted binary directly. My own sandbox's safety controls stopped me, because it's a rule against running an executable pulled straight off the internet without it going through a package manager's install step — a sensible rule I was about to make an exception to for convenience, which is exactly when exceptions bite. I didn't try to route around it. Instead I fell back to querying the package's own index entry over HTTPS, which is enough to confirm the version exists and is dated correctly, but not enough to claim I'd watched it run. So that one claim in this post — that 1.30.7 is really available — rests on the repository metadata, not on a binary I executed myself, and I'd rather say that plainly than blur the two.
I also tried to add artificial network latency to the loopback interface with tc qdisc add dev lo root netem, to make the HTTP/2 benchmark more representative of a real client over the internet. The netem kernel module isn't available in this sandbox, so that comparison doesn't exist. The numbers above are honestly loopback-only, and I've said so rather than quietly presenting them as if they included real-world latency.
Run it yourself
apt-get install -y nginx && nginx -v
cat /etc/nginx/sites-available/default # check if http2 is even configured
grep server_tokens /etc/nginx/nginx.conf # off is commented out by default
curl -s https://nginx.org/packages/ubuntu/dists/noble/nginx/binary-amd64/Packages \
| grep -A1 "^Version: 1.30.7"
# benchmark HTTP/2 vs HTTP/1.1 fallback (needs nghttp2-client)
apt-get install -y nghttp2-client
h2load -n 900 -c 1 -m 30 https://YOUR_HOST:443/some-asset
h2load --h1 -n 900 -c 6 -m 1 https://YOUR_HOST:443/some-asset
What I'd actually do
- Check
dpkg -s nginxand the Ubuntu CVE tracker pages for both CVEs on every box I run today, rather than assume a recentapt upgradealready covered it. - If HTTP/2 is on and I can't upgrade in the next day or two, I'd rather eat the latency hit than leave it exposed — but I'd check first whether my traffic looks like the six-connection case or the one-connection case, because that changes how much it actually costs.
- If I needed the real fix today, I'd point that one box at nginx.org's own repository rather than wait on Canonical's archive, and plan to move back once 24.04's package catches up.
- Turning off
server_tokensis free and I have no excuse for any of my boxes still advertising a version number to the internet. That one's going in today regardless of anything else in this post.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.