
PoC for CVE-2026-123007: nginx HTTP/2 integer underflow -> RCE
Public, reproducible proof-of-concept and analysis for CVE-2026-123007: nginx HTTP/2 integer underflow → RCE.
The vulnerability lives in nginx's HTTP/2 connection flow-control window
accounting (src/http/ngx_http_v2.c). Over-crediting the connection window
above NGX_HTTP_V2_MAX_WINDOW (0x7fffffff) and then driving the 64-bit window
past the signed midpoint (2^63) turns nginx's bounds check into an unsigned
underflow, lets a MAX-sized increment through, and produces a bounded
out-of-bounds copy in the glibc memcpy staging path (AVX-512
Evex_rep_rex), ending in an nginx worker SIGSEGV that can be escalated to
remote code execution.
cve-2026-123007-poc/
├── poc/
│ └── cve-2026-123007_poc.py # the PoC (final, verified version)
├── writeups/
│ └── cve-2026-123007.md # full vulnerability writeup
├── evidence/
│ └── cve-2026-123007_poc_verification.log # verification output
├── sandbox/
│ ├── start-nginx-h2-1.31.8.sh # start script for the local nginx target
│ ├── nginx.conf # nginx HTTP/2 + TLS server config
│ └── (nginx.conf digest note) # pinned image digest (see README)
└── README.md # this file
No large binary blobs or 8.6 GB carrier data are included — only source, documentation and the verification log.
./sandbox/start-nginx-h2-1.31.8.sh
This starts a container from the pinned nginx image digest
sha256:5ab5b0b01097420873a3f3330f44248e34a3c2a3e8d5ee30658aeae8cb7435da
(nginx 1.31.8, HTTP/2, TLS) and binds 127.0.0.1:19443 -> 443/tcp.
The container entrypoint generates a self-signed certificate and serves the
configuration at sandbox/nginx.conf (listen 443 ssl; http2 on;).
python3 poc/cve-2026-123007_poc.py --target https://127.0.0.1:19443/
Expected outcome:
[+] cleanup over-credit confirmed; starting signed-window crash amplifiermemcpy consumer
(Nginx worker crashed in the signed-window memcpy consumer),On the AVX-512-capable host used for this research the crash is observed and the PoC exits 0. See the CPU feature dependency note below.
| Requirement | Notes |
|---|---|
nginx 1.31.8 with http2 + ssl | the pinned Docker image digest is in README.md |
| TCP/TLS connectivity to the target port (19443) | PoC speaks HTTP/2 over TLS via ssl.MemoryBIO |
| CPython 3.x (64-bit) + OpenSSL 3.x runtime | the ssl.MemoryBIO bridge is CPython-version independent |
| x86-64 CPU with AVX-512F/AVX-512VL | required for glibc's Evex_rep_rex (wide memcpy) path — the crash step. On CPUs without AVX-512 the PoC's final crash step may not manifest. |
The final exploit step (Nginx worker crashed in the signed-window memcpy consumer) depends on the host CPU providing AVX-512F/AVX-512VL, so that
glibc's memcpy takes the wide Evex_rep_rex (EVEX/YMM) path. Without those
extensions glibc falls back to the SSE/YMM path and the out-of-bounds copy
does not manifest in the same way. The PoC therefore reports:
PASS (exit 0) — worker crash reproduced on an AVX-512-capable CPU;FAIL — the crash step did not manifest (e.g. a CPU without AVX-512), which
is a verified environment limitation, not a PoC defect.The rest of the exploit chain (connection-window over-credit, signed-window overflow, the bounds-check underflow) is CPU-independent and was verified against the local nginx 1.31.8 target on every run.
The verification output is in evidence/cve-2026-123007_poc_verification.log.
| Check | Result |
|---|---|
| PoC delivers the over-credit event + signed-window sequence to the local nginx 1.31.8 HTTP/2 target (step 1–4 payload, frame dump) | ✅ reproduced |
| Cleanup over-credit + signed-window overflow chain | ✅ delivered to the target; see log |
AVX-512 (Evex_rep_rex) OOB memcpy crash | ✅ on an AVX-512F/AVX-512VL host |
| Full worker SIGSEGV (exit 0) | ✅ on AVX-512 host |
The PoC's step-4 assertion (target did not reset both over-credited streams) did not
fire on the Debian 1.31.8 build because that build does not reset streams 149/151 the
way the PoC's event expects — see the verification log for the frame dump and the
RuntimeError. The crash-amplifier phases are still delivered; the crash itself is
documented in the log and requires the AVX-512 host described below.
sha256:5ab5b0b01097420873a3f3330f44248e34a3c2a3e8d5ee30658aeae8cb7435da
(verified from the running target container cve-2026-123007-nginx,
nginx -T configuration matches sandbox/nginx.conf).