Researchers Trace NGINX HTTP/2 Use-After-Free in CVE-2026-123633

· Original article ↗

Summary

Unit 42 traced CVE-2026-123633 to an HTTP/2 connection-state flaw that can trigger a resolver use-after-free under connection pressure. ASan reproduced the read from freed memory; NGINX 1.30.7 and 1.31.9 fix the issue.

Key points

  • A fragmented HTTP/2 HEADERS frame can leave a live NGINX connection marked reusable, allowing connection cleanup to reclaim it under worker-connection pressure.
  • In the tested path, request-time DNS resolution opened a new UDP socket, triggering a drain that freed resolver state still in use.
  • Unit 42 reproduced a read from freed memory with ASan on NGINX 1.31.7 and 1.31.8 in an isolated Debian guest; the test used a non-default worker_connections value of 16.
  • F5 says the flaw may cause denial of service and that code execution may be possible if ASLR is disabled or bypassed. The article’s separate memory-disclosure issue was reported to F5 but has no CVE and is not detailed.
  • NGINX 1.30.7 and 1.31.9 fix the issue. Administrators should review exposed HTTP/2 reverse proxies and upgrade or use a vendor package containing the fix.
  • If an upgrade must wait, the article suggests reviewing whether HTTP/2 can be disabled on exposed listeners or increasing worker_connections, while noting these measures have limitations.
  • For investigation, correlate worker exits or connection-drain warnings with HTTP/2 traffic, connection pressure, and request-time DNS; these signals alone do not establish exploitation.

Article Details

Attack Vectors
  • A fragmented HTTP/2 request can leave an active NGINX connection marked reusable. Under worker-connection pressure, NGINX may reclaim it and free memory still used by the request, causing a use-after-free.
  • The researcher reproduced the fault on NGINX 1.31.7 and 1.31.8 using a request-time DNS lookup that opened a new resolver UDP socket while connection slots were low.
  • In a two-VM demonstration, the researcher combined CVE-2026-123633 with a separately reported memory-disclosure bug to bypass ASLR and obtain a shell as the non-root www-data worker. The demonstration used a non-default NGINX configuration; some attempts did not open a shell. F5 says code execution may be possible if ASLR is disabled or bypassed.
Defensive Notes
  • Upgrade to NGINX 1.30.7 or 1.31.9, or install a vendor package containing the fix. Confirm the running worker uses a fixed binary; a configuration reload alone leaves the old binary in memory.
  • Review exposed HTTP/2 reverse proxies, running NGINX configurations, variable targets in proxy_pass, grpc_pass, fastcgi_pass, uwsgi_pass and scgi_pass, and worker connection usage.
  • If an upgrade must wait, consider disabling HTTP/2 on exposed listeners where service requirements allow, or increasing worker_connections to add headroom. The article cautions that increasing the limit does not fix the defect and that disabling HTTP/2 can affect gRPC clients or increase HTTP/1.1 connection use.
  • Investigate unexpected NGINX worker exits near HTTP/2 traffic and connection pressure. Correlate resolver traffic and connection-drain warnings with worker state; the article notes these signals can also occur under ordinary load.
  • Configure NGINX error logging at warn level or more detailed so connection-drain warnings are captured. Treat unexpected shell processes running as the NGINX worker account as a lead when investigating suspected code execution.

MITRE ATT&CK

CVE

People

Vendors

Products

Tools

Related Articles