CVE-2026-123007 -- NGINX HTTP/2 Flow Control Integer Underflow (NGINX2Root #1)
| Field | Value |
|---|
| CVE ID | CVE-2026-123007 |
| Vendor | F5 / NGINX |
| Affected Versions | NGINX Open Source 1.9.5 – 1.31.8 (all HTTP/2-capable builds) |
| Fixed Version | 1.30.7 (stable) / 1.31.9 (mainline); NGINX Plus R37.0.8.1 / R37.3.0.1 |
| Advisory | F5 K000164058, 2026-11-18 |
| CVSS 3.1 | 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| CWE | CWE-191 — Integer Underflow |
| Attack Vector | Network (unauthenticated, requires HTTP/2 enabled on listener) |
| Impact | Unauthenticated RCE on NGINX worker process; root if chained with kernel SCTP bug |
| Alias | NGINX2Root #1 |
| Active Exploitation | PoC public (Wiz, Xint research); no ITW exploitation confirmed as of 2026-11-20 |
Description
CVE-2026-123007 is an integer underflow in NGINX's HTTP/2 flow-control accounting (ngx_http_v2_module). When a client sends a stream-level WINDOW_UPDATE frame, NGINX decrements the per-stream send-window counter. Due to missing unsigned clamping on a signed 32-bit variable, an attacker can craft a sequence of WINDOW_UPDATE frames whose combined increment overflows the counter, causing the value to wrap negative and corrupt adjacent worker heap memory.
The vulnerability requires HTTP/2 to be enabled on a listener the attacker can reach — no authentication, no TLS client certificate, no prior session state. Wiz demonstrated unauthenticated RCE on a server hosting static files over HTTP/2 + TLS. Xint further chained CVE-2026-123007 with a Linux kernel SCTP bug to escape an NGINX Docker container and obtain root on the host.
Censys estimated 8.8 million NGINX services potentially exposed as of 2026-11-19. Roughly 66% of sampled HTTPS NGINX endpoints support HTTP/2. Exposure is version + HTTP/2 enabled + unpatched, not version alone.
Root Cause Deep Dive
ngx_http_v2_module/ngx_http_v2.c
────────────────────────────────
ngx_http_v2_window_update_frame(h2c, frame)
stream = ngx_http_v2_get_stream(h2c, frame->stream_id)
increment = ngx_http_v2_parse_window(frame->data) // u32
stream->send_window += (ngx_int_t)increment // SECURITY FIX: CWE-191 -- signed += unsigned, no overflow check
if stream->send_window < 0:
// RFC 7540 §6.9.1: should send RST_STREAM FLOW_CONTROL_ERROR
// BUG: check absent before 1.31.9 / 1.30.7 — counter goes negative,
// write path uses it as offset into heap-allocated stream buffer
| Step | What Happens |
|---|
Client sends WINDOW_UPDATE with increment = 0x7FFFFFFF | Per-stream window becomes 2^31-1 |
| Client repeats with increment = 0x1 | Signed 32-bit overflows → negative |
| NGINX write path uses negative window as buffer size | Heap write underflow → memory corruption |
| Worker heap corrupted | Attacker-controlled bytes land at deterministic offset |
| Worker executes attacker payload | RCE as nginx / www-data |
Vulnerable Code (NGINX ngx_http_v2.c)
/* ngx_http_v2.c -- ngx_http_v2_window_update_frame (NGINX <= 1.31.8) */
static ngx_int_t
ngx_http_v2_state_window_update(ngx_http_v2_connection_t *h2c,
u_char *pos, u_char *end)
{
uint32_t window;
/* ... */
window = ngx_http_v2_parse_uint32(pos);
/* SECURITY FIX: CWE-191 -- no RFC 7540 §6.9.1 overflow check before add */
h2c->send_window += window; /* signed + unsigned -- wraps on overflow */
/* missing: if (h2c->send_window > NGX_HTTP_V2_MAX_WINDOW) RST_STREAM */
}
Attack Flow
flowchart LR
A([Attacker]) -->|HTTP/2 SETTINGS + HEADERS\nstream_id=1| B[NGINX Worker\nngx_http_v2_module]
B -->|stream allocated\nsend_window=65535| C[Stream State\nheap allocation]
A -->|WINDOW_UPDATE 0x7FFFFFFF\n×2 rapid frames| B
B -->|signed 32-bit overflow\nsend_window wraps negative| D{Heap Corruption\nadjacent object}
D -->|write primitive| E[Worker Heap\narbitrary bytes]
E -->|code execution| F([RCE as nginx worker])
F -->|chain: SCTP kernel bug\nCVE-2026-SCTP-chain| G([Root on host])
style A fill:#1a0810,color:#e94560
style F fill:#1a0810,color:#e94560
style G fill:#3d0015,color:#fff
style D fill:#1a2010,color:#7ec8a0
PoC Usage
pip install -r requirements.txt
# Version / HTTP2 check only
python poc.py -u https://target.example.com --check-only -v
# Trigger flow-control underflow (crash detection)
python poc.py -u https://target.example.com -v
# Custom flood count and stream count
python poc.py -u https://target.example.com --flood-count 128 --streams 4 -v
# Via proxy
python poc.py -u https://target.example.com --proxy http://127.0.0.1:8080 --insecure -v
Flags
| Flag | Description |
|---|
-u / --url | Target URL (must be HTTPS with HTTP/2 enabled) |
--flood-count | WINDOW_UPDATE frames per stream to send (default: 64) |
--streams | Concurrent HTTP/2 streams to open (default: 2) |
--check-only | Detect HTTP/2 support and NGINX version without attack |
--timeout | Socket timeout in seconds (default: 15) |
--proxy | HTTP/HTTPS proxy (Burp etc.) |
--insecure | Skip TLS certificate verification |
-o / --output | Save results to JSON |
-v / --verbose | Verbose output |
Impact
| Area | Impact |
|---|
| Availability | Critical — worker crash / infinite loop |
| Confidentiality | Critical — memory disclosure, potential RCE |
| Integrity | Critical — arbitrary write primitive, RCE as nginx worker |
| Scope change | Yes — Xint chain gives root via SCTP kernel escape |
| Auth required | None — network reachable HTTP/2 endpoint sufficient |
| Affected surface | ~8.8M exposed services (Censys, 2026-11-19) |
Detection
| Method | Indicator |
|---|
nginx -v | Version 1.9.5 – 1.31.8 → potentially vulnerable |
curl -I --http2 https://target/ | HTTP/2 handshake succeeds → precondition met |
| NGINX access log | Multiple WINDOW_UPDATE anomalies from single IP in short window |
| Worker crash log | signal 11 (SIGSEGV) or signal 6 (SIGABRT) in nginx error.log |
| Censys / Shodan | http.server.nginx.version:<1.30.7 + http2:true |
| Priority | Action | Detail |
|---|
| Immediate | Upgrade NGINX | 1.30.7 (stable) or 1.31.9 (mainline); NGINX Plus R37.0.8.1 / R37.3.0.1 |
| Interim | Disable HTTP/2 | listen 443 ssl; (remove http2 directive) — only covers CVE-2026-123007/-123633 |
| High | Rate-limit connections | limit_conn + limit_req to reduce attack surface |
| High | Monitor worker crashes | Alert on nginx worker SIGSEGV in error.log |
| Medium | Pin NGINX version in containers | Ensure base images pull 1.30.7+ |
Disclaimer