NGINX Plus heap overflow, unauth (CVE-2026-42945) [PoC]
CVE-2026-42945
CVE-2026-42945: NGINX Plus and Open Source heap buffer overflow via crafted HTTP request with PCRE captures. Update to fixed version.
Exploitation confirmed - public proof-of-concept - CVE-2026-42945 is a critical heap buffer overflow in NGINX Plus and NGINX Open Source that lets an unauthenticated attacker crash the worker process and potentially execute code on systems without ASLR. Patches are available; update immediately.
Overview
CVE-2026-42945 affects NGINX Plus and NGINX Open Source installations that use the ngx_http_rewrite_module. The vulnerability is triggered when a rewrite directive is followed by another rewrite, if, or set directive containing an unnamed PCRE capture (such as $1 or $2) in a replacement string that includes a question mark (?).
An unauthenticated attacker can send specially crafted HTTP requests to exploit this condition. When successful, the attack causes a heap buffer overflow in the NGINX worker process, leading to a crash and restart of that worker. On systems where ASLR is disabled, the overflow may allow arbitrary code execution.
This vulnerability has a CVSS score of 9.2 (Critical). The attack vector is network-based, requires no privileges, and no user interaction. However, the attack complexity is high, meaning the attacker needs specific conditions beyond their control to align for successful exploitation.
Note that software versions which have reached End of Technical Support are not evaluated, so users on unsupported branches should upgrade to a supported release.
Affected Products
- NGINX Open Source (all versions with ngx_http_rewrite_module enabled)
- NGINX Plus (all versions with ngx_http_rewrite_module enabled)
Impact
The primary impact is denial of service through worker process crashes. On systems without ASLR protections, code execution is possible, which could lead to full server compromise, data theft, or lateral movement within the network.
Remediation and Mitigation
- Update to the latest patched version of NGINX Plus or NGINX Open Source from the official repositories.
- If immediate patching is not possible, consider disabling the ngx_http_rewrite_module if your configuration does not require it.
- Ensure ASLR is enabled on all production systems to reduce the risk of code execution.
- Review your NGINX configurations for patterns matching the vulnerable directive sequence and remove unnecessary rewrite rules.
For continuous monitoring, refer to security news for emerging threats and breach reports for incident response guidance.
Security Insight
This vulnerability demonstrates the ongoing risk of memory safety issues in high-performance C-based infrastructure software. NGINX has historically had a strong security record, but this finding highlights that even well-audited codebases can harbor subtle memory corruption bugs in lesser-used edge cases. The attack complexity required to trigger this flaw likely limits its real-world exploitation to targeted attacks rather than broad scanning, but the availability of a proof-of-concept means defenders should treat it as an urgent patching priority. Organizations running NGINX as a reverse proxy or API gateway should prioritize this update alongside TLS and authentication hardening.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| DepthFirstDisclosures/Nginx-Rift exploit for CVE-2026-42945 | ★ 112 |
Showing 1 of 1 known references. Source: nomi-sec/PoC-in-GitHub.
Related Advisories
MariaDB server is a community developed fork of MySQL server. An authenticated user can crash MariaDB versions 11.4 before 11.4.10 and 11.8 before 11.8.6 via a bug in JSON_SCHEMA_VALID() function. Und...
SD-330AC and AMC Manager provided by silex technology, Inc. contain a heap-based buffer overflow vulnerability in processing the redirect URLs. Arbitrary code may be executed on the device....
Heap buffer overflow in ANGLE in Google Chrome prior to 147.0.7727.101 allowed a remote attacker to potentially perform a sandbox escape via a crafted HTML page. (Chromium security severity: Critical)...
A heap-based buffer overflow vulnerability exists in the Intan CLP parsing functionality of The Biosig Project libbiosig 3.9.2 and Master Branch (db9a9a63). A specially crafted Intan CLP file can lead...