nginx CVE-2026-123007 deep dive: the refund that broke HTTP/2

An HTTP/2 flow control counter goes past its limit and disarms its own check. The mechanism, the 8-line fix, who is really exposed and what to do until your package ships.

Capa escura com o código CVE-2026-123007, os chips CVSS 9.2, nginx 1.9.5–1.31.8 e a correção 1.30.7 · 1.31.9, e um alvo desenhado em traço branco com um acento vermelho
O bug não está numa extensão exótica: está no controle de fluxo que todo servidor HTTP/2 do nginx executa.

On Wednesday, 18 November 2026, nginx released 1.31.9 (mainline) and 1.30.7 (stable) with ten security fixes. The most serious is CVE-2026-123007, which the project describes as "memory corruption in HTTP/2 flow control": an HTTP/2 flow control counter goes past the limit the protocol allows, and from there the worker can write outside its buffer. Rapid7, Wiz and Xint, who reached the bug independently, showed unauthenticated remote code execution in the worker process. Every official release from 1.9.5 (2015) to 1.31.8 is affected when HTTP/2 is on.

nginx sits at the edge of a lot: websites, APIs, gateways, Kubernetes ingress, container base images. So this article does not retrace the labs' path. It explains the mechanism from the fix commit, shows where the flaw has to sit in your architecture to matter, and separates what you can do today from what depends on your distribution's package.

Summary

ItemDetail
Componentnginx HTTP/2 module (src/http/v2/), connection flow control
FlawThe connection send credit goes past 2³¹−1; the WINDOW_UPDATE check wraps and the write leaves the buffer
Project severity"major", on nginx.org
CVSS 3.1 (F5)8.1, high — AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (vector from Ubuntu and Red Hat)
CVSS 4.0 (F5)9.2, critical — F5 does not publish the vector; Ubuntu uses AT:N, Rapid7 uses AT:P
CWECWE-191, integer underflow (F5 and Rapid7); CWE-787 (Red Hat)
ScopeData plane only, no control plane exposure (F5)
Privileges / interactionNone / none
PreconditionHTTP/2 enabled on a listen the attacker can reach
WorkaroundF5 says "None"; researchers advise turning HTTP/2 off (http2 off; from 1.25.1)
Active exploitationNo source consulted reports it; not in CISA KEV as checked on 18/11/2026
Proof of conceptRapid7 published one; Wiz and Xint say they are not releasing theirs
CreditRapid7 (Stephen Fewer), Wiz Research (Tomer Schwartz), Xint.io and Ikotas Labs, per F5. The commit says "Reported by Xint.io"

The problem in one sentence

When a stream ends, nginx gives the connection back the credit of the data still in the queue, and that refund did not respect the protocol's ceiling: the counter goes past the limit and the arithmetic that should block the next WINDOW_UPDATE starts accepting any value.

Flow control in two minutes

In HTTP/2 the receiver decides how much the other side may send. The client grants credit to the server with WINDOW_UPDATE frames, for the whole connection (stream 0) or for one stream. The server spends that credit with each DATA frame it sends. RFC 9113 sets a ceiling: no window may exceed 2³¹−1 bytes. nginx keeps that ceiling in the constant NGX_HTTP_V2_MAX_WINDOW and the connection credit in h2c->send_window, an unsigned size_t.

The check that guards the ceiling, in ngx_http_v2_state_window_update(), is a subtraction:

if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
    /* "client violated connection flow control" → connection error */
}

It only works while send_window is at or below the ceiling. If the counter goes past it, the unsigned subtraction wraps into a huge number and the check accepts any increment.

The mechanism

The fix commit message, signed by Roman Arutyunyan, describes the flaw in a few lines, and the three public analyses agree with it. In order:

  1. nginx queues a DATA frame and subtracts its size from the connection and stream credit.
  2. Before that frame leaves, the client grants more credit. The check compares the request with the already reduced send_window, so it accepts a value that, added to the queued bytes, exceeds the ceiling.
  3. The stream is terminated with frames still queued. On cleanup (ngx_http_v2_filter_cleanup()), nginx refunds the credit of the unsent bytes to the connection, without comparing against the ceiling. send_window is now above 2³¹−1.
  4. The check from step 2 wraps and stops blocking. The credit can keep climbing.
  5. In ngx_http_v2_send_chain(), that huge unsigned value is converted to the signed off_t and becomes a small negative number. The size guards only trim values that are too large, not negative ones. The result is a buffer whose end sits before its start, and the copy into the TLS output buffer reads and writes out of bounds.
Five-step diagram: DATA frame queued and subtracted from the credit; client grants more credit and the check accepts because it ignores the queue; terminated stream refunds the credit without a ceiling and send_window exceeds 2^31−1, step highlighted in red; the check's subtraction wraps and accepts any WINDOW_UPDATE; send_chain converts to off_t, the length becomes negative and the copy leaves the buffer
From the uncapped refund to the out-of-bounds write, per commit e27f5fa and the analyses by Rapid7, Wiz and Xint.

Underflow or overflow?

The sources do not use the same name, and both readings are right. The counter goes past the protocol ceiling, and the nginx changelog speaks of a "flow control window overflow". The check is an unsigned subtraction that wraps, which is why Rapid7 calls it an "integer underflow" and cites CWE-191. F5's official advisory also uses CWE-191. Red Hat classifies it by effect: CWE-787, out-of-bounds write.

From bug to code execution

All three teams show the path to running commands as the worker user. For defenders, what matters is what they say about the conditions:

  • Leak before write. The same out-of-bounds copy sends memory pointers back to the client, which defeats ASLR. It does not need another bug.
  • Long, heavy connection. Rapid7 measured about 128 GB of HTTP/2 traffic on one connection. Xint cites about 119 GiB of plaintext. By Rapid7's numbers, below roughly 300 Mbit/s the connection cannot finish within the default one-hour lifetime.
  • Depends on layout and hardware. Rapid7 says its technique relies on glibc's x86-64 copy routine with AVX-512 and that on other paths the worker crashes instead of corrupting. Xint says its own worked on varied hardware. In common: a failed attempt crashes the worker.
  • From worker to host. Xint chained the bug with a flaw in the Linux kernel's SCTP and says it reached root on the host from inside a container. Rapid7 says it did not demonstrate execution as root or in the master process.

Why it is "AC:H" and still critical. Exploitation needs volume, per-build tuning and some luck with memory layout. It does not need credentials, an extra module or an unusual configuration: Wiz reproduced it on an nginx serving static files.

Assess your environment before you rush

The right question is not "do I run nginx?" but "which process terminates the client's HTTP/2?". That is the one receiving the WINDOW_UPDATE frames from whoever is on the other side.

SituationExposureWhy
nginx 1.9.5–1.31.8 at the edge, with http2 on listen or http2 on;ExposedIt terminates the client's HTTP/2
CDN, WAF or load balancer terminates HTTP/2 and speaks HTTP/1.1 to nginxReducednginx does not receive the client's frames. Wiz calls this a reduction, not elimination
Load balancer forwards TCP/TLS without terminating (L4, passthrough)ExposedThe frames reach nginx intact
nginx behind another HTTP/2 proxyProbably reducedRapid7 judges an intermediate HTTP/2 hop unlikely to forward the attacker's frames reliably
nginx with HTTP/1.1 onlyNot affected by this CVEThe flow control code does not run
Internal nginx (sidecar, dashboard, service-to-service gateway) with HTTP/2Depends on who can reach itNo authentication needed: any client on a reachable network will do

Three checks are enough to find out where you stand:

nginx -v                                   # version of the running binary
nginx -T 2>/dev/null | grep -nE 'listen .*http2|^\s*http2 '   # where HTTP/2 is on

And, from outside, check what the public endpoint negotiates: if ALPN answers h2, something in front (or nginx itself) is terminating HTTP/2.

Where nginx shows up without you installing it

  • Base images. nginx:* and nginx:*-alpine, frontend images serving a static build, third-party images that bundle nginx as their web server. The fix only exists after a rebuild on the new base.
  • Kubernetes ingress. ingress-nginx and F5's NGINX Ingress Controller run nginx inside and usually terminate the client's TLS and HTTP/2. In its advisory, F5 lists only NGINX Plus and NGINX Open Source as vulnerable and marks "NGINX (all other products)" as not vulnerable, without naming each product: in practice, what counts is the nginx version inside the controller image. ingress-nginx is a Kubernetes community project outside that advisory, and no source consulted gives a fixed version for it. Aikido states that ingress-nginx will not get a fix for CVE-2026-123633, the other HTTP/2 flaw in the batch.
  • Distribution packages. Debian and Ubuntu may apply the patch without changing the version number, so nginx -v alone does not settle it for a distro package: check the package changelog.
  • Derivatives. OpenResty, Tengine and Angie inherit nginx code; no source consulted gives their status.

Fixed versions

ProductAffectedFixed
nginx open source, mainline1.31.0 – 1.31.81.31.9
nginx open source, stable1.9.5 – 1.30.61.30.7
Older lines (1.28 and earlier)yesno fix; move to 1.30.7
NGINX Plus 37.0.x37.0.0 – 37.0.7.137.0.8.1
NGINX Plus 37.1–37.237.1.0 – 37.2.0.137.3.0.1
NGINX Plus R34 – R36yesno fix; F5 advises moving to a fixed version
BIG-IP, BIG-IQ, F5OS, BIG-IP CNF, F5 AI Gatewayno—
F5 Distributed Cloud, NGINX One Consoleunder F5 review—

Distribution status on the afternoon of 18/11/2026:

DistributionPackageStatus
Debian 12 (bookworm)1.22.1vulnerable, no fix
Debian 13 (trixie)1.26.3vulnerable, no fix
Debian forky / sid1.30.6vulnerable, no fix
Ubuntu 16.04 to 26.10variousvulnerable, no fix; high priority
Ubuntu 14.041.4.6not affected (no HTTP/2)
Red Hat—preliminary CVSS 8.1; no product table published

The nginx and NGINX Plus versions come from F5 advisory K000163926, published on 18/11/2026, which matches nginx.org, Rapid7 and Wiz. F5 notes it may still update the page for the products under review.

The fix

Commit e27f5fa has 6 lines added and 2 removed across 3 files. Instead of capping the refund, it changes the question the check asks. In the commit message's words: "From the client's point of view, the queued frames still belong to the flow control window."

FileChange
ngx_http_v2.hNew connection field send_queued: bytes already taken from the credit but still in the queue
ngx_http_v2_filter_module.cAdded when a frame is queued; subtracted when the frame leaves or when cleanup refunds the credit
ngx_http_v2.cThe check becomes window > MAX − send_window − send_queued, and the log shows the real window

With that, send_window + send_queued never exceeds the ceiling. The cleanup refund only returns what was already counted, and the check's subtraction has no way to wrap.

The ten CVEs fixed in nginx 1.31.9, by project severityCVEs
The ten CVEs fixed in nginx 1.31.9, by project severity
CVEs
major3
medium4
minor3

nginx.org, security advisories, 18/11/2026

CVE-2026-123007 is one of the three "major" ones, next to an infinite loop while reading the request body over TLS 1.3 (CVE-2026-118899) and a use-after-free in the mail proxy (CVE-2026-113425). Xint groups five of them, plus the kernel SCTP flaw, under the name nginx2root. Upgrading to 1.31.9 or 1.30.7 fixes them all at once. Turning HTTP/2 off only blocks this one and CVE-2026-123633.

What changes for operators

Upgrade

It is a fix release within the same line, with no directive changes. If you are on 1.30.x or 1.31.x, upgrade the same day. On 1.28 or earlier there is no fix in your line and you need to move to 1.30.7, which calls for the testing of any minor version upgrade.

Workaround: turn HTTP/2 off

  • From 1.25.1: http2 off; in every affected server and remove http2 from the listen lines. Before 1.25.1: remove http2 from listen.
  • HTTP/1.1 clients keep working. What breaks is anything that relies on HTTP/2, such as native gRPC.
  • nginx -s reload keeps existing connections on the old workers until they close. Confirm the old workers are gone, or restart in a window.
  • It is temporary: Wiz recommends turning HTTP/2 back on after upgrading.
  • F5 lists the mitigation as "None". Turning HTTP/2 off removes the precondition, but it is the researchers' advice, not the vendor's: treat it as a bridge to the upgrade.

Performance

The fix adds one field and two additions per frame. No source points to a measurable cost, and the change does not alter the behaviour of clients that follow the protocol.

Detection

WINDOW_UPDATE and RST_STREAM are control frames: they do not show up in the access log and TLS hides them on the wire. The useful signals, per Wiz and Xint, are indirect:

  • long HTTP/2 connections with volume far above normal (compare $connection and $connection_requests in a log_format, or bytes per connection);
  • workers restarting in error.log (signal 11, exited on signal);
  • unexpected processes running as the worker user (an execve rule in auditd).

After the fix, a client that tries to inflate the window hits the new check and gets a connection error. nginx logs "client violated connection flow control" at info level, which only shows up if error_log is set to that level.

Timeline

DateEvent
2015nginx 1.9.5 brings HTTP/2 and, with it, the affected code
11/10/2026Xint finds the set it calls nginx2root
16/10/2026Xint reports through HackerOne
29/10/2026Date of fix commit e27f5fa
11–12/11/2026Rapid7 contacts F5 and sends its report
16/11/2026Wiz reports; F5 assigns the CVE and sets the publication date
18/11/2026nginx 1.31.9 and 1.30.7; coordinated disclosure

Checklist

  1. List every running nginx: VMs, base images, ingress, sidecars, third-party images.
  2. For each one, find out whether it terminates the client's HTTP/2 or whether something in front does.
  3. Exposed with no fixed package yet: turn HTTP/2 off on that server, reload and confirm the old workers are gone.
  4. Upgrade to 1.31.9 or 1.30.7. For a distribution package, confirm through the package changelog, not just the version.
  5. Rebuild images on the fixed base and redeploy. An old image still running is still vulnerable.
  6. On Kubernetes, follow your ingress controller's advisory before calling it done.
  7. Alert on worker restarts and unusual HTTP/2 connections until the upgrade is complete.
  8. Turn HTTP/2 back on where you turned it off.

Where Leavory fits

In most environments this fix arrives through the image: nginx ships inside the container and is only fixed after a rebuild on a new base. Leavory Image Scan scans up to five images, public or private, every day, with actively exploited vulnerabilities at the top, so you can see when an image in use still carries the old nginx. And Security Gate is a pipeline step that fails the build when a critical or high CVE has been public for longer than your team allows: past that deadline, an image with the vulnerable nginx does not move on to production.

Sources

Written by

Leavory Team Leavory team

Engineering and security at Leavory

The people who build Leavory. We write about what we learn running vulnerability management, pipelines and Kubernetes for our customers and for ourselves.

LinkedIn

See Leavory in action.

Tell us which platform you use, and an engineer, not a sales bot, will reach out to schedule a demo.

Which platform do you use?

A real conversation with an engineer.