Skip to content
NGINX Map Regex RCE Gets Public Scanner: Patch Now, Full Exploit Due August

NGINX Map Regex RCE Gets Public Scanner: Patch Now, Full Exploit Due August

Techtimes • July 20, 2026

A security researcher released a public static config scanner Monday for a critical heap buffer overflow in NGINX that has existed since 2011, and the full proof-of-concept exploit that can deliver unauthenticated remote code execution follows in roughly two weeks. What makes this vulnerability structurally more dangerous than F5's own advisory suggests: the flaw does not require ASLR to be turned off — it defeats ASLR by itself, using an information-leak primitive that returns the memory addresses an attacker needs from a single unauthenticated GET request, according to reporting by The Hacker News .

F5 patched the vulnerability, tracked as CVE-2026-42533 and scored CVSS 4.0: 9.2 (Critical), on July 15 in nginx 1.30.4 (stable), 1.31.3 (mainline) , and NGINX Plus 37.0.3.1. Researcher Stan Shaw, who publishes as cyberstan, today released a read-only config scanner on GitHub ( 0xCyberstan/CVE-2026-42533-Config-Scanner ) that identifies vulnerable directive orderings without exploiting anything — giving defenders an immediate way to audit their fleet. Shaw's detailed technical write-up is being held for 21 days from the patch date, a window that closes around August 5, according to Cyber Security News .

NGINX runs on approximately one-third of web servers worldwide , making this one of the broadest attack surfaces any web server vulnerability has reached in years.

F5's official advisory conditions remote code execution on "ASLR being disabled or bypassable" — language that, on a default Ubuntu 24.04 server with ASLR fully enabled, sounds like a narrow caveat. It is not. Shaw's argument, which he told The Hacker News he demonstrated at 10-out-of-10 reliability, is that the vulnerability is its own ASLR bypass.

Shaw describes two distinct attack primitives that emerge from the same root bug. When the clobbered capture variable is smaller than the original, NGINX allocates an oversized buffer and the response returns uninitialized heap bytes — including libc and heap pointers — to the attacker. That is Primitive 1: a clean information leak that defeats ASLR in a single unauthenticated GET. When the clobbered capture is larger, the write pass overflows the buffer with fully attacker-controlled content. That is Primitive 2: the heap overflow itself. Chained together — roughly one leak request, approximately 40 spray connections, then one overflow trigger — the attack achieves reliable remote code execution on a standard server with no preconditions, Cyber Security News reports .

"A reader of the F5 advisory could reasonably conclude this is DoS-only on default systems," Shaw told The Hacker News . "It is not."

F5 had not responded to questions from The Hacker News the named-capture mitigation gap and downstream product fix timelines as of publication.

The vulnerability traces to NGINX version 0.9.6 , released in March 2011, when the map directive gained regex support. The root cause is a missing save/restore of PCRE capture state in NGINX's internal script engine, Cyber Security News reports .

NGINX evaluates directive values in two passes. The LEN pass measures how many bytes the result will need and allocates a buffer of exactly that size. The VALUE pass then writes the actual bytes. Both passes read from r->captures , a shared, mutable array that holds the current PCRE regex match groups ( $1 , $2 , and so on). The problem arises when a map directive with a regex matching condition executes in the interval between those two passes. That map evaluation fires its own fresh PCRE match, which silently overwrites r->captures . The LEN pass sized the buffer for one capture; the VALUE pass now writes from a different one. The buffer is either too small (overflow) or too large (information leak), depending on whether the attacker-controlled replacement string is larger or smaller than the original, according to the nginx.org changelog for the July 15 fix .

The behavior was noted in a 2014 nginx trac ticket by core developer Maxim Dounin, who acknowledged it as a defect. It was not addressed as a security-critical issue, Cyber Security News reports .

CVE-2026-42533 was reported to F5 independently by more than a dozen researchers, The Hacker News confirms .

The vulnerability is not contained to a single directive. Shaw's analysis identified at least 13 independent call sites across 9 source files in the NGINX codebase, affecting both the HTTP and stream processing modules, Cyber Security News reports .

Any configuration that combines a regex capture source — a location , server_name , rewrite , or if block — with a regex-based map variable evaluated afterward in the same request context is potentially exploitable. Affected directives include proxy_set_header , proxy_pass , fastcgi_param , add_header , rewrite , return , root , alias , access_log , grpc_set_header , set , uwsgi_param , and scgi_param , among others.

F5's temporary mitigation — switching affected regex maps to named captures — closes the primary path. But Shaw told The Hacker News it leaves a second code path open: a map that defines the same named group as the location regex reaches the same overflow through a variant mechanism he confirmed with AddressSanitizer. "Upgrading to 1.30.4 / 1.31.3 is the only complete fix," he said .

F5's advisory also lists NGINX Gateway Fabric, Ingress Controller, App Protect WAF, and Instance Manager as affected products, but had not published fixed builds for any of those four products at time of this writing.

Organizations that patched for CVE-2026-42945 ("NGINX Rift," disclosed May 13, 2026), CVE-2026-9256 (rewrite module heap overflow, disclosed May 22, 2026), CVE-2026-42055, or CVE-2026-48142 are not protected. Each fix is independent, Cyber Security News reports .

CVE-2026-42533 is the third heap overflow in NGINX's expression-evaluation code disclosed within roughly two months. All three the same structural root cause: NGINX's two-pass script engine sizes a buffer in one pass and writes into it in the , without guarding against side effects that can change the measurement between passes. The trigger differs across the three CVEs — a stale flag in Rift, overlapping captures in CVE-2026-9256, clobbered capture state here — but the architectural weakness is the same, The Hacker News reports .

NGINX Rift was confirmed as actively exploited by VulnCheck three days after its public disclosure, when the firm's canary honeypot systems detected targeted attack traffic. CVE-2026-42533 is not yet on CISA's Known Exploited Vulnerabilities catalog as of July 20, and no public exploit code had appeared as of that date, The Hacker News reports . That window narrows on approximately August 5.

The vulnerability is configuration-dependent; not every NGINX server is exposed. An instance is vulnerable only if it uses a map directive with regex matching and references capture variables from an earlier regex match in the same string expression — a pattern common in reverse proxy, URL routing, and header manipulation configurations, Cyber Security News reports .

Shaw's static config scanner ( 0xCyberstan/CVE-2026-42533-Config-Scanner ) parses nginx configs, follows includes, and flags only the exploitable directive ordering. It is a Python script requiring no external libraries and does not connect to any server or send any traffic. Running it before upgrading gives security teams a clear picture of exposure.

Security teams should treat this as a priority-one remediation before the estimated August 5 full exploit release.

First, upgrade immediately to nginx 1.30.4 (stable), 1.31.3 (mainline) , or the corresponding patched NGINX Plus release. These are the only complete fixes.

Second, run the static config scanner ( 0xCyberstan/CVE-2026-42533-Config-Scanner ) against all production NGINX configurations to identify vulnerable directive orderings before or immediately after patching. The scanner flags the exact location in the config where the vulnerable pattern appears.

Third, do not assume prior patches are sufficient. Recent fixes for CVE-2026-42945, CVE-2026-9256, CVE-2026-42055, and CVE-2026-48142 are independent and do not address CVE-2026-42533, Cyber Security News reports .

Fourth, for Kubernetes operators: NGINX is the ingress controller in the majority of Kubernetes clusters. The archived kubernetes/ingress-nginx repository , which ships NGINX 1.27.1, will not receive a vendor fix — workloads routing through that ingress controller remain permanently exposed and require a replacement strategy.

Fifth, monitor for anomalous HTTP request patterns: clusters of similar GET requests from a single source followed by a single larger or differently structured request can indicate ASLR-bypass reconnaissance followed by exploit delivery.

Shaw's decision to withhold the full exploit and coordinate with F5 SIRT before publication reflects a deliberate approach to responsible disclosure on high-impact server software. The 21-day window was chosen in explicit reference to what happened after CVE-2026-42945 went public : exploitation began within 72 hours.

Not on its own. F5's advisory conditions RCE on ASLR being disabled or bypassed, but Shaw's research demonstrates that CVE-2026-42533 includes its own ASLR bypass: the information-leak primitive (Primitive 1) returns uninitialized heap memory — including libc and heap pointers — to an unauthenticated attacker in a single GET request on a default Ubuntu 24.04 build. That recovered address data is what the overflow stage (Primitive 2) uses to achieve reliable code execution. ASLR being "on" does not protect a server running vulnerable NGINX if the configuration matches the exploitable pattern. The only protection is upgrading to nginx 1.30.4, 1.31.3, or the corresponding patched NGINX Plus release.

Version is a necessary but not sufficient condition for exposure. All NGINX Open Source releases from 0.9.6 through 1.30.3 (stable line) and up to 1.31.2 (mainline) are in the vulnerable range — a range stretching back to March 2011. NGINX Plus releases R33 through R36 are also affected, as are 37.0.0.1 through 37.0.2.1. But even an unpatched server in this version range is only exploitable if its configuration uses a map directive with regex matching and references capture variables from an earlier regex match in the same request context. Running Shaw's static config scanner ( 0xCyberstan/CVE-2026-42533-Config-Scanner ) will confirm in seconds whether your specific configuration is at risk.

Shaw stated he will publish the full proof-of-concept 21 days after the July 15 patch date, placing the release at approximately August 5. That is a credible and stated commitment, not a speculation. The practical meaning for patch timelines: after August 5, any organization still running a vulnerable NGINX configuration should treat themselves as facing an actively weaponizable attack rather than a theoretical one. The NGINX Rift precedent suggests exploitation may begin within days of a working exploit appearing publicly. Upgrade and scan before that date.

No. CVE-2026-42945, CVE-2026-9256, CVE-2026-42055, and CVE-2026-48142 each address distinct code paths and were fixed in earlier NGINX releases. None of those fixes touches the map directive two-pass capture-clobbering behavior that CVE-2026-42533 exploits. An organization that upgraded to NGINX 1.31.1 to patch CVE-2026-9256, for example, is still running a version vulnerable to CVE-2026-42533 and must upgrade again to 1.31.3 or 1.30.4.

Extracted Entities

Domains (1)