NGINX HTTP/2 use-after-free can crash servers under connection pressure
A fragmented HTTP/2 request can trigger a use-after-free in NGINX that leads to denial-of-service and, if ASLR is disabled, remote code execution.
Security & privacy Unit 42 24 Nov 2026 Disclosure Prototype evidence
Published as “NGINX HTTP/2 Use-After-Free: CVE-2026-123633”
Why it matters
Operators must upgrade to NGINX 1.30.7/1.31.9 or disable HTTP/2 to prevent possible denial-of-service or remote code execution.
Summary
The author discovered that NGINX marks an HTTP/2 connection reusable even after a stream starts, allowing the connection to be reclaimed under load. A fragmented HEADERS frame combined with a request-time DNS lookup causes the resolver state to be freed while still in use, which ASan reports as a read-after-free. The issue is reproduced on NGINX 1.31.7/1.31.8 builds and fixed in 1.30.7/1.31.9 by clearing the reusable flag at stream creation. Evidence consists of ASan crashes and source-code review; a two-VM chain also shows pre-auth remote code execution under a non-default configuration.
What they found 2
- A partial HTTP/2 HEADERS frame leaves the connection marked reusable, enabling the use-after-free.
“When a client sends only part of an HTTP/2 HEADERS frame header, ngx_http_v2_handle_connection() marks the connection reusable and returns early.”
- ASan reports a read from freed resolver state during request-time DNS setup.
“Read from freed resolver state during request-time DNS setup”
Caveats 6
- A release build may keep running after reading freed memory, so the crash is not guaranteed.
- The connection-drain warning can also appear under ordinary load, making it a weak indicator of exploitation.
- Test required the HTTP/2 module to be compiled with --with-http_v2_module.
- Runs on loopback interface with worker_connections set to 16 (default is 512).
- Master process was disabled; sanitizer aborts the single process.
- Only a variable upstream hostname triggering a DNS lookup was exercised.
What’s new here 4
- Identifies a use-after-free bug in NGINX HTTP/2 caused by a stale reusable-connection flag.
- Demonstrates a remote code execution chain using a separate memory-disclosure bug combined with the use-after-free.
- Provides the exact code fix (clearing the reusable flag) introduced in NGINX 1.30.7 and 1.31.9.
- Offers detection guidance via connection-drain warnings and log correlation.
In the news
- —Critical NGINX HTTP/2 Use‑After‑Free (CVE‑2026‑123633) Disclosed with Fix in 1.30.7 and 1.31.9 same link
- —Bitwarden releases self‑host patch updating NGINX to fix CVE‑2026‑123007 and CVE‑2026‑123633 CVE-2026-123633
- —Palo Alto Networks advises patches for critical NGINX HTTP/2 flaws (CVE‑2026‑123633, CVE‑2026‑123007) CVE-2026-123633
- —NGINX HTTP/2 RCE chain (CVE‑2026‑123007/123633) and Microsoft Agent Framework PyPI supply‑chain compromise disclosed CVE-2026-123633
- —Microsoft introduces Windows Baseline Protection to let apps verify security settings before running CVE-2026-123633