NGINX HTTP/2 RCE Vulnerabilities (CVE-2026-123633 and CVE-2026-123007): Technical Analysis and How to Patch

The CyberSec Guru

NGINX HTTP_2 Vulnerability

If you like this post, then please share it:

Buy me A Coffee!

Support The CyberSec Guru’s Mission

🔐 Fuel the cybersecurity crusade by buying me a coffee! Why your support matters: Zero paywalls: Keep the main content 100% free for learners worldwide.

“Your coffee keeps the servers running and the knowledge flowing in our fight against cybercrime.”☕ Support My Work

Buy Me a Coffee Button

On November 18, 2026, F5 released security updates for two memory-corruption vulnerabilities in the HTTP/2 implementation of NGINX, the web server and reverse proxy that sits in front of a large share of the internet’s websites and APIs. CVE-2026-123633 and CVE-2026-123007 both carry a CVSS 4.0 base score of 9.2, and both let an unauthenticated remote attacker execute code in the NGINX worker process.

Wiz Research published the coordinated disclosure alongside F5’s advisory. It says it achieved reliable remote code execution with ASLR defeated on a server doing nothing more exotic than serving static files over HTTPS, with no backend application and no third-party modules involved. That detail sets this disclosure apart from the usual web-server CVE. The vulnerable component is the protocol machinery every HTTP/2 request passes through, not an optional module or a misconfigured handler. Wiz puts NGINX’s footprint at more than 225 million websites. W3Techs roughly agrees, placing it on about 30% of sites whose server it can identify, a share overtaken only by Cloudflare’s proprietary server in September 2026 and still the largest of any open-source web server.

What are the NGINX HTTP/2 vulnerabilities F5 patched on November 18, 2026?

What are the NGINX HTTP/2 vulnerabilities F5 patched on November 18, 2026?
Technical flowchart illustrating how CVE-2026-123633 causes a use-after-free through HTTP/2 connection lifecycle management, while CVE-2026-123007 exploits unsigned flow-control accounting to cause memory corruption in the TLS send path. Both vulnerabilities can potentially lead to remote code execution in an affected NGINX worker

The two bugs work differently. CVE-2026-123633 is a use-after-free in connection lifecycle management, reachable mainly when NGINX proxies requests to a backend and the worker is running short of connection slots. CVE-2026-123007 is an integer underflow in flow-control accounting that corrupts a length calculation all the way down into the TLS send path, and it reaches servers that only serve files from disk.

Both require HTTP/2 to be enabled on the affected listener. NGINX does not turn HTTP/2 on by itself, since the http2 directive defaults to off, so exposure comes from an explicit configuration choice.

Both bugs are old. The use-after-free has been present since NGINX 1.19.7 in February 2021, close to six years. The flow-control bug dates to 1.9.5 in September 2015, the release that introduced HTTP/2 support, so it survived more than eleven years of review in one of the most audited codebases in infrastructure software.

Five teams found them independently: Wiz Research, Ikotas Labs, Metnir, Rapid7, and Xint all reported the issues to F5. Wiz says its Atlas harness, the engine behind its AI code-scanning product, surfaced both vulnerabilities, and that its researchers used Gemini 4 Carbon and ChatGPT 5.6 Sol to validate that each could be turned into unauthenticated code execution. The proof-of-concept exploits are not being released.

CVE-2026-123633 PoC
CVE-2026-123007 PoC

Why a flaw in NGINX affects every application behind it

NGINX terminates TLS, parses the request, and decides which upstream gets the traffic, often for dozens of unrelated applications on the same host. A flaw at that layer does not care whether the application code behind it is secure. The request never has to reach the application for the worker to be compromised.

How NGINX rations worker connections

The first bug lives in connection bookkeeping rather than in the protocol parser, so it helps to see how NGINX hands out connections.

Each NGINX worker is a single event loop handling thousands of connections through non-blocking I/O. The worker_connections directive caps how many connection objects a worker can hold at once. The default is 512, and the documentation is explicit that the count includes connections to proxied servers, not just clients, so a reverse proxy serving one request consumes two slots. The connection objects come from a pre-allocated array, and when the free list runs dry the worker cannot accept new clients or open new upstream sockets.

To avoid a hard stall, NGINX keeps a queue of connections it considers reusable: idle keep-alive connections that can be closed to reclaim a slot. The invariant that makes this safe is simple to state and easy to violate. A connection belongs on the reusable queue if and only if nothing active depends on its memory.

📬 Stay Ahead of Cyber Threats

Get the latest cybersecurity news, critical vulnerabilities, threat intelligence, tutorials, and exclusive giveaways delivered straight to your inbox. No spam. Unsubscribe anytime.

The reclaim path is the trigger for CVE-2026-123633. Every call to ngx_get_connection() first invokes ngx_drain_connections(). That function does nothing while more than a sixteenth of the pool is free. Once free slots drop to connection_n / 16 or below, it starts closing reusable connections from the tail of the queue, oldest first, up to 32 at a time and scaled to an eighth of the reusable pool. With the default 512 slots, draining begins at 32 free connections.

Two implementation details matter a great deal. The drain does not post an event for later processing. It sets c->close = 1 and calls c->read->handler(c->read) synchronously, inside whatever call stack asked for the new connection. It also logs a warning, “worker_connections are not enough, reusing connections”, rate-limited to once per second, and if no slot can be freed at all it logs the alert “worker_connections are not enough”. Those log lines are real telemetry for the pressure condition the exploit needs, which makes them useful for detection.

CVE-2026-123633: use-after-free in NGINX HTTP/2 connection handling

The fragmented HEADERS frame and the reusable connection queue

The use-after-free begins with a fragmented HEADERS frame. HTTP/2 requests arrive as HEADERS frames carrying HPACK-compressed header fields, and a frame can be split across TCP segments or continued in CONTINUATION frames, so the parser has to tolerate incomplete input. When only part of a HEADERS frame has arrived, no request stream exists yet, and ngx_http_v2_handle_connection() treats the connection as idle. The function first returns early if h2c->last_out or h2c->processing is nonzero. With nothing pending, it marks the connection reusable and checks whether the frame parser is mid-frame:

ngx_reusable_connection(c, 1);
if (h2c->state.incomplete) {
return;
}

That early return is the crux. When the frame is complete, the function continues on to destroy the per-connection pool, set c->destroyed = 1, and switch the read handler to ngx_http_v2_idle_handler(). That handler clears the reusable flag with ngx_reusable_connection(c, 0) when new data wakes the connection.

When the frame is incomplete, none of that happens. The pool stays alive, the read handler stays ngx_http_v2_read_handler, and the connection sits on the reusable queue waiting for the rest of its bytes. When those bytes arrive, the read handler parses them directly, without passing through the idle handler that would have unmarked the connection. ngx_http_v2_create_stream() then builds the request stream and increments h2c->processing, but, as Wiz’s writeup describes, it does not remove the connection from the reusable list. The connection now has an active request and is still flagged as safe to close.

The cleanup exists on one transition path and is missing on the other. That kind of asymmetry survives years of review because each function looks correct in isolation.

Forcing the worker to close a live connection

Turning that inconsistency into a freed object requires the worker to close the connection while its own request is running. This is where the reverse-proxy configuration earns its place in the advisory.

Forwarding a request with proxy_pass opens an upstream socket, which calls ngx_get_connection(), which calls ngx_drain_connections() when slots are scarce. The attacker’s HTTP/2 connection is still on the reusable queue, and because the drain selects from the oldest end, a client that controls connection churn can arrange for it to be chosen. The drain then calls the connection’s read handler synchronously, inside the very call stack that is processing the request. The read handler sees c->close, notices that h2c->processing is nonzero, and tries to send a GOAWAY frame so the client learns the connection is going away.

That allocation can fail. Control-frame allocation in ngx_http_v2_get_frame() first reuses frames from the connection’s free list, then allocates new ones while the per-connection frame counter h2c->frames is below 10,000. Beyond that ceiling it must recycle a queued frame or give up. The DATA-frame path enforces the same 10,000 cap and logs “http2 flood detected” when it hits it. Frames are recycled only after they are sent, so a client that keeps response data queued by withholding flow-control credit pushes the connection toward that ceiling. With the default http2_chunk_size of 8k, the budget corresponds to roughly 80 MB of queued response data. Wiz notes that when the budget is exhausted and no frame is available for reuse, creating the GOAWAY fails, and the error path finalizes the connection.

Why the freed memory is exploitable

Finalization is where the memory dies. ngx_http_v2_finalize_connection() walks the connection’s streams, marks each fake connection errored, and invokes its event handler, which can finalize the request and decrement h2c->processing. On the error path the connection is closed and its pool destroyed. All of this happens synchronously, re-entering the request that is still on the stack inside ngx_get_connection(). When control unwinds back to the upstream connect code, the request object, the connection object, and the HTTP/2 state it was using have been freed.

That is the use-after-free, and it is a rich one. The structures reachable from a freed HTTP/2 connection are full of function pointers, including the read and write event handlers on the connection and the per-frame handler callback in ngx_http_v2_out_frame_t. NGINX allocates per-connection pools over malloc, so an attacker who can open and close connections controls the allocation churn that decides what lands in the freed region.

Wiz says the same primitive yields a memory read before the write, which is how the exploit defeats ASLR. The attacker leaks addresses through the stale pointers, computes the base of the binary and libraries, then shapes the reclaim so a handler pointer lands where the attacker wants it. F5’s advisory K000163928 classifies the bug as CWE-416 and assigns it internal ID NPS-319. It is careful to say that code execution applies on systems with ASLR disabled or where the attacker can bypass ASLR. Wiz’s contribution is showing that the bypass is practical. The advisory also notes there is no control-plane exposure, only the data plane, which is relevant context for NGINX Plus and NGINX One customers.

Affected versions for CVE-2026-123633

The version history explains why this bug starts at 1.19.7 and not at the dawn of HTTP/2 support. That release, published February 16, 2021, reworked HTTP/2 connection handling “to better match HTTP/1.x”, retiring the old http2_recv_timeout, http2_idle_timeout, and http2_max_requests directives in favor of the standard keep-alive machinery. The reusable-connection integration this bug abuses came out of that rework.

F5 lists the vulnerable open-source ranges as 1.19.7 through 1.30.6 and 1.31.0 through 1.31.8, with fixes in 1.30.7 stable and 1.31.9 mainline.

CVE-2026-123007: integer underflow in NGINX HTTP/2 flow control

The second vulnerability is older and broader, and arguably more elegant, because it corrupts a single integer and lets the rest of the codebase do the damage.

How the HTTP/2 send window goes out of bounds

HTTP/2 flow control is a credit scheme defined in RFC 9113. Only DATA frames consume window space. The initial window is 65,535 octets for both a new stream and the connection. The receiver grants more credit with WINDOW_UPDATE frames carrying an increment between 1 and 2^31-1, and a sender must never let its window exceed 2^31-1 octets. An increment that would push it past the maximum is a FLOW_CONTROL_ERROR (sections 5.2, 6.9, and 6.9.1).

NGINX tracks the connection-level allowance in h2c->send_window, declared as size_t in ngx_http_v2_connection_s, an unsigned 64-bit type on the platforms Wiz tested. When the output filter queues response data, ngx_http_v2_send_chain() debits the window by the frame size before the bytes go out. The accounting is debit-on-queue, not debit-on-send, and that distinction is the whole bug.

A client can cancel a stream at any time with RST_STREAM, which RFC 9113 section 6.4 defines as immediate termination. When a stream dies with DATA frames still queued, ngx_http_v2_filter_cleanup() walks the connection’s output queue, removes the frames belonging to that stream, sums their lengths, and refunds the credit with h2c->send_window += window;. The refund is semantically right, since the data was never sent, but it performs no bounds check. If the client has been sending WINDOW_UPDATE frames while the data sat queued, the window has already grown, and adding the refund on top can push send_window past the protocol maximum. NGINX is now holding a value the rest of the module assumes is impossible.

The guard meant to enforce the ceiling, in ngx_http_v2_state_window_update(), computes the remaining headroom by subtraction:

if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window)

Once send_window exceeds NGX_HTTP_V2_MAX_WINDOW, that subtraction should come out negative. Because the operands are unsigned, it wraps to an enormous positive value instead. The comparison concludes there is plenty of room, and the increment is accepted. Every subsequent WINDOW_UPDATE makes the counter larger, and the check that should have stopped the first violation waves through all the rest.

From here the attacker keeps sending WINDOW_UPDATE frames on stream 0 to drive the counter toward the sign bit of a 64-bit signed integer. The arithmetic sets the scale of the attack. Each frame can add at most 2^31-1, so reaching 2^63 takes on the order of 2^32 frames, about 4.3 billion of them, or roughly 56 GB of WINDOW_UPDATE traffic at 13 bytes per frame.

NGINX’s own anti-flood heuristic shapes the rest. The read handler terminates a connection when total_bytes / 8 exceeds payload_bytes + 1048576, where total_bytes counts traffic in both directions and payload_bytes counts response payload actually sent. Working through that inequality, an attacker needs roughly 1.9 bytes of downloaded response payload for every WINDOW_UPDATE frame to keep the heuristic quiet. For 4.3 billion frames, that means about 8 GB of genuine file downloads interleaved with the flood.

These figures are estimates derived from the protocol limits and the code’s constants, not measurements from Wiz’s lab. They do explain why the company’s detection guidance points at long-lived HTTP/2 connections moving large amounts of data, and why a detector keyed only on frame counts would miss an attack that patiently downloads files to stay under the ratio. The corrupted window is per-connection state, so the entire sequence has to fit inside one connection’s lifetime, before keep-alive accounting closes it.

From a corrupted counter to an out-of-bounds copy

The payoff arrives when the corrupted counter is reinterpreted as a signed length. In ngx_http_v2_send_chain(), a limit of zero, meaning “no limit”, is replaced with the connection window through this line:

if (limit == 0 || limit > (off_t) h2c->send_window) { limit = h2c->send_window; }

The cast to off_t, a signed 64-bit type, turns a window above 2^63 into a negative limit. A few lines later, if ((off_t) frame_size > limit) { frame_size = (size_t) limit; } casts that negative limit back to size_t, producing a huge positive chunk size. The remainder of that size is passed to ngx_http_v2_filter_get_shadow(), which builds a shadow buffer describing a slice of the response. Its length parameter is off_t, so the huge size becomes negative again, and the buffer is constructed with chunk->last = chunk->pos + size;. A negative size leaves last before pos, a malformed buffer whose end precedes its start.

That buffer is attached to a DATA frame and handed down the send chain. On a TLS connection the chain reaches ngx_ssl_send_chain(), which computes buffer lengths as last minus pos and passes them through further signed and unsigned conversions while copying data into its SSL buffer and calling OpenSSL. As Wiz describes it, those conversions turn the invalid length into an out-of-bounds memory copy, which the attacker can use to disclose memory and corrupt the heap. The disclosure primitive comes first and leaks pointers that defeat ASLR. The heap corruption follows and leads to code execution.

Wiz confirmed the full chain on official NGINX 1.31.7 and 1.31.8 builds, over HTTP/2 on TLS, on 64-bit systems serving response data from memory.

Why static-file servers over TLS are exposed

The phrase “from memory” is the quiet detail that makes static-file servers vulnerable, and it follows from how NGINX handles TLS. With plain HTTP, NGINX can hand a file descriptor to sendfile() and never copy the file into user space. With TLS it generally cannot, because the data has to be encrypted in user space. Kernel TLS offload via SSL_sendfile() arrived only in 1.21.4 with OpenSSL 3.0 and is not the common case.

An ordinary HTTPS request for a static file is therefore read into buffers and pushed through exactly the ngx_ssl_send_chain() path the exploit corrupts. No application logic, database, or third-party module is required, which is why Wiz’s demonstration against a bare static-file server is the more alarming of the two results.

F5 lists the vulnerable open-source ranges for this CVE as 1.9.5 through 1.30.6 and 1.31.0 through 1.31.8, fixed in the same 1.30.7 and 1.31.9 releases.

How hard are these NGINX HTTP/2 bugs to exploit?

Neither bug is a point-and-shoot exploit, and the disclosure is candid about that. Memory-safety exploitation at this depth requires leaking addresses, grooming the heap into a predictable shape, and accommodating differences in NGINX version, build, and configuration. Wiz built proof-of-concepts against common configurations seen in customer environments and is withholding them.

The use-after-free also needs the worker under connection-slot pressure and a request that opens an upstream connection, which is why it matters most for reverse proxies. The flow-control bug needs a patient, long-lived connection and a large volume of traffic in both directions. Both assume the attacker can speak HTTP/2 directly to the affected server.

A CDN or WAF that terminates HTTP/2 at the edge may disrupt the attack by normalizing frames and not reflecting the exact byte sequences back to the origin. Wiz stresses this depends on the implementation and is not a reliable defense, and the edge itself may be running the same vulnerable software. Wiz’s experience with earlier AI-assisted discoveries is that mass exploitation tends to start against packaged products where thousands of customers run an identical build and configuration, while motivated attackers tailor exploits for specific victims. Even where code execution is out of reach, both flaws can crash the worker, so the denial-of-service floor is real regardless of ASLR.

F5’s advisory reflects this gating in its scores: a CVSS v3.1 base of 8.1 (High) alongside the CVSS v4.0 base of 9.2 (Critical), with Wiz reporting the same 9.2 for both CVEs. In practice that means unauthenticated network exploitation with full compromise of the worker, conditioned on configuration and timing rather than credentials.

AI-assisted vulnerability discovery: five teams, the same two bugs

How the bugs were found may matter more than the bugs themselves. Wiz attributes discovery to Atlas and impact validation to large language models, and five independent teams converging on the same two flaws within a short window is hard to dismiss as coincidence.

The traditional barrier to finding bugs like these was cognitive. Spotting the reusable-list asymmetry means holding the frame parser, the stream state machine, the connection pool, and the upstream connect path in mind at once. Spotting the flow-control bug means reasoning about unsigned arithmetic across a refund path, a guard, and two type casts in different functions. That complexity worked as a practical defense for years, because bugs too subtle for humans to find reliably were unlikely to be exploited. Tool-assisted analysis that can trace those interactions at scale removes the barrier, for attackers as well as defenders.

The NGINX changelog already records the pattern. The 1.29.7 release in March 2026 credits the dav-module overflow CVE-2026-27654 to “Calif.io in collaboration with Claude and Anthropic Research”, an explicit acknowledgment of AI-assisted discovery in the project’s own release notes. F5 has shipped security fixes for NGINX repeatedly through 2026, with the October 14 out-of-band advisory alone covering eleven vulnerabilities, and the November 18 release continues that cadence.

The implication for defenders is uncomfortable. The interval between a flaw’s introduction and its discovery is shrinking, and the interval between disclosure and exploitation is shrinking with it. Complexity can no longer be treated as a security boundary, and patch velocity becomes a first-class operational metric instead of a quarterly chore.

How to patch CVE-2026-123633 and CVE-2026-123007

Fixed NGINX versions

For NGINX Open Source, both CVEs are fixed in 1.30.7 stable and 1.31.9 mainline, so a single upgrade closes both.

NGINX Plus is messier because F5’s tables list different fixed builds per CVE: 37.0.7.1 and 37.2.0.1 for the use-after-free, and 37.0.8.1 and 37.3.0.1 for the flow-control underflow. Install a build that appears in the fixed column for both advisories. On the 37.0 branch that means 37.0.8.1 or later, and on the newer branch 37.3.0.1 or later. F5’s standing policy that a later fix in the same branch supersedes an earlier one supports reading the higher build as covering both.

F5’s advisory for the use-after-free marks BIG-IP, BIG-IQ, F5OS, and the other listed products as not vulnerable. Distributed Cloud and NGINX One Console were still under evaluation at publication, so customers of those services should watch for updates and not assume either way.

Interim mitigation: disable HTTP/2

Where an immediate upgrade is impossible, the interim mitigation follows from the prerequisite. Both bugs need HTTP/2, so turning it off removes the attack surface. On NGINX 1.25.1 and later, set http2 off; in the affected server blocks and remove the deprecated http2 parameter from any listen directives. On older releases, removing the parameter is the mechanism. Because the directive defaults to off, the audit is really a search for explicit enables, a smaller surface than the installed base suggests.

Test the configuration with nginx -t, reload, and then verify that the old workers have actually exited. A reload spawns new workers with the new configuration while the old ones keep serving existing connections until they drain. worker_shutdown_timeout bounds that graceful period if long-lived connections would otherwise keep vulnerable workers alive indefinitely.

The compatibility cost is real and worth planning for. Clients fall back to HTTP/1.1 via ALPN, losing multiplexing and header compression, and gRPC clients break outright, since the gRPC module requires HTTP/2 on the client-facing listener and its documentation builds its example around http2 on. HTTP/3 listeners are a separate module and a different attack surface, though the advisories scope both flaws to ngx_http_v2_module, and that is no reason to leave them unpatched.

F5’s advisory lists “Mitigation: None” in the formal sense of an official workaround. Disabling HTTP/2 is Wiz’s practical interim guidance, derived from the protocol prerequisite, and it should be reversed once the upgrade is verified.

How to detect NGINX HTTP/2 exploitation attempts

There are no published indicators of compromise, and Wiz is explicit that the signals it suggests are general warning signs and not confirmed evidence of these CVEs. The most useful telemetry is already in NGINX’s own logs.

  • Worker crashes. The master records a worker exiting on a signal such as SIGSEGV. That is the classic signature of memory corruption and deserves investigation, particularly if the crashes cluster on HTTP/2 listeners.
  • Commands spawned by the worker. Visible through auditd or eBPF execve tracing, this is a strong post-exploitation signal, since a web server worker has no legitimate reason to launch a shell.
  • Connection-pressure log lines. For the use-after-free, the pressure condition announces itself through the warning “worker_connections are not enough, reusing connections” and the alert “worker_connections are not enough”. A spike on a proxy under load is worth correlating with connection churn and partial HEADERS behavior.
  • HTTP/2 flood messages and frame anomalies. For the flow-control bug, the “http2 flood detected” info line can appear as a side effect of the frame-budget and ratio heuristics. The attack’s shape, a long-lived connection sending an anomalous volume of WINDOW_UPDATE frames while cancelling streams and downloading substantial response data, is detectable in principle by anything that inspects HTTP/2 framing. Access logs will not show it, because they record requests and not frames, which is the gap an attacker relies on.

None of these signals is specific to these two CVEs, and a patient attacker can stay beneath heuristic thresholds. Detection is a backstop to patching, not a substitute for it.

NGINX HTTP/2 patch checklist: what to do now

Both vulnerabilities are failures of invariants, not parsing. A connection that should have left the reusable queue when its request started did not, and a bounds check that should have accounted for refunded credit was written as an unsigned subtraction that wraps when the premise breaks. Each looks defensible in isolation and fails in the one case that matters, which is how they survived six and eleven years respectively in code that is read constantly.

The operational steps are short:

  1. Inventory every listener where HTTP/2 is explicitly enabled.
  2. Determine whether each one runs a vulnerable build.
  3. Upgrade to a release that fixes both CVEs: NGINX 1.30.7 or 1.31.9 for Open Source.
  4. If you must defer, disable HTTP/2 deliberately, test the fallback, reload, and confirm the old workers are gone.

NGINX sees every request before any application does, and a flaw at that position compromises everything behind it regardless of how well the applications are written.

Buy me A Coffee!

Support The CyberSec Guru’s Mission

🔐 Fuel the cybersecurity crusade by buying me a coffee! Your contribution powers free tutorials, hands-on labs, and security resources.

Why your support matters:
  • Writeup Access: Get complete writeup access within 12 hours
  • Zero paywalls: Keep the main content 100% free for learners worldwide

Perks for one-time supporters:
☕️ $5: Shoutout in Buy Me a Coffee
🛡️ $8: Fast-track Access to Live Webinars
💻 $10: Vote on future tutorial topics + exclusive AMA access

“Your coffee keeps the servers running and the knowledge flowing in our fight against cybercrime.”☕ Support My Work

Buy Me a Coffee Button

If you like this post, then please share it:

Exploits

Discover more from The CyberSec Guru

Subscribe to get the latest posts sent to your email!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.