CVE-2026-123007 is a flow-control bug in nginx’s HTTP/2 code. Xint, who found it, report unauthenticated command execution as the nginx worker over nothing more than a reachable TLS port with HTTP/2. Chained with a separate, still unpatched Linux kernel bug in SCTP, they got root on the host, also from inside a Docker container. They call the set nginx2root. nginx fixed it in 1.31.9 and 1.30.7 on November 18, 2026.
This post covers how to tell whether a server is exposed, the workarounds, the update, and how the bug works. It contains no exploit steps. Distribution status below was read on November 18 and 19, 2026. Check the sources for the current state.
What is affected
nginx’s advisory lists every release from 1.9.5, the first one with HTTP/2, through 1.31.8. A server is exposed when all three are true:
- It runs an unpatched version in that range.
- The binary was built with the HTTP/2 module.
- HTTP/2 is enabled on a listener someone can reach.
The same release fixed ten advisories. Xint’s report lists four more besides this one that, by their account, lead to code execution on their own, each under a different configuration:
| CVE | Configuration that reaches it | Blocked by turning off HTTP/2? |
|---|---|---|
| CVE-2026-123007 | HTTP/2 enabled | Yes |
| CVE-2026-123633 | HTTP/2 with requests proxied to an upstream | Yes |
| CVE-2026-123634 | resolver with a request-derived proxy_pass and subrequests (Xint tested mirror) | No |
| CVE-2026-121810 | HTTP/3 (QUIC) with requests proxied to an upstream | No |
| CVE-2026-113425 | Mail proxy with proxy on and auth_http | No |
So the version number alone tells you the code is present. Whether it is reachable depends on your config.
Distribution packages
Distributions often backport fixes without changing what nginx -v prints, so compare the full package version with your distribution’s tracker. When I checked:
| Distribution | Status |
|---|---|
| Ubuntu 16.04 to 26.10 | Fix needed, no updated package yet (14.04: not affected, no HTTP/2) |
| Debian 12, 13, testing, unstable | Vulnerable, no fixed version yet |
| nginx.org packages | 1.31.9 (mainline) and 1.30.7 (stable) available |
Check a server
I used two DigitalOcean droplets with Ubuntu 24.04: one running the distribution’s nginx with a self-signed certificate, and one acting as an outside client.
1. Version.
nginx -v
apt-get install --only-upgrade nginx
nginx version: nginx/1.24.0 (Ubuntu)
...
nginx is already the newest version (1.24.0-2ubuntu7.19).output
The newest Ubuntu package and still in the affected range, matching the tracker.
2. HTTP/2 module in the binary.
nginx -V 2>&1 | grep -o with-http_v2_module
with-http_v2_moduleoutput
No output here means the binary has no HTTP/2 code, and this CVE doesn’t apply.
3. HTTP/2 enabled in the config. nginx -T prints the full configuration it would load, includes and all:
nginx -T 2>/dev/null | grep http2
listen 443 ssl http2;output
On 1.25.1 and later the setting can also be the separate directive http2 on;. nginx -T reads the files on disk, so if someone edited them without reloading, the running config may differ.
4. HTTP/2 reachable from outside. Run this from another machine. It asks for HTTP/2 during the TLS handshake (ALPN):
openssl s_client -connect web.lab:443 -alpn h2 </dev/null 2>&1 | grep ALPN
ALPN protocol: h2output
h2 means the server speaks HTTP/2 to anyone who asks. If a CDN or load balancer sits in front, this only tests the front. Run it against nginx directly as well.
All four point the same way here: affected and reachable.
Workaround: turn off HTTP/2
On versions before 1.25.1, HTTP/2 is a parameter of listen, so drop it from there. On 1.25.1 and later, set http2 off; in each server block and remove the old parameter too. Check every server block that shares the same address and port.
sed -i 's/ssl http2;/ssl;/' /etc/nginx/conf.d/lab.conf
grep listen /etc/nginx/conf.d/lab.conf
nginx -t && systemctl reload nginx
listen 443 ssl;
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successfuloutput
From the client again:
No ALPN negotiatedoutput
Clients fall back to HTTP/1.1. Anything that needs HTTP/2, such as native gRPC, stops working. This blocks CVE-2026-123007 and CVE-2026-123633 only. Connections opened before the reload stay on the old workers with the old config, so if workers show up as nginx: worker process is shutting down for long, a restart ends them.
For the other three, Xint’s write-up has a mitigation each: a fixed upstream group instead of a request-time DNS lookup in proxy_pass, removing QUIC listeners with http3 off, and binding mail listeners to loopback.
Workaround: block the SCTP module
The kernel half of the chain is a use-after-free in the SCTP send path, present since Linux 4.15. It has no fix yet. On hosts that don’t use SCTP, keep the module from loading:
lsmod | grep sctp
echo "install sctp /bin/false" > /etc/modprobe.d/sctp.conf
modprobe sctp
modprobe: ERROR: ../libkmod/libkmod-module.c:1084 command_do() Error running install command '/bin/false' for module sctp: retcode 1
modprobe: ERROR: could not insert 'sctp': Invalid argumentoutput
The first command printed nothing, so the module wasn’t loaded. This line doesn’t unload a module that’s already loaded, and it does nothing if SCTP is built into the kernel. Check with grep CONFIG_IP_SCTP /boot/config-$(uname -r): =m means a module, which this blocks, while =y means built in. Xint note that many distributions load SCTP automatically the first time a program opens an SCTP socket, and since containers share the host kernel, this is a host setting.
The fix: update to 1.31.9
With the distribution packages not updated yet, the nginx.org repository has the fixed builds. On Ubuntu 24.04:
curl -fsS https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx.gpg
echo "deb [signed-by=/usr/share/keyrings/nginx.gpg] http://nginx.org/packages/mainline/ubuntu noble nginx" > /etc/apt/sources.list.d/nginx.list
apt-get update -qq && apt-get install -y -qq nginx=1.31.9-1~noble >/dev/null
systemctl restart nginx && nginx -v
nginx version: nginx/1.31.9output
Use restart, not reload. A reload re-reads the config but keeps the old binary running. Use packages/ubuntu instead of packages/mainline/ubuntu for the stable line (1.30.7).
Switching from Ubuntu’s package to nginx.org’s changes the layout: the nginx.org nginx.conf includes conf.d/*.conf but not sites-enabled/, and runs workers as nginx instead of www-data. My site lived in conf.d, so it carried over. Run nginx -t before the restart.
After the update, HTTP/2 can be turned back on, on 1.25.1+ with http2 on; in the server block.
Looking for signs of an attack
Xint point out that the frames used in the attack (WINDOW_UPDATE and RST_STREAM) are not requests, so they don’t appear in access logs. Their suggestions, which I haven’t tested against a real attack:
ss -tinp state established '( sport = :443 )'twice a few seconds apart: a long-lived connection whosebytes_receivedclimbs fast while the server sends little back, often next to many short TLS connections from the same IP.- An audit rule on
execvefor the worker’s UID. A worker has no reason to start programs, so a shell started by one is the clearest sign. - Worker crashes in the error log (
signal 11,exited on signal), since failed attempts can crash workers.
How the bug works
HTTP/2 runs many requests over one connection, each one a stream. So the server doesn’t send faster than the client can take, it keeps send windows: one per stream and one for the whole connection. Its value is the byte budget left before the server has to wait. The client raises it with WINDOW_UPDATE frames, and the protocol caps every window at 2³¹ − 1.
nginx counts the connection window in h2c->send_window. When it queues response data, it subtracts the size right away, before the data has gone out (ngx_http_v2_send_chain()):
ngx_http_v2_queue_frame(h2c, frame);
h2c->send_window -= frame_size;
stream->send_window -= frame_size;
If the client cancels the stream with RST_STREAM while that data is still queued, the cleanup function drops the data and gives its size back (ngx_http_v2_filter_cleanup()):
h2c->send_window += window;
Each step is right on its own. The problem is a WINDOW_UPDATE that arrives in between. The window starts at the cap, queuing takes Q off, the WINDOW_UPDATE puts Q back, and the cancel puts Q back a second time. Nothing checks the cap on that last addition, so the window ends up above it.
The check that should catch an oversized window then stops working. It computes the room left as the cap minus the current window:
if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_FLOW_CTRL_ERROR);
}
send_window is a size_t. With the window above the cap, the subtraction would be negative, and an unsigned value wraps around to a huge number instead. Every later WINDOW_UPDATE passes, and the client can push the window to nearly any 64-bit value.
Later, nginx compares the window as a signed off_t when it sizes a DATA frame. A value just below 2⁶⁴ reads as a small negative number, and that negative becomes the frame size. The buffer it builds ends up with its end pointer before its start. The TLS code copies last - pos bytes, which as an unsigned length is nearly 2⁶⁴.
A copy that long should crash. Xint explain why it doesn’t: glibc’s x86-64 memcpy copies large blocks backward from the end, and that end address wraps around below the destination, so the loop runs once and fewer than 300 bytes move, some of them in front of the buffer. Xint arranged the request so that this short copy does two things at once: it corrupts allocator data just in front of the TLS buffer, and it places addresses from inside nginx into bytes that go back to the client. The leaked addresses plus the corruption let them replace a cleanup callback, which nginx then called with their command.
The fix
The patch (e27f5fa84f, “HTTP/2: account for queued frames when validating WINDOW_UPDATE”) adds a second counter for data that is queued but not sent, and makes the check include it:
- if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
+ if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window - h2c->send_queued) {
send_queued grows when data is queued, shrinks when it is sent, and shrinks again when the cleanup refunds it. From the client’s side, queued data still belongs to the window, so a WINDOW_UPDATE that would push the total past the cap is now rejected before the refund can happen.