CVE-2026-42533: nginx heap buffer overflow with map regex captures (major)
Critical 9.2 EPSS 6.3% nginx
When a map directive uses regex matching and a string expression references the regex capture variables before the map's own output variable (or, in some cases, uses a non-cacheable variable), nginx can overflow a heap buffer in the worker process. Unauthenticated crafted HTTP requests can crash workers, and F5 says code execution is possible where ASLR is disabled or can be bypassed. nginx rates it major; nginx 0.9.6 through 1.31.2 is affected, which covers every supported distro package.
- CVE-2026-42533CVE identifier
- 9.2CVSS 4.0 base score (critical)
- 6.3%EPSS: chance of exploitation in the next 30 days (higher than 94% of CVEs)
- 2026-07-15published
What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms
What to do now
- Check whether you run nginx and which version (commands below).
- Install the fixed version for your system: see “Patch it” below.
- Restart nginx (systemctl restart nginx) so the master and all worker processes run the patched binary; a configuration reload does not replace the binary.
- If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.
Affected and fixed versions
Affected:
- nginx 0.9.6 through 1.31.2 (fixed in 1.30.4 stable and 1.31.3 mainline)
- NGINX Plus R33 and later before R36 P7, and 37.0.0.1 before 37.0.3.1
Fixed in:
- nginx 1.30.4
- nginx 1.31.3
- NGINX Plus R36 P7
- NGINX Plus 37.0.3.1
Am I affected?
nginx -v
sudo nginx -T 2>/dev/null | grep -nE '^\s*map\s'
dpkg -l 'nginx*' | grep ^ii
rpm -q nginx
Patch it
Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.
Debian
sudo apt update
sudo apt install --only-upgrade nginx nginx-common nginx-core nginx-light nginx-full nginx-extras
sudo systemctl restart nginxUbuntu
sudo apt update
sudo apt install --only-upgrade nginx nginx-common nginx-core nginx-light nginx-full nginx-extras
sudo systemctl restart nginxRHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh nginx
sudo systemctl restart nginxFedora
sudo dnf upgrade --refresh nginx nginx-coreSUSE / openSUSE
sudo zypper refresh
sudo zypper update nginx
sudo systemctl restart nginxAmazon Linux
sudo dnf upgrade --releasever=latest nginx nginx-coreArch Linux
sudo pacman -SyuAlpine
apk update && apk upgrade nginxFreeBSD
pkg update && pkg upgrade nginx (or nginx-full)Built from source
Upgrade to nginx 1.30.4 (stable) or 1.31.3 (mainline) or later from https://nginx.org/en/download.html, then restart nginx.General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.
Fix status in Linux distributions
| Release | Package | Status | Fixed version / advisory |
|---|---|---|---|
| Debian 12 | nginx | fixed | 1.22.1-9+deb12u10 |
| Debian 13 | nginx | fixed | 1.26.3-3+deb13u8 |
| Debian testing | nginx | fixed | 1.30.4-3 |
| Red Hat Enterprise Linux 9 | nginx-2:1.20.1-28.el9_8.6 | fixed | RHSA-2026:66542 |
| Red Hat Enterprise Linux 9 | nginx:1.26-9080020260908105507.9 | fixed | RHSA-2026:67283 |
| Red Hat Enterprise Linux 9 | nginx:1.24-9080020260908110425.9 | fixed | RHSA-2026:67308 |
| Red Hat Enterprise Linux 8 | nginx:1.24-8100020260908154808.489197e6 | fixed | RHSA-2026:67315 |
| Red Hat Enterprise Linux 10 | nginx-2:1.26.3-6.el10_2.7 | fixed | RHSA-2026:67314 |
| Debian 13 (trixie) | nginx | fixed | 1.26.3-3+deb13u8 (DSA-6496-1) |
| Debian 12 (bookworm) | nginx | fixed | 1.22.1-9+deb12u10 (DLA-4784-1) |
| Ubuntu 26.04 LTS (resolute) | nginx | fixed | 1.28.3-2ubuntu1.11 (USN-8563-1) |
| Ubuntu 24.04 LTS (noble) | nginx | fixed | 1.24.0-2ubuntu7.18 (USN-8563-1) |
| Ubuntu 22.04 LTS (jammy) | nginx | fixed | 1.18.0-6ubuntu14.21 (USN-8563-1) |
| RHEL 10 | nginx | fixed | 1.26.3-6.el10_2.7 (RHSA-2026:67314) |
| RHEL 9 | nginx | fixed | 1.20.1-28.el9_8.6 (RHSA-2026:66542) |
| RHEL 8 (nginx:1.24 module) | nginx | fixed | nginx:1.24 module stream 8100020260908154808 (RHSA-2026:67315) |
| SUSE Linux Enterprise Server 16.0 | nginx | fixed | 1.27.2-160000.7.1 |
| SUSE Linux Enterprise Server 15 SP7 | nginx | fixed | 1.21.5-150600.10.27.1 |
From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.
If you cannot patch yet
- Red Hat: do not use unnamed regex captures; use named captures instead and only use them in the same block as the regex match.
- Only configurations that use map with regex matching (or the non-cacheable-variable variant described by nginx) are affected.
Related vulnerabilities
Sources
- nginx security advisories
- nginx 1.30 changelog (1.30.4)
- F5 article K000162097
- CVE record CVE-2026-42533
- Debian DSA-6496-1 nginx
- Debian security tracker
- Ubuntu CVE page
- Red Hat CVE page
- SUSE CVE page
- CVE-2026-42533 on NVD
Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.