# CVE-2026-42533: NGINX map and regex heap overflow, rated by CISA as having exploit code

A heap overflow when an NGINX map uses regex captures lets an unauthenticated attacker crash workers, and run code where ASLR is off or bypassed. CISA rates exploitation as proof of concept; no attacks are reported.

- Vendor: F5, NGINX Open Source and NGINX Plus (map directive)
- Severity: CRITICAL (CVSS 4.0 9.2)
- Exploited (CISA KEV): not listed
- EPSS: 6.5% on 2026-12-02
- Public exploit: none reported
- Patch available: yes
- Vendor advisory: K000162097, https://my.f5.com/manage/s/article/K000162097
- Published: 2026-07-15; updated: 2026-10-13
- Page: https://patchtonight.com/cve/CVE-2026-42533/

## Affected and fixed versions

| Affected | Fixed in |
| --- | --- |
| NGINX Open Source 0.9.6 to 1.31.2 | 1.30.4 or 1.31.3 or later |
| NGINX Plus 37.0.0.1 to before 37.0.3.1 | 37.0.3.1 or later |
| NGINX Plus R36 | R36 P7 or later |
| NGINX Plus R33 | No fix listed; upgrade to a fixed release |

## What it is

A heap buffer overflow (CWE-122) in NGINX when a **`map` directive uses regex matching** and a string expression uses the map's **regex capture variables before the map's output variable**. F5 says the same can happen with a non-cacheable variable in a string expression under certain conditions. A crafted HTTP request from an unauthenticated attacker overflows the heap in the worker process.

- **Denial of service:** the worker crashes and restarts.
- **Code execution:** possible where **ASLR is disabled** or the attacker can bypass it, according to F5.

F5 rates it 9.2 in CVSS 4.0 (8.1 in CVSS 3.1), with high attack complexity: the attacker depends on "conditions beyond their control". nginx.org rates it "major". F5 credits more than a dozen researchers who reported it independently.

CISA's assessment in the CVE record rates exploitation as **proof of concept**. We found no public exploit code: Orca Security wrote on July 20 that none had been released and no attacks reported. This is a sibling of [CVE-2026-42945](/cve/CVE-2026-42945/) (NGINX Rift), a rewrite-module overflow that was exploited within days of its disclosure.

## Am I affected?

**Yes, if both are true:**

1. You run NGINX Open Source 0.9.6 to 1.31.2, or an affected NGINX Plus release (table above). Distribution packages may carry their own fixes, so check your vendor's advisory too.
2. Your configuration has a `map` with regex patterns whose **unnamed captures** (`$1`, `$2`) are used in a string expression **before** the map's own variable.

Search every included file. `nginx -T` prints the full configuration.

**Not affected:** NGINX Open Source 1.30.4 and 1.31.3 or later, NGINX Plus 37.0.3.1 and R36 P7 or later. F5 lists no fix for NGINX Plus R33. F5 did not evaluate releases past End of Technical Support.

## What to do

1. **Upgrade.** NGINX Open Source to 1.30.4 (stable) or 1.31.3 (mainline) or later. NGINX Plus to 37.0.3.1 or R36 P7. Move R33 to a fixed release. Remember the NGINX inside appliances, containers and ingress controllers.
2. **If you can't upgrade yet, use named captures in `map` regexes**, so no expression depends on `$1`-style variables. Orca Security describes this as a temporary mitigation.
3. **Make sure ASLR is enabled** on hosts running NGINX.
4. **If a vulnerable server shows the signs below,** treat it as possibly compromised: rebuild it and rotate its TLS keys and stored credentials.

## Detection

No indicators of compromise have been published.

- **Worker crashes in the NGINX error log.** Look for workers exiting on a signal and for a sudden rise in restarts.
- **Requests that line up with the crashes,** aimed at locations that use the affected `map` variables.
- **After a crash, unexpected child processes** of NGINX workers or new outbound connections from the server.

## Sources

- [F5 advisory K000162097](https://my.f5.com/manage/s/article/K000162097)
- [nginx.org security advisories](https://nginx.org/en/security_advisories.html)
- [CVE record](https://cveawg.mitre.org/api/cve/CVE-2026-42533)
- [Orca Security](https://orca.security/resources/blog/cve-2026-42533-nginx-heap-buffer-overflow/)

---

Data from PatchTonight (https://patchtonight.com), compiled from vendor advisories, CISA KEV and FIRST EPSS. Please credit PatchTonight and link to the CVE page when you use it.
