18-Year-Old NGINX Rewrite Module Flaw Enables Unauthenticated RCE
Vulnerability: Critical 18-year-old NGINX flaw (CVE-2026-42945) enables unauthenticated RCE via crafted HTTP requests due to heap buffer overflow in rewrite module.
Deep Analysis and Expert Commentary
The NGINX Rift vulnerability stems from improper handling of PCRE capture groups in rewrite directives, allowing attackers to shape heap corruption via URI manipulation. Exploitation requires no authentication or prior access, making it a low-barrier, high-impact threat. Systems without ASLR are particularly vulnerable to RCE, while others face persistent DoS via worker process crashes. The flaw’s longevity underscores the risks of legacy code in widely deployed infrastructure. Mitigations include immediate patching or rewriting configurations to use named captures. Secondary vulnerabilities (e.g., CVE-2026-42946) expose memory leaks and process restarts, compounding risks for NGINX deployments with SCGI or SSL OCSP enabled. Defenders should prioritize updates, especially for internet-facing instances, and audit rewrite rules for unnamed captures.
Action Items
- Patch NGINX to fixed versions (e.g., 1.30.1, R32 P6) immediately.
- Replace unnamed PCRE captures ($1, $2) with named captures in rewrite rules.
- Enable ASLR and monitor for anomalous HTTP requests targeting rewrite directives.
Original Article Brief Intro
The Hacker News · 2026-05-14 · Vulnerability: Critical 18-year-old NGINX flaw (CVE-2026-42945) enables unauthenticated RCE via crafted HTTP requests due to heap buffer overflow in rewrite module.
Related Terms and Notes
CVE IDs
- CVE-2026-40701
- CVE-2026-42934
- CVE-2026-42945 — Critical heap buffer overflow in NGINX's rewrite module, enabling RCE or DoS via crafted HTTP requests.
- CVE-2026-42946
Techniques / TTPs
- RCE
- Zero-Day
Context Notes
- ASLR — Address Space Layout Randomization: A security feature that mitigates memory corruption exploits by randomizing memory addresses.
- Heap Buffer Overflow
- Heap Overflow
- NGINX
- NGINX Rift
- Remote Code Execution
- Web Server Security