Overview
The NGINX rewrite module (ngx_http_rewrite_module) has been affected by three vulnerabilities disclosed in 2026, CVE-2026-42945 ("NGINX Rift"), CVE-2026-9256 and CVE-2026-15176, which can lead to buffer overflows and memory corruption under certain circumstances. These issues arise when an attacker sends crafted requests to a server whose rewrite configuration matches specific patterns. CVE-2026-42945 has been reported as exploited in the wild.
Affected Components
- NGINX Open Source versions before 1.30.6 (stable) or 1.31.7 (mainline) that use the rewrite directive, and NGINX Plus without F5's latest security update
- Configurations where a rewrite directive with a query string ("?") is followed, in the same location, by an if or set directive, with an unnamed regex capture such as $1 (CVE-2026-42945)
- Configurations that combine alias with rewrite (CVE-2026-15176)
Potential Risks
- Denial-of-Service (DoS) via crafted requests
- Memory corruption leading to worker process crashes
- Remote code execution on systems where ASLR is disabled or can be bypassed (CVE-2026-42945)
Recommended Actions
- Apply the latest NGINX security patches
- If you cannot upgrade immediately, replace unnamed regex captures ($1, $2) with named captures in affected rewrite directives (interim workaround for CVE-2026-42945)
- Review rewrite configurations for unsafe patterns
- Use return directives instead of rewrite where possible
Patch Guidance
- Upgrade to the latest stable NGINX release (1.30.8 as of 4 December 2026) or the latest mainline release (1.31.10). Versions 1.30.6 (stable) and 1.31.7 (mainline) are the minimum that fix all three vulnerabilities.
- Apply vendor-recommended patches for your distribution. Distribution packages often backport fixes without changing the NGINX version number, so check your distribution's security advisory for each CVE.
- For NGINX Plus, apply the latest security update from F5
Validate your NGINX version:
nginx -vReference Links
Summary: Priority Actions
| Vulnerability Area | Immediate Action | Long-Term Action |
|---|---|---|
| NGINX Rewrite | Upgrade NGINX, audit configs; until patched, use named captures in affected rewrite rules (CVE-2026-42945 workaround) | Keep NGINX on a supported, patched release |
Contact: E2E Networks Security Operations Center (soc@e2enetworks.com)
This advisory is provided for informational purposes. Organizations should evaluate the applicability of these vulnerabilities within their own environments and take remediation measures as advised by the respective software vendors.


