If you run nginx in front of anything, stop and check one thing today. On 18 November F5 shipped nginx 1.30.7 and 1.31.9, and five research teams went public at the same time with two HTTP/2 memory corruption bugs: CVE-2026-123007 and CVE-2026-123633. Both carry a CVSS 4.0 score of 9.2, and unlike the Java4Shell reproduction I posted yesterday, a working RCE proof of concept is out in the open. The community name for the pair is NGINX2Shell. Here is the full technical breakdown.
Sources (all at the top, read them straight from the horse's mouth): nginx security advisories · F5 advisory for CVE-2026-123633 · Rapid7 writeup · Rapid7 PoC repo · nginx2shell.com (Ikotas Labs) · Xint's nginx2root · Wiz blog
The basics
| CVE | The bug | Trigger condition | CVSS 4.0 |
|---|---|---|---|
| CVE-2026-123007 | HTTP/2 send_window integer underflow (CWE-191) leading to an out-of-bounds memcpy | HTTP/2 enabled. Works even on a plain static-file server, no backend or third-party module needed | 9.2 |
| CVE-2026-123633 | HTTP/2 connection use-after-free (CWE-416) via ngx_drain_connections() | HTTP/2 enabled and nginx proxying to a backend while the worker runs low on free connections | 9.2 |
Wiz Research, Ikotas Labs, Metnir, Rapid7 and Xint reported the flaws to F5 independently, and the coordinated disclosure landed with the 18 November security release. nginx 1.9.5 through 1.31.8 is in the blast radius for the underflow, which means the bug sat in the code for eleven years. The UAF dates back to 1.19.7.
CVE-2026-123007: the flow-control math that breaks
HTTP/2 doles out permission to send. The client grants flow-control credit, nginx tracks it in two counters: one per stream and one for the whole connection, and a DATA frame must be paid for by both. The connection counter lives in h2c->send_window as a size_t, an unsigned 64-bit type, while the protocol caps the connection window at MAX = 231-1. That cap is nginx's job to enforce in its own logic. Rapid7's analysis shows exactly where it forgets.

Stage 1: credit refunded for data never sent
The attacker asks for big responses and then reads them slowly. Transport backpressure keeps DATA frames queued, and credit for each queued frame is deducted up front. Then the attacker closes those streams with a SETTINGS frame that raises SETTINGS_INITIAL_WINDOW_SIZE enough to push active streams over the cap. RFC 9113 says that is a FLOW_CONTROL_ERROR that ends the whole connection; nginx instead RST_STREAMs the offending streams and keeps the connection alive. Request cleanup for the dead streams runs this code (quoted from the Rapid7 writeup):
// src/http/v2/ngx_http_v2_filter_module.c
// ngx_http_v2_filter_cleanup()
if (frame->stream == stream && !frame->blocked) {
*fn = frame->next;
window += frame->length; // totals the bytes of unstarted DATA frames
}
// ...
h2c->send_window += window; // restored with NO check against MAXSo if the counter was pushed to exactly MAX first (one connection WINDOW_UPDATE gets you there), refunding, say, 1,393 bytes of never-sent data lands it at 0x80000570. Still a perfectly valid size_t, completely invalid per HTTP/2. The invariant is broken and the connection is still open.
Stage 2: the unsigned subtraction underflows
// src/http/v2/ngx_http_v2.c
// ngx_http_v2_state_window_update()
if (window > NGX_HTTP_V2_MAX_WINDOW - h2c->send_window) {
return ngx_http_v2_connection_error(h2c,
NGX_HTTP_V2_FLOW_CTRL_ERROR);
}
h2c->send_window += window;With send_window sitting above MAX, the subtraction MAX - send_window on an unsigned type wraps to a giant number like 264-R, so every subsequent WINDOW_UPDATE passes the check. From there the attacker just floods the connection with maximum-size increments until the top bit of the counter is set. That is why this bug is expensive to exploit: reaching the working values takes on the order of 233 frames and about 119 GiB of plaintext in Rapid7's reproduction. Over 10 Gbit/s that is roughly two and a half minutes, over 1 Gbit/s about seventeen minutes, and anything slower than ~300 Mbit/s dies against nginx's default one-hour connection limit. An intermediate proxy that re-frames your connection also breaks the precise frame timing the exploit needs.
Stage 3: a negative length meets memcpy
Here is where unsigned meets signed. The output filter stores the limit in an off_t, which is signed. The counter value near 264 reinterprets as a small negative number. The bounds checks in ngx_http_v2_send_chain() only shrink lengths that are too large; none of them rejects a negative one. A shadow buffer gets built with its last pointer before its pos, and later ngx_ssl_send_chain() computes size = last - pos, gets a negative, and hands memcpy a byte count of 264-d.
// src/event/ngx_event_openssl.c
// ngx_ssl_send_chain()
size = in->buf->last - in->buf->pos; // negative
if (size > buf->end - buf->last) {
size = buf->end - buf->last; // only shrinks big values,
} // never rejects negatives
ngx_memcpy(buf->last, in->buf->pos, size); // size_t: 2^64 - dA copy that actually walked 18 exabytes would segfault, and on many layouts it does. But glibc's EVEX/YMM memcpy on x86-64 takes a backward-copy branch where the end-address arithmetic itself wraps, the loop exits after a handful of vectors, and the function returns. Those few reads and writes land outside the real buffers. The read side leaks the bytes sitting just before the response body, which is full of heap and libc pointers, an ASLR bypass handed over the wire. The write side lets attacker-controlled bytes from request data overwrite fields in a neighboring heap object, including callback pointers. Rapid7's PoC parses leaked glibc ELF metadata to locate system() and redirects a request-pool cleanup callback to run it. Code execution as the nginx worker user.
CVE-2026-123633: the use-after-free on the reuse list
The second bug needs no 128 GB of traffic, but it needs a different setup: nginx talking HTTP/2 to clients while proxying to backends. A partial HEADERS frame (header data that trickles in and stalls) makes ngx_http_v2_handle_connection() mark the connection as reusable and park it on the reuse list. When the rest of the frame finally arrives, ngx_http_v2_create_stream() picks the connection up and starts serving requests on it, but never takes it off that list. If the worker is running low on free worker_connections, ngx_drain_connections() walks the list looking for idle connections to close and free, finds this one, and frees memory an in-flight request is still using. Classic UAF, and Wiz showed it reaching RCE with an ASLR bypass.
F5 rates this one "medium" severity in its advisory (it needs connection pressure to hit), while CVSS 4.0 puts it at 9.2 once weaponized. Reverse proxies under load are the exposed population, which is most of them.
What is actually public, and what it works against
Rapid7 published sfewer-r7/CVE-2026-123007, a Python framework with --target and --cmd flags and a demo video of unauthenticated RCE against a stock linux/amd64 docker image of nginx 1.31.8. Before you reach for it, know the gate: it works against golden profiles only, Debian 13 amd64 docker builds of nginx 1.31.6 and 1.31.8, because the exploit leans on one specific glibc memcpy routine and a clean initial heap layout. A worker that has been running, serving concurrent clients, or sitting behind an h2-terminating proxy will not behave the same. The repo ships profile_tool.py to build profiles for other builds, so expect coverage to widen over the coming weeks. Xint goes further: their nginx2root work chains the same nginx bug with a Linux kernel SCTP flaw to root the host, so the kernel patch matters just as much as the nginx one. One warning: second-day "nginx2shell" repos with no researcher credit are already appearing. If it is not from the credited teams, vet the source line by line or do not run it.
Triage: one line tells you if you care

Both vectors ride on HTTP/2, so the ALPN check is the fastest possible sort:
# run from your workstation or scanner box
curl -s --http2 -o /dev/null -w '%{http_version}\n' https://target.example/
# prints 2 -> HTTP/2 negotiated, this host is in scope, check the version
# prints 1.1 -> h2 is off on that listener, this vector is closedFor the version, do not trust the Server: header through a CDN edge, it masks the origin. Read it on the box: nginx -v. And after you patch, confirm the running workers actually picked up the new binary; my walkthrough for finding services still running old binaries works perfectly for exactly this moment.
Detection: what the exploit looks like on the wire
| Layer | Signal |
|---|---|
| HTTP/2 frames | Sustained flood of connection-level WINDOW_UPDATE frames with maximum-size increments (0x7FFFFFFF) for minutes on a single idle-ish connection |
| HTTP/2 settings | A SETTINGS_INITIAL_WINDOW_SIZE increase followed by a burst of RST_STREAM on active streams while the connection stays open |
| Traffic mix | Abnormally high request-header volume on one connection: Rapid7's reproduction pushed ~15 GiB of header traffic just to stay under nginx's control-frame limits, ~119 GiB plaintext total |
| Host / logs | nginx worker segfaults and restarts (signal 11) in the error log, repeated for the same worker pid |
| Vendor rules | Rapid7, JFrog and Wiz have published detection rules for both CVEs; drop them straight into your IDS |
If you want a first pass on your own logs while you wait on the vendor rules, the same nginx access log analysis scripts I wrote earlier this year give you the long-lived-connection outliers to chase.
Lab reproduction (sandbox only, official images)
Everything below ran in a throwaway sandbox on an isolated test host, and the outputs are the real captured stdout. Scope: I reproduced the triage conditions and the mitigation, not the exploit itself. For that, the PoC README targets a freshly started container, and the repo video is your reference.
# self-signed cert for the lab listener
openssl req -x509 -nodes -newkey rsa:2048 \
-keyout key.pem -out cert.pem -days 1 -subj "/CN=h2test.local"
# /tmp/n2s-lab/default.conf
server {
listen 8443 ssl;
http2 on;
ssl_certificate /etc/nginx/certs/cert.pem;
ssl_certificate_key /etc/nginx/certs/key.pem;
location / { return 200 "h2 lab ok\n"; }
}docker run -d --name h2lab -p 8443:8443 \
-v $PWD/default.conf:/etc/nginx/conf.d/default.conf:ro \
-v $PWD/cert.pem:/etc/nginx/certs/cert.pem:ro \
-v $PWD/key.pem:/etc/nginx/certs/key.pem:ro \
nginx:1.31.8
curl -sk --http2 -o /dev/null -w 'http_version=%{http_version}\n' https://127.0.0.1:8443/# verified output
http_version=2
# and the version on the box
docker exec h2lab nginx -v
# nginx version: nginx/1.31.8Then the stopgap, checked for real: same setup on the fixed 1.30.7 image with http2 off; returns http_version=1.1. That is your negative control; if your scanner shows 2, the door is open.
Mitigation
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| nginx Open Source (both CVEs, plus 3 more fixed in the same release) | 1.9.5 – 1.30.6 / 1.31.0 – 1.31.8 | 1.30.7 (stable) / 1.31.9 (mainline) |
| NGINX Plus 37.x (CVE-2026-123007) | 37.0.0 – 37.0.7.1 and 37.1.0 – 37.2.0.1 | 37.0.8.1 / 37.3.0.1 |
| NGINX Plus R34 – R36 | affected | no fix listed at publication |
| Linux kernel (Xint host-root chain) | SCTP path, distro dependent | patch the kernel separately |
Patch and restart, not reload: a reload leaves the old master process serving traffic with the old binary. If you genuinely cannot upgrade today, http2 off; in the affected server blocks (or removing http2 from the listen line on pre-1.25.1 boxes) closes these two vectors. But be clear-eyed about what that does not cover: the same release fixes a resolver use-after-free (CVE-2026-123634), an HTTP/3 use-after-free (CVE-2026-121810) and a mail proxy use-after-free (CVE-2026-113425), and an h2-terminating proxy in front of you breaks the PoC's timing, not the vulnerability itself. HTTP/2 off is a tourniquet, the patch is the surgery.
Run the curl line against every public nginx you own tonight, and schedule the restart window for the ones that answer with a 2. The public exploit is profile-gated today; golden-profile tools have a short shelf life. The window where "not yet" is a safe answer is measured in weeks, not months.