Nginx's HTTP/2 module keeps a queue called reusable_connections_queue. The queue has an invariant held entirely by convention: every connection on it has no live streams. In February 2021, Maxim Dounin shipped a slow-client DoS mitigation that parked HTTP/2 connections on the queue the moment a client sent a partial frame. In September 2026, Albert at Vexera AI noticed the mitigation never reset the parking flag when the rest of the frame arrived and a stream opened. Five and a half years. One missing line of code. One self-freeing request pool.
CVE-2026-123633: NGINX Kept HTTP/2 Connections on the Reusable Queue While They Carried Live Streams. The Fix Is the Dequeue Call the 2021 Patch Never Shipped.
vendor
patterns
cve
proof of concept
- infosec.exchange/@ssvc/117638417918407176
- infosec.exchange/@thecybersecguru/117638406131551625
- LLCForge/CVE-2026-123633%20(%E2%98%850)
- Quaerendir/cve-2026-123633-123007-nginx-audit%20(%E2%98%850)
- seclists.org/oss-sec/2026/q4/778
- infosec.exchange/@threataft/117640749824337683
- maizarrahman/nginx_cve_2026_audit%20(%E2%98%850)
- im0xfay/CVE-2026-123007%20(%E2%98%850)
- seclists.org/oss-sec/2026/q4/791
- avoliomattia/NGINX-CVE-2026-123007-CVE-2026-123633%20(%E2%98%850)
- federiconbaez/cve-2026-123633-analysis%20(%E2%98%850)
- federiconbaez/cve-2026-123633-detector%20(%E2%98%850)
- gabriel-shtx/CVE-2026-123007-NGINX2Root-detection-scripts%20(%E2%98%850)
- Nexxus67/CVE-2026-123633-PoC%20(%E2%98%850)
- grupooruss/Division81-cve-2026-123633%20(%E2%98%850)
The queue is a membership predicate held by convention
Nginx's event core carries a per-worker list called ngx_cycle->reusable_connections_queue. Any connection registered on that list is a candidate for forced closure when the worker runs out of worker_connections slots. The mechanism is called ngx_drain_connections: when a new accept or a new upstream connect hits the slot ceiling, the drainer walks the tail of the reusable queue, picks the oldest entry, and invokes its read handler with the understanding that the handler will close the connection cleanly and free the slot.
Membership in the queue is managed by exactly one function, ngx_reusable_connection. It takes a connection and a boolean. True adds the connection to the queue. False removes it.
Everything the drainer does depends on an assumption: the handler it is about to call will not reenter code that owns a live request. In practice, every subsystem in nginx honored that assumption by making sure it never put a connection on the queue while a request was in flight. The HTTP/1 codepath does it correctly. So does the mail proxy. The invariant is not written down in a comment above the queue. It is not asserted. It is not checked. It is held by convention, by every caller of ngx_reusable_connection(c, 1) agreeing that they will only make the call when nothing is riding on the connection.
For 15 years, that convention held.
The 2021 commit broke an invariant nothing was checking
In February 2021, Maxim Dounin pushed commit 76672e650 with the log line "HTTP/2: reuse of connections with incomplete frames." The problem it addressed was straightforward. An attacker could open an HTTP/2 connection, send the first byte of a HEADERS frame, and hold it. The connection consumed a worker slot indefinitely. Multiply that by the worker connection limit and the server was done.
The mitigation was to make those connections eligible for the drainer. If a client sent a partial frame, the connection was marked reusable, which meant the drainer could reclaim its slot when something else needed one. The patch was three lines in ngx_http_v2_handle_connection:
+ ngx_reusable_connection(c, 1);
+
h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
ngx_http_v2_module);The call marks the connection reusable. The prior call, which moved the same line out of a different block, was already there but had slightly different semantics. The new placement meant: as soon as we have a partially-received frame and no active streams, park this connection as drainable.
There was no bug on the day that commit landed. A connection with an incomplete frame genuinely had no streams. The predicate held.
The subtle thing the patch did not do was tell any future code path what the predicate was. It did not add a comment above the reusable_connections_queue declaration saying "members have no live streams." It did not add an assertion in ngx_drain_connections to that effect. It did not add a defensive ngx_reusable_connection(c, 0) in the place where a stream was eventually created. It relied, like everything else that touched the queue, on convention.
Then it waited.
The window the fix closes
Picture the lifetime of an HTTP/2 connection in nginx 1.31.8, viewed only through the lens of the reusable queue.
- Client opens TCP. Nginx accepts, creates the
ngx_http_v2_connection_t, does not mark it reusable yet. - Client sends the first byte of a HEADERS frame. The read handler parses what it can, sees an incomplete frame, falls through to
ngx_http_v2_handle_connection, which callsngx_reusable_connection(c, 1). The connection is now on the drainer queue. No streams yet. Invariant holds. - Client sends the rest of the HEADERS frame. The read handler parses it, builds a request, calls
ngx_http_v2_create_stream, bumpsh2c->processing, and begins processing the request. The connection is still on the drainer queue. It now has a live stream. Invariant has silently flipped. - The request proxies upstream.
ngx_event_connect_peerasks for a free connection slot. There is no free slot.ngx_get_connectioncallsngx_drain_connectionsto free one. The drainer walks the queue, finds this very connection at the tail, and calls its read handler.
Point 4 is the reentrancy. The connection's own request, trying to open an upstream, caused nginx to yank the connection out from under itself.
The drainer-invoked read handler at src/http/v2/ngx_http_v2.c:380 observes that recv() returns zero bytes new data (there's nothing new to read; we're being called from the drain path, not because there was I/O), decides the connection is done, falls through to ngx_http_v2_finalize_connection, and begins tearing down streams. Each stream's request pool is destroyed. Including the pool of the request whose upstream connect call is still live on the stack above.
Control returns up the call chain to ngx_get_connection, which now has a free slot to hand out. It returns to ngx_event_connect_peer. ngx_event_connect_peer reads from the peer connection it's about to configure. The peer connection is a field in the request. The request's pool is gone. The read is use-after-free.
Here is the concrete evidence. ASan on nginx 1.31.8 with the selfdrain_poc.py trigger produces a trace where ngx_http_v2_read_handler appears twice on the same stack. The free frame is at ngx_http_v2.c:380, invoked from ngx_drain_connections at ngx_connection.c:1441. The use frame is at ngx_http_v2.c:422, the outer caller that was still iterating its own frame loop when it reentered through the drainer. Between the two frames, the request's own pool is freed. The UAF site itself is a four-byte read of pc->rcvbuf at ngx_event_connect.c:66.
Everything from the moment the HEADERS frame finishes to the moment the request issues an upstream connect is the window. For a request pool size of 4096 bytes on a freshly-allocated connection, the window is as wide as the first proxy pass takes to resolve. The PoC drives it reliably by staging the fillers up front, so that when the victim request completes HEADERS and tries to connect upstream, the slot budget is already at zero and the drainer fires on the first ngx_get_connection call.
The fix is one line
Commit 2df48a501, September 17, 2026, Roman Arutyunyan, log line "HTTP/2: reset reusable connection status on stream creation. Reported by Albert @ Vexera AI."
@@ -3192,6 +3192,8 @@ ngx_http_v2_create_stream(ngx_http_v2_connection_t *h2c)
h2c->processing++;
+ ngx_reusable_connection(h2c->connection, 0);
+
if (h2c->connection->read->timer_set) {
ngx_del_timer(h2c->connection->read);
}Two lines of diff. One line of code. The call that was missing for five and a half years was the one that removed the connection from the drainer queue the moment it acquired a live stream. The fix does not change the queue's semantics. It does not add a comment explaining the invariant. It does not add an assertion. It simply makes the create-stream path a dutiful caller of ngx_reusable_connection(h2c->connection, 0), the same way every other code path in nginx should have been doing all along, if any of them had known the invariant was there to honor.
Read the commit message carefully. Arutyunyan does not say "we are closing a race condition." He says "the reusable status is not reset until the connection becomes idle." That phrasing locates the bug precisely: the reusable flag was a status that nothing was obligated to reset. The patch retrofits an obligation.
Rate it however you want
Nginx.org's advisory rates this as medium. F5's CNA entry as 8.1 high. Wiz, who did independent research alongside the nginx2root disclosure, rates it 9.2 critical and claims in a lab environment they achieved remote code execution. They have not published the exploit.
The public artifacts, including the PoC this post is written from, demonstrate denial of service. Under master_process on, nginx's default and the configuration essentially every production nginx runs with, the master respawns the crashed worker within fifty milliseconds. A successful exploit costs the service one worker and a sub-second gap in served requests on a release build, which fires the race about five times out of eight. A debug build fires it eight times out of eight. That delta is what optimized release builds will buy you against a race-condition exploit in your production binary: a probability discount, not an immunity.
We are inclined to believe Wiz. The UAF is on the heap, not the stack. The freed object is a 4096-byte request pool, which is a size class with a lot of collision candidates. The memory corruption is a read, not a write, which rules out the easy primitives but not information disclosure of whatever happens to be adjacent. And Wiz did the work. But absent a published artifact, the public record of CVE-2026-123633 remains denial of service, and the rating gap between nginx.org and Wiz is the gap between what has been published and what has been demonstrated under NDA.
This is the second one this week, and the HTTP/2 module is a design-debt driver
Three days ago, F5 disclosed five nginx vulnerabilities together under the coordinated banner nginx2root: 123007 (HTTP/2 integer underflow), 123633 (this bug), 121810 (HTTP/3 UAF), 123634 (resolver UAF), 113425 (mail proxy UAF). All five were fixed in nginx 1.30.7 and 1.31.9 on November 18. Our sibling post on 123007 went up ten minutes before this one.
Both 123007 and 123633 live in src/http/v2/ngx_http_v2.c. Both are invariants held by convention. 123007 was a per-stream integer counter that could underflow if the ordering between a request abort and a header-frame boundary went a particular way; the fix added a single bookkeeping entry in the one place that had been missing it. 123633 was a queue membership flag that could end up out of sync with actual stream state if a partial frame was received before the stream was created; the fix added the single dequeue call that had been missing in the one place that creates streams.
Two bugs, two code sites, one fix pattern. Both of them are the same architectural fact: the HTTP/2 module carries several pieces of state that are supposed to stay in agreement across concurrent event-driven callbacks, with no one piece of code holding responsibility for making them agree. Every transition between states depends on every other code path remembering to update every piece of state. 123007 was missed by the abort path. 123633 was missed by the stream-create path.
Both bugs sat untouched for over five years. 123007 landed in nginx 1.19.10 in April 2021. 123633 landed in nginx 1.19.7 in February 2021. They were five weeks apart. They were fixed five weeks apart in late 2026, a public disclosure cycle apart.
That is a module that needs a design pass, not a patch pass. It is a Design Debt Driver in the literal sense: the structural fact is that the HTTP/2 module's correctness is distributed over a convention-of-callers, and the surface area of the convention has grown faster than the number of people who remember it. If 123007 and 123633 had both been fixed on the same day with a single commit that said "track all of these per-stream bookkeeping items in one place with one writer," that would have been a design fix. What we got instead was two one-line patches that each said "you also need to update the state here."
The next one will be another one-line patch.
Sixty-two days from fix commit to CVE: a textbook Release Lag Disclosure
The public fix commit is September 17, 2026. The public disclosure is November 18, 2026. Sixty-two days between the fix landing in the F5 internal tree and the CVE appearing in the advisory.
Sixty-two days is longer than the twenty-day gap we noted on 123007. It is explainable; a coordinated five-CVE release is harder to stage than a single advisory. But we will say what we said three days ago: the fix was in F5's public git mirror at mdounin.ru the entire time, and anyone following the nginx committer tree could have read it. That is the structural fact about public-tree disclosure. The commit is the disclosure. The CVE is a label applied later.
If you watched the committer tree between September 17 and November 18, you had an exploit development window. If you watched the committer tree after November 18, you had a CVE write-up.
The PoC repos we pulled for this analysis are dated between November 18 and November 20. Every one of them re-derives the same fact Arutyunyan's commit message states plainly: the vulnerability is a missing ngx_reusable_connection(h2c->connection, 0) at stream creation. The commit message is the exploit development guide.
What to do
If you run nginx, you already know: upgrade to 1.30.7 or 1.31.9. There is no configuration mitigation. The reusable queue is not configurable. HTTP/2 is either on or off, and almost everyone has it on.
If you run a WAF in front of nginx, there is nothing to block. The attacker's traffic is a well-formed HEADERS frame followed by an fetch to any proxied upstream location, with enough concurrency to drive the worker's connection budget to zero. That is not a signature.
If you review C code for a living, the thing to internalize is the shape. A piece of state becomes a membership predicate for a data structure. The membership predicate is enforced by exactly one function, which is called from everywhere. The function has no symmetric counterpart in the call graph: every set has a matching unset, but the two are never called from the same place, so no one function is responsible for the pairing. The pairing depends on every caller knowing the full lifecycle of every object they touch. This is a pattern. It is the second one this week. It is not going to be the last.
The queue was a predicate. The predicate was held by convention. Convention was the mitigation.