Debian had no fix for NGINX2Root yet, so I turned HTTP/2 off
A security company showed how a visit to an nginx site could end in root on the machine behind it. nginx fixed its part the same day, but Debian hadn't yet, so I worked out which bugs could reach my server and switched off the feature they needed.
On 18 November a security company called Xint published NGINX2Root, a chain of bugs that goes, in its own words, "From nginx visitor to root of the server host". nginx had fixed versions out the same day, but my server couldn't have them yet.
NGINX2Root is five bugs in nginx, the web server in front of this site, plus one in the Linux kernel. Xint's write-up says each nginx bug lets a stranger run code on the server, given the right config. The one it calls the most impactful, CVE-2026-123007, is in HTTP/2, the version of HTTP that carries many requests over one connection. A CVE is the public ID a security bug gets.
In HTTP/2 each side tells the other how much data it may send before it has to wait, a running allowance. RFC 9113, the HTTP/2 standard, says that allowance must never pass a fixed maximum. nginx could be pushed past it, and from there an attacker could write to memory nginx hadn't set aside for them. No login is needed, and the bug has been there since nginx got HTTP/2 in 2015.
On its own that bug gives an attacker the rights of an nginx worker, the process that handles requests, which normally has few. Root takes the second bug, in the kernel's SCTP networking code. nginx fixed its side the same day, and fixed more than NGINX2Root's five. Mainline 1.31.9 has ten security fixes, and stable 1.30.7 has nine.
My server runs Debian 13, trixie, with Debian's own nginx 1.26.3. Debian stable doesn't take new nginx versions. It copies each fix back into the one it shipped, a backport, so that a release changes as little as possible. When I looked at Debian's security tracker that evening, both HTTP/2 bugs were still open for trixie, even in the newest security build. An apt upgrade would have changed nothing.
nginx.org ships its own packages for trixie too, but with a different config layout, and my server hosts more than one site. I thought moving all of them over in one evening was riskier than a few days on HTTP/1.1.
So the question became which of the ten could reach my server. nginx's advisories and Xint's write-up say what each bug needs, and most need a feature a small site doesn't use. The work is asking my own config whether it has that feature:
grep -rn http2 /etc/nginx/
nginx -T 2>/dev/null | grep -nE 'quic|http3|mirror|resolver|auth_http|^mail|alias'
ss -lunp 'sport = :443'
nginx -T tests the config and prints all of it, included files too. The ss line lists anything listening on UDP port 443, where HTTP/3 would be, since HTTP/3 runs over UDP. In the table, a use-after-free is memory a program keeps using after handing it back, and proxy_pass is nginx passing a request on to the app behind it.
| Bug | Needs | On my server |
|---|---|---|
| CVE-2026-123007, HTTP/2 flow control | HTTP/2 | yes |
| CVE-2026-123633, HTTP/2 use-after-free | HTTP/2 and proxy_pass | yes |
| CVE-2026-121810, HTTP/3 use-after-free | a quic listener | no |
| CVE-2026-123634, resolver use-after-free | mirror or SSI, with a variable proxy_pass | no |
| CVE-2026-113425, mail proxy | a mail block with auth_http | no |
CVE-2026-125283, try_files with alias | alias | no |
| CVE-2026-118899, endless loop over TLS | TLS 1.3 | yes, a hang only |
| CVE-2026-120993, PROXY protocol | mainline 1.31.4 to 1.31.8 | no |
| CVE-2026-120967 and -123640 | the stream module | not checked |
The version range settled one row before any grep, because 1.26.3 never had that bug. The TLS bug is a hang, not code execution, and I found no workaround for it. The last row is a gap. I don't think anything here uses the stream module, which handles traffic that isn't HTTP, but I didn't check.
HTTP/2 had only been on since February, when a run of Lighthouse, Google's page checker, reported that the site didn't use it. My own notes filed that finding as INFO, the lowest level.
Turning HTTP/2 off is the stopgap Xint gives for the two HTTP/2 bugs. At about 18:00 UTC I changed http2 on; to http2 off; in every server block that had it, a server block being one site's section of the config. nginx before 1.25.1 put http2 on the listen line instead. The first grep catches both, and no listen line had it.
# was: http2 on;
http2 off;
Then a config test, and a restart rather than a reload:
nginx -t
systemctl restart nginx
A reload would apply the change too, but only to new connections. The old workers keep serving the clients they already have, still on HTTP/2, until those finish. A restart drops every open connection, which I think is a fair trade on a small site.
I checked the result from my laptop, not the server, so the request went the way a visitor's would:
$ curl -sI --http2 https://ericjingryd.com
HTTP/1.1 200 OK
--http2 asks for HTTP/2. If the server won't do it, curl carries on over HTTP/1.1, and the first line of the reply says which you got. About a minute after the change it said HTTP/1.1, and it still did the next afternoon.
One trap came up that evening. openssl s_client -alpn h2 -brief looks like the right tool, since ALPN is the step in the TLS handshake where the two sides settle on HTTP/2 or HTTP/1.1. But its brief summary never prints what they agreed. Drop -brief and the full output says ALPN protocol: h2 when HTTP/2 is on, or No ALPN negotiated when it isn't. curl's first line is simpler.
Turning HTTP/2 off closed the two HTTP/2 bugs and nothing else. The TLS hang was still reachable, and I never checked the stream bugs. Only the hop between browser and nginx changed, since nginx already talked HTTP/1.x to the app behind it. I didn't measure whether pages got slower.
If you run Debian's nginx, nginx -v won't tell you when the fix is in, because after a backport it still says 1.26.3. The full package version is what changes, and apt-cache policy nginx shows it. Hold that against the fixed version in the Debian Security Advisory, which for trixie is DSA-6642-1 with 1.26.3-3+deb13u11.
On 19 November the tracker named that advisory. That afternoon my server still showed this:
Installed: 1.26.3-3+deb13u10
Candidate: 1.26.3-3+deb13u10
So an advisory can name a fix before your server's package lists offer it, and apt update is what refreshes those lists.
The fix arrived the next morning without me. The server installs security updates by itself, and at 06:30 UTC on 20 November it took deb13u11 and restarted nginx. I checked that the restart had really happened, because a fixed file on disk does nothing until the program starts again:
$ systemctl show nginx -p ActiveEnterTimestamp
ActiveEnterTimestamp=Fri 2026-11-20 06:30:31 UTC
That evening I put http2 on; back, ran nginx -t and restarted. The same curl line now begins HTTP/2 200. HTTP/2 was off for two days.
Sources and further reading:
- NGINX2Root and Xint's write-up
- nginx's security advisories and change logs for 1.30 and mainline
- nginx's docs on switches,
http2, control and packages - RFC 9113, HTTP/2 flow control
- The Debian security FAQ
- Debian's tracker on CVE-2026-123007 and DSA-6642-1
- The ss manual page
- Manuals for curl and openssl s_client
- CWE-416 and MDN on ALPN
- Lighthouse's HTTP/2 audit