Full Report
A newly disclosed security flaw, CVE-2026-42533, has revealed a critical Pre-Auth nginx vulnerability that could allow attackers to achieve reliable RCE (remote code execution) without authentication. The issue affects nginx versions 0.9.6 through 1.30.3 (stable) and 1.31.2 (mainline), while patched releases include 1.30.4 and 1.31.3. Affected NGINX Plus versions include R33-R36 (fixed in R36 P7) and 37.0.0.1-37.0.2.1 (fixed in 37.0.3.1). According to the disclosure, the vulnerability stems from a missing save-and-restore mechanism for PCRE capture state within nginx's two-pass script evaluation engine. The flaw enables attackers to trigger a heap buffer overflow with attacker-controlled content and length, while also exposing heap pointers through an information leak that can defeat Address Space Layout Randomization (ASLR). Chaining both primitives enables reliable Pre-Auth nginx RCE. CVE-2026-42533 Impacts Multiple Configurations The advisory warns that deployments using map directives with regex patterns alongside regex capture sources, including location, server_name, rewrite, or if blocks, may be vulnerable. The issue depends on evaluation order, where regex capture references, such as $1 or named groups, are processed before a regex map variable. Affected directives include proxy_set_header, proxy_method, proxy_pass, fastcgi_param, uwsgi_param, scgi_param, grpc_set_header, return, add_header, rewrite, set, root, alias, and access_log, among others. Both HTTP and stream modules are affected, and the vulnerable capture and map variables do not need to exist within the same directive. Technical Root Cause The researcher explained that nginx evaluates expressions in two stages: a length calculation (LEN) pass followed by a value (VALUE) pass. During execution, regex map evaluation overwrites shared capture data stored in the request object. As a result, the LEN pass and VALUE pass can calculate different capture sizes, causing either a heap overflow or an information leak depending on the relative capture lengths. The disclosure states that attackers can control both the overflow size and leaked data using ordinary HTTP requests, including request URIs, headers, and bodies. No credentials, client certificates, or unusual configuration beyond the vulnerable pattern are required. Testing reportedly achieved 10 out of 10 successful exploitations on Ubuntu 24.04 using glibc 2.39 with ASLR enabled. Mitigation and Disclosure The researcher said recent fixes for CVE-2026-42945, CVE-2026-9256, CVE-2026-42055, and CVE-2026-48142 do not address CVE-2026-42533. Administrators are advised to upgrade immediately to nginx 1.30.4, 1.31.3, or the corresponding patched NGINX Plus releases. Until systems are updated, defenders should audit configurations that combine regex captures with regex map variables in the same evaluation path. The researcher also released a static configuration scanner that identifies vulnerable configurations without exploiting them. The initial report was submitted to F5 SIRT on May 17, 2026, with follow-up analyses covering additional variants, including cross-directive triggering and named capture clobbering. While a proof-of-concept exploit exists, the researcher said it will be withheld until users have sufficient time to apply patches, citing concerns over rapid exploitation following previous nginx vulnerability disclosures.
Analysis Summary
# Vulnerability: Critical Pre-Auth Remote Code Execution in NGINX
## CVE Details
- **CVE ID:** CVE-2026-42533
- **CVSS Score:** 10.0 (Critical - Estimated based on Pre-Auth RCE and 10/10 reliability reports)
- **CWE:** CWE-122 (Heap-based Buffer Overflow), CWE-200 (Exposure of Sensitive Information)
## Affected Systems
- **Products:** NGINX Open Source (Stable and Mainline), NGINX Plus
- **Versions:**
- NGINX Open Source: 0.9.6 through 1.30.3 (Stable) and 1.31.2 (Mainline)
- NGINX Plus: R33 through R36, and 37.0.0.1 through 37.0.2.1
- **Configurations:** Deployments using `map` directives with regex patterns alongside regex capture sources (e.g., `location`, `server_name`, `rewrite`, or `if` blocks) where capture references (like `$1`) are processed before a regex map variable.
## Vulnerability Description
The flaw exists in NGINX's two-pass script evaluation engine. NGINX evaluates expressions in two stages: a length calculation (**LEN**) pass followed by a value (**VALUE**) pass. The vulnerability stems from a missing save-and-restore mechanism for PCRE (Perl Compatible Regular Expressions) capture state.
During execution, a regex map evaluation can overwrite shared capture data. If the lengths calculated during the LEN pass differ from those in the VALUE pass due to this overwrite, it results in a heap buffer overflow or an information leak. Attackers can control the overflow size and leaked data (including heap pointers to defeat ASLR) via standard HTTP requests.
## Exploitation
- **Status:** PoC exists (currently withheld by researcher); functional exploitation demonstrated on Ubuntu 24.04 (glibc 2.39).
- **Complexity:** Low (No credentials or client certificates required).
- **Attack Vector:** Network (Remote).
## Impact
- **Confidentiality:** High (Information leak allows bypassing ASLR and accessing memory).
- **Integrity:** High (Remote Code Execution allows full system compromise).
- **Availability:** High (Potential for system crashes or full takeover).
## Remediation
### Patches
- **NGINX Open Source:** Upgrade to version **1.30.4** (Stable) or **1.31.3** (Mainline).
- **NGINX Plus:** Upgrade to **R36 P7** or **37.0.3.1**.
### Workarounds
- Audit NGINX configurations to identify and modify instances where regex captures and regex map variables are combined within the same evaluation path.
## Detection
- **Indicators of Compromise:** Unusual heap-related crashes in NGINX worker processes or unexpected memory patterns in HTTP responses.
- **Detection Methods and Tools:** Use the static configuration scanner released by the researcher to identify vulnerable configuration patterns without attempting exploitation.
## References
- F5 NGINX Security Advisory: [https://www.f5.com/products/nginx] (Defanged)
- NGINX Security Mailing List: [https://mailman.nginx.org/mailman/listinfo/nginx-announce] (Defanged)
- CVE-2026-42533 Database Entry: [https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-42533] (Defanged)