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.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run nginx and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Restart nginx (systemctl restart nginx) so the master and all worker processes run the patched binary; a configuration reload does not replace the binary.
  4. If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.

Affected and fixed versions

Affected:

Fixed in:

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 nginx
Ubuntu
sudo apt update
sudo apt install --only-upgrade nginx nginx-common nginx-core nginx-light nginx-full nginx-extras
sudo systemctl restart nginx
RHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh nginx
sudo systemctl restart nginx
Fedora
sudo dnf upgrade --refresh nginx nginx-core
SUSE / openSUSE
sudo zypper refresh
sudo zypper update nginx
sudo systemctl restart nginx
Amazon Linux
sudo dnf upgrade --releasever=latest nginx nginx-core
Arch Linux
sudo pacman -Syu
Alpine
apk update && apk upgrade nginx
FreeBSD
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

ReleasePackageStatusFixed version / advisory
Debian 12nginxfixed1.22.1-9+deb12u10
Debian 13nginxfixed1.26.3-3+deb13u8
Debian testingnginxfixed1.30.4-3
Red Hat Enterprise Linux 9nginx-2:1.20.1-28.el9_8.6fixedRHSA-2026:66542
Red Hat Enterprise Linux 9nginx:1.26-9080020260908105507.9fixedRHSA-2026:67283
Red Hat Enterprise Linux 9nginx:1.24-9080020260908110425.9fixedRHSA-2026:67308
Red Hat Enterprise Linux 8nginx:1.24-8100020260908154808.489197e6fixedRHSA-2026:67315
Red Hat Enterprise Linux 10nginx-2:1.26.3-6.el10_2.7fixedRHSA-2026:67314
Debian 13 (trixie)nginxfixed1.26.3-3+deb13u8 (DSA-6496-1)
Debian 12 (bookworm)nginxfixed1.22.1-9+deb12u10 (DLA-4784-1)
Ubuntu 26.04 LTS (resolute)nginxfixed1.28.3-2ubuntu1.11 (USN-8563-1)
Ubuntu 24.04 LTS (noble)nginxfixed1.24.0-2ubuntu7.18 (USN-8563-1)
Ubuntu 22.04 LTS (jammy)nginxfixed1.18.0-6ubuntu14.21 (USN-8563-1)
RHEL 10nginxfixed1.26.3-6.el10_2.7 (RHSA-2026:67314)
RHEL 9nginxfixed1.20.1-28.el9_8.6 (RHSA-2026:66542)
RHEL 8 (nginx:1.24 module)nginxfixednginx:1.24 module stream 8100020260908154808 (RHSA-2026:67315)
SUSE Linux Enterprise Server 16.0nginxfixed1.27.2-160000.7.1
SUSE Linux Enterprise Server 15 SP7nginxfixed1.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

Related vulnerabilities

Sources

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.