CTIPilot
AI-generated · no human review · verify critical claims against the linked source. how it works →
← Back to Daily brief 2026-05-15
HIGHCVE-2026-42945updatedNATOA2vulnerability

CVE-2026-42945, NGINX Open Source / Plus / F5 WAF products: 18-year-old heap buffer overflow in rewrite module ("NGINX Rift"), PoC public

An 18-year-old NGINX rewrite-module heap overflow has a public PoC, and VulnCheck honeypots saw exploitation attempts

Analysis

CVE-2026-42945 (CVSS 4.0: 9.2, codename "NGINX Rift") is a heap buffer overflow present in src/http/ngx_http_script.c since NGINX 0.6.27 (2008) (depthfirst "NGINX Rift" technical writeup, 2026-05-13 · NCSC-CH Security Hub #12575, 2026-05-15). The root cause: when a rewrite directive combines an unnamed PCRE capture ($1, $2) with a replacement string containing ?, followed by another rewrite, if, or set directive in the same scope, ngx_http_script_start_args_code() sets a flag causing the write phase to URI-encode URI argument characters (expanding escapable characters such as + and & from one byte to three), while the length-calculation phase computed a shorter buffer without this escaping. The result is a deterministic out-of-bounds write into the adjacent heap allocation. F5 says the flaw may cause a heap buffer overflow in the NGINX worker process leading to a restart (ENISA EUVD, 2026-09-10). depthfirst's proof of concept achieves code execution with ASLR off, and depthfirst notes that forked workers share one heap layout, which could in theory be used to leak ASLR (depthfirst, 2026-05-13); F5's CVE description, updated on 2026-09-10, covers systems with ASLR disabled or where the attacker can bypass ASLR (ENISA EUVD, 2026-09-10). A working PoC is public at github.com/depthfirstdisclosures/nginx-rift. depthfirst's internal analysis system found the flaw on 2026-04-18; depthfirst reported it to NGINX on 2026-04-21, shared its RCE proof of concept on 2026-05-05, and F5 released the advisory on 2026-05-13 (depthfirst, 2026-05-13). NCSC-CH rated the exploitation status "UNKNOWN, Proof of Concept Available" on 2026-05-15 (NCSC-CH Security Hub #12575, 2026-05-15); VulnCheck's honeypot reports followed two days later (below). Temporary workaround: replace all unnamed captures with named captures (e.g., (?<user_id>...) → $user_id) in rewrite directives, which eliminates the vulnerable code path without requiring upgrade. Affected: NGINX Open Source 0.6.27 to 1.30.0 (nginx.org); NGINX Plus R32 to R36; Ingress Controller 3.5.0 to 3.7.2, 4.0.0 to 4.0.1 and 5.0.0 to 5.4.1; Gateway Fabric 1.3.0 to 1.6.2 and 2.0.0 to 2.5.1; Instance Manager 2.16.0 to 2.21.1; F5 WAF for NGINX 5.9.0 to 5.12.1; App Protect WAF 4.9.0 to 4.16.0 and 5.1.0 to 5.8.0; F5 DoS for NGINX 4.8.0; App Protect DoS 4.3.0 to 4.7.0 (Security Affairs, 2026-05). Fixed: NGINX Open Source 1.30.1 and 1.31.0 (nginx.org); NGINX Plus R32 P6 and R36 P4 (Security Affairs, 2026-05).

VulnCheck reported exploitation attempts against its honeypot networks; the nature of the activity and its goals are unknown (The Hacker News, 2026-05-17).

Contradiction: the NGINX project rates the flaw severity medium (nginx.org), while NCSC-CH gives a CVSS 4.0 score of 9.2 (NCSC-CH Security Hub #12575, 2026-05-15) and depthfirst rates it critical at 9.2 (depthfirst, 2026-05-13); the gap likely reflects the preconditions, a specific rewrite pattern and, for code execution, ASLR. NCSC-CH (NCSC-CH Security Hub #12575, 2026-05-15) and The Hacker News (The Hacker News, 2026-05-17) say code execution requires ASLR to be disabled, while F5's CVE description, as EUVD carried it on 2026-09-10, also covers attackers who can bypass ASLR (ENISA EUVD, 2026-09-10).

Cited evidence

This vulnerability exists when the rewrite directive is followed by a rewrite, if, or set directive and an unnamed Perl-Compatible Regular Expression (PCRE) capture (for example, $1, $2) with a replacement string that includes a question mark (?).

GitHub GHSA-gcgv-v5gf-c543

We further investigated the exploitability of the issues, and developed a working proof of concept demonstrating RCE with ASLR off.

Theoretically, we could leverage this design to leak ASLR by progressively overwriting pointers byte by byte.

4/21/2026: We reported all 5 issues to NGINX via a GitHub security advisory.

depthfirst "NGINX Rift" research, 2026-05-13

Additionally, attackers can execute code on systems with Address Space Layout Randomization (ASLR) disabled or when the attacker can bypass ASLR.

ENISA EUVD 2026-09-10

The latest findings from VulnCheck show that threat actors have begun to weaponize the flaw, with exploitation attempts detected against its honeypot networks.

The Hacker News 2026-05-17

Updates2

Correction

depthfirst reported the flaw to NGINX on 2026-04-21 and shared its code-execution proof of concept on 2026-05-05 (depthfirst, 2026-05-13); the earlier dates and the NDA had no source. VulnCheck reported exploitation attempts against its honeypots, with their purpose unknown (The Hacker News, 2026-05-17). The NGINX project rates the flaw medium (nginx.org), against the CVSS 4.0 score of 9.2 NCSC-CH gives (NCSC-CH Security Hub #12575, 2026-05-15).

Correction

F5's CVE description does not limit code execution to hosts with ASLR disabled. depthfirst's proof of concept runs with ASLR off, but depthfirst notes that forked NGINX workers share one heap layout, which could in theory be used to leak ASLR (depthfirst, 2026-05-13), and F5's CVE description, updated on 2026-09-10, covers systems with ASLR disabled or where the attacker can bypass ASLR (ENISA EUVD, 2026-09-10). An enabled ASLR is therefore no reason to defer the upgrade. Where the upgrade has to wait, depthfirst's workaround is to replace unnamed captures with named captures in every affected rewrite directive (depthfirst, NGINX Rift).

Sources8

Revision history

  1. Published 2026-05-15-58b94fbd
  2. Correction 2026-10-11T1307Z-audit

    depthfirst found the flaw on 2026-04-18, reported it on 2026-04-21 and shared its proof of concept on 2026-05-05; no source mentions an NDA or a 2026-04-28 PoC handover. The affected-version ranges for the Kubernetes and F5 products had gaps the earlier text closed over, and the NGINX project's own medium severity rating was not set against the 9.2 score. The entry gains the nginx.org advisory, Security Affairs and The Hacker News as sources, VulnCheck's honeypot exploitation attempts carried over from the duplicate entry of 2026-05-18, a contradiction line, exposure and detection lines, a rating, an ATT&CK mapping, the affected products and a link to the SAP August patch-day entry. The exploitation-status sentence now reads as NCSC-CH dated it, ahead of VulnCheck's report, and the score attributions name only what each cited page states.

    Changed: summary cves sources references techniques affected_products classification body event_date actions

  3. Correction 2026-10-21T1149Z-audit

    Code execution was described as possible only with ASLR disabled; depthfirst notes that forked workers share one heap layout that could in theory leak ASLR, and F5's CVE description, updated on 2026-09-10, covers systems where the attacker can bypass ASLR, against NCSC-CH's narrower statement. The headline now names the public proof of concept and VulnCheck's honeypot exploitation attempts, and verbatim quotes from the GitHub advisory, depthfirst, ENISA EUVD and The Hacker News back the trigger, disclosure, ASLR and exploitation statements. A Defender takeaway now names the fixed NGINX Open Source releases and depthfirst's named-capture workaround, replacing the standing action that restated them.

    Changed: body evidence headline sources title actions

PROVENANCE

AI-generated · no human review · this permalink is the shareable record for the finding · verify operationally critical claims against the linked primary source.