Skip to content
andri.isOperationalRVK
06 / FIELD NOTESSecurity5 min read

NGINX2Root in my lab, 8 KB at a time

I traced CVE-2026-123007 through an NGINX worker. My clearest result came from watching it reject a request.

The most interesting thing my vulnerable NGINX server did today was reject a request. It checked a number, decided it was too big, and carried on serving traffic. If that had been my only test, I could have closed the ticket with a very convincing wrong answer.

I worked on CVE-2026-123007, the flow-control bug in NGINX2Root, the set of disclosures Xint published today. Xint found this one and chained it with a Linux kernel flaw to get from the worker to root on the host. Wiz's analysis describes unauthenticated remote code execution, confirmed on official 1.31.7 and 1.31.8 builds. I wanted to see how much of that story I could follow on my own server.

Watching the balance change

HTTP/2 lets a client tell a server how much more data it has room to receive. The server keeps a running balance called a send window. Think of checking your bank balance while a card payment is still pending. The interesting question is whether the numbers still add up once that payment settles or gets cancelled.

I ran NGINX 1.31.8 locally and checked that the client and server had agreed to speak HTTP/2 over TLS. Then I watched an instrumented worker serve a response. It queued the body in 8 KB frames, which is the default http2_chunk_size. As each frame went into the queue, I could see the available credit fall. With the window at its maximum, the worker rejected a WINDOW_UPDATE that would have taken it over the limit. That check did exactly what its author intended.

Xint's writeup puts the bug on a different path. Queued data is charged against the connection's send window. If the client raises the window and then cancels the stream, cleanup adds the queued credit back on top of the raised window, and in vulnerable versions it never checks the result against the maximum. The balance ends up over the limit without the client ever sending an update that was too big. From there, Xint says, the subtraction in that same WINDOW_UPDATE check wraps around, and a negative length eventually reaches a copy in the TLS output path. The check I watched covers what the peer sends in. The refund comes from inside the worker.

The bytes my trace couldn't account for

Those 8 KB steps measured a decision inside the worker. By the time NGINX queued a frame, it had already charged the connection for the payload. A packet capture can show bytes crossing an interface. It can't tell you when a worker reserved credit for bytes still sitting in its output queue. Even on localhost, those are two distinct events.

That distinction helped me read the patch. In the 1.31.9 source, NGINX tracks queued payload separately when checking how much credit the connection can accept. I read the new counter as a debt the worker might have to repay. If it sends the queued data, the reservation has paid for real traffic. If it discards the data, it owes that credit back. Either way, the same reservation needs to leave the books exactly once.

That's the property I'd put in a regression test. Start with a known allowance and a response smaller than that allowance. In one ordinary run, let the response finish. In another, cancel it. Once the queue is empty, the worker's remaining allowance should equal its starting allowance plus credit granted by the peer, minus the flow-controlled bytes it sent. That gives the test a way to fail even when the worker stays healthy. I haven't run that comparison.

Reading a quiet trace

On loopback I couldn't establish how much unsent data remained at the moment I cared about. Seeing the window fall proved that the worker had queued data at some point. It didn't tell me what was left by the time cleanup ran. In a separate run the worker logged http2 flood detected. That line explains why that connection ended. It tells me nothing about the balance on the first one.

If I repeated the measurement, I'd keep a per-connection timeline with a sequence number, the event inside the worker, the queued byte count and the available credit. Then I could distinguish “the queue was empty at cleanup” from “my instrumentation missed cleanup.” Both can look like silence from the client. Only the first is an observation about NGINX.

I didn't observe memory corruption, a worker crash or code execution in this session. I'd cite the published research for exploit impact and attach my trace for the narrower claim about when NGINX charged the connection.

Back at the edge

For the person holding the pager, I'd start with where HTTP/2 terminates. A browser showing HTTP/2 tells you what it negotiated with the front door. If a CDN sits there, you still need to establish what protocol reaches NGINX behind it. Then check the package actually running at that hop against its vendor's advisory. The NGINX advisory list marks 1.9.5 through 1.31.8 as vulnerable, which is every release since HTTP/2 support arrived. Upstream shipped the fix in 1.30.7 stable and 1.31.9 mainline, and F5 has its own advisory.

If the upgrade has to wait, the stopgap from both Xint and Wiz is to turn HTTP/2 off: http2 off; in the affected server blocks on 1.25.1 or later, and no http2 parameter on the listen line before that. Whichever fix you ship, a reload isn't the finish line. Old workers keep serving the HTTP/2 connections they already hold, which is why Xint says to restart. Confirm the old workers have exited before you mark that hop done.

If I were handing this lab to the next shift, I'd leave the successful rejection in the notes. Someone else is going to see that same check pass. They deserve to know exactly how little of the worker's day it covers.

Sources: Xint on NGINX2Root, Wiz Research on CVE-2026-123633 and CVE-2026-123007, NGINX security advisories, F5 K000163926.