Heap-based buffer overflow in NGINX Open Source and NGINX Plus - CVE-2026-42945
Published: May 14, 2026 / Updated: June 23, 2026
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service or execute arbitrary code.
The vulnerability exists due to heap-based buffer overflow in ngx_http_rewrite_module when processing crafted HTTP requests that reach configurations where a rewrite directive is followed by a rewrite, if, or set directive and unnamed PCRE captures are used with a replacement string containing a question mark. A remote attacker can send crafted HTTP requests to cause a denial of service or execute arbitrary code.
Code execution is possible on systems with address space layout randomization disabled. There is no control plane exposure; this is a data plane issue only.
Affected software
NGINX Plus
SUSE Linux Enterprise Server 15 SP5
SUSE Linux Enterprise Server 15 SP6
SUSE Linux Enterprise Server 15 SP4
Gentoo Linux
Debian Linux
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Real Time 15
Anolis OS
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
Red Hat CodeReady Linux Builder for Power, little endian - Extended Update Support
Red Hat CodeReady Linux Builder for IBM z Systems - Extended Update Support
Red Hat CodeReady Linux Builder for ARM 64 - Extended Update Support
Ubuntu
Server Applications Module
openSUSE Leap
openEuler
Fedora
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
nginx-common (Ubuntu package)
nginx-light (Ubuntu package)
nginx-full (Ubuntu package)
nginx-extras (Ubuntu package)
nginx-naxsi (Ubuntu package)
nginx (Ubuntu package)
nginx-core (Ubuntu package)
libnginx-mod-http-auth-pam (Ubuntu package)
libnginx-mod-http-lua (Ubuntu package)
libnginx-mod-http-image-filter (Ubuntu package)
libnginx-mod-http-headers-more-filter (Ubuntu package)
libnginx-mod-stream (Ubuntu package)
libnginx-mod-http-dav-ext (Ubuntu package)
libnginx-mod-http-echo (Ubuntu package)
libnginx-mod-mail (Ubuntu package)
libnginx-mod-http-xslt-filter (Ubuntu package)
libnginx-mod-http-upstream-fair (Ubuntu package)
libnginx-mod-http-uploadprogress (Ubuntu package)
libnginx-mod-http-fancyindex (Ubuntu package)
libnginx-mod-http-subs-filter (Ubuntu package)
libnginx-mod-http-perl (Ubuntu package)
libnginx-mod-http-ndk (Ubuntu package)
libnginx-mod-nchan (Ubuntu package)
libnginx-mod-http-geoip (Ubuntu package)
libnginx-mod-http-cache-purge (Ubuntu package)
libnginx-mod-rtmp (Ubuntu package)
nginx-mod-js-challenge
nginx-mod-vts
nginx-mod-fancyindex
nginx-mod-headers-more
nginx-mod-brotli
nginx-mod-modsecurity
nginx-mod-naxsi
nginx-all-modules
nginx-filesystem
nginx-mod-stream
nginx-mod-mail
nginx-mod-http-xslt-filter
nginx-mod-http-perl
nginx-mod-http-image-filter
nginx-mod-devel
nginx
nginx (Red Hat package)
nginx-debuginfo
nginx-debugsource
nginx-help
nginx-source
compat-nginx-mod-mail
compat-nginx-help
compat-nginx
compat-nginx-debuginfo
compat-nginx-debugsource
compat-nginx-mod-http-image-filter
compat-nginx-mod-http-perl
compat-nginx-mod-http-xslt-filter
compat-nginx-mod-stream
compat-nginx-filesystem
compat-nginx-all-modules
nginx-doc
nginx-core
www-servers/nginx
nginx (Debian package)
DataStage on Cloud Pak for Data
How to mitigate CVE-2026-42945
NGINX Plus - addressed in versions R32 P6, R36 P4
nginx-common (Ubuntu package) - update to 1.4.6-1ubuntu3.9+esm6
nginx-light (Ubuntu package) - addressed in versions 1.4.6-1ubuntu3.9+esm6, 1.10.3-0ubuntu0.16.04.5+esm7, 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1, 1.18.0-6ubuntu14.11, 1.24.0-2ubuntu7.8, 1.28.0-6ubuntu1.3, 1.28.3-2ubuntu1.1
nginx-full (Ubuntu package) - addressed in versions 1.4.6-1ubuntu3.9+esm6, 1.10.3-0ubuntu0.16.04.5+esm7, 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1, 1.18.0-6ubuntu14.11, 1.24.0-2ubuntu7.8, 1.28.0-6ubuntu1.3, 1.28.3-2ubuntu1.1
nginx-extras (Ubuntu package) - addressed in versions 1.4.6-1ubuntu3.9+esm6, 1.10.3-0ubuntu0.16.04.5+esm7, 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1, 1.18.0-6ubuntu14.11, 1.24.0-2ubuntu7.8, 1.28.0-6ubuntu1.3, 1.28.3-2ubuntu1.1
nginx-naxsi (Ubuntu package) - update to 1.4.6-1ubuntu3.9+esm6
nginx (Ubuntu package) - addressed in versions 1.4.6-1ubuntu3.9+esm6, 1.10.3-0ubuntu0.16.04.5+esm7, 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1, 1.18.0-6ubuntu14.11, 1.24.0-2ubuntu7.8, 1.28.0-6ubuntu1.3, 1.28.3-2ubuntu1.1
nginx-core (Ubuntu package) - addressed in versions 1.4.6-1ubuntu3.9+esm6, 1.10.3-0ubuntu0.16.04.5+esm7, 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1, 1.18.0-6ubuntu14.11, 1.24.0-2ubuntu7.8, 1.28.0-6ubuntu1.3, 1.28.3-2ubuntu1.1
libnginx-mod-http-auth-pam (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-lua (Ubuntu package) - addressed in versions 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1
libnginx-mod-http-image-filter (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-headers-more-filter (Ubuntu package) - addressed in versions 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1
libnginx-mod-stream (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-dav-ext (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-echo (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-mail (Ubuntu package) - addressed in versions 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1
libnginx-mod-http-xslt-filter (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-upstream-fair (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-uploadprogress (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-fancyindex (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-subs-filter (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-perl (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-ndk (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-nchan (Ubuntu package) - addressed in versions 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1
libnginx-mod-http-geoip (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-http-cache-purge (Ubuntu package) - update to 1.14.0-0ubuntu1.11+esm2
libnginx-mod-rtmp (Ubuntu package) - addressed in versions 1.14.0-0ubuntu1.11+esm2, 1.18.0-0ubuntu1.7+esm1
nginx-mod-js-challenge - update to 0^20230517.gitda6852d-7.fc44
nginx-mod-vts - addressed in versions 0.2.4-9.fc42, 0.2.4-9.fc43, 0.2.4-9.fc44
nginx-mod-fancyindex - addressed in versions 0.6.0-4.fc42, 0.6.0-4.fc43, 0.6.0-4.fc44
nginx-mod-headers-more - addressed in versions 0.39-9.fc42, 0.39-9.fc43, 0.39-9.fc44
nginx-mod-brotli - addressed in versions 1.0.0~rc-9.fc42, 1.0.0~rc-9.fc43, 1.0.0~rc-9.fc44
nginx-mod-modsecurity - addressed in versions 1.0.4-10.fc42, 1.0.4-10.fc43, 1.0.4-10.fc44
nginx-mod-naxsi - addressed in versions 1.6-17.fc42, 1.6-17.fc43, 1.6-17.fc44
nginx-all-modules - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-filesystem - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-mod-stream - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-mod-mail - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-mod-http-xslt-filter - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-mod-http-perl - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-mod-http-image-filter - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx-mod-devel - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx - addressed in versions 1.20.1-1.0.7, 1.22.1-1.0.3, 1.26.2-9
nginx (Red Hat package) - addressed in versions 1.20.1-10.el9_0.4, 1.20.1-14.el9_2.6, 1.20.1-22.el9_6.6, 1.20.1-24.el9_7.3, 1.20.1-28.el9_8.2, 1.26.3-1.el10_0.9
nginx-debuginfo - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-debugsource - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-mod-devel - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-mod-http-perl - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-mod-http-xslt-filter - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-mod-mail - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-mod-stream - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-all-modules - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-filesystem - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-mod-http-image-filter - addressed in versions 1.21.5-11, 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-help - addressed in versions 1.21.5-13, 1.24.0-9, 1.24.0-10
nginx-source - addressed in versions 1.21.5-150400.3.20.1, 1.21.5-150600.10.18.1
nginx-debugsource - addressed in versions 1.21.5-150400.3.20.1, 1.21.5-150600.10.18.1
nginx - addressed in versions 1.21.5-150400.3.20.1, 1.21.5-150600.10.18.1
nginx-debuginfo - addressed in versions 1.21.5-150400.3.20.1, 1.21.5-150600.10.18.1
compat-nginx-mod-mail - update to 1.24.0-10
compat-nginx-help - update to 1.24.0-10
compat-nginx - update to 1.24.0-10
compat-nginx-debuginfo - update to 1.24.0-10
compat-nginx-debugsource - update to 1.24.0-10
compat-nginx-mod-http-image-filter - update to 1.24.0-10
compat-nginx-mod-http-perl - update to 1.24.0-10
compat-nginx-mod-http-xslt-filter - update to 1.24.0-10
compat-nginx-mod-stream - update to 1.24.0-10
compat-nginx-filesystem - update to 1.24.0-10
compat-nginx-all-modules - update to 1.24.0-10
nginx-doc - update to 1.26.2-9
nginx-core - update to 1.26.2-9
nginx - addressed in versions 1.30.1-1.fc42, 1.30.1-1.fc43, 1.30.1-1.fc44
DataStage on Cloud Pak for Data - addressed in versions 5.3.1 patch 9, 5.4.0.0 patch 3
www-servers/nginx - update to 1.31.3-r1
nginx (Debian package) - addressed in versions 1.22.1-9+deb12u7, 1.26.3-3+deb13u5
Links to Public Exploits and PoC-codes
External References
Related Security Bulletins
- Multiple vulnerabilities in NGINX Open Source and NGINX Plus
- Fedora 44 update for nginx, nginx-mod-brotli, nginx-mod-fancyindex, nginx-mod-headers-more, nginx-mod-js-challenge, nginx-mod-modsecurity, nginx-mod-naxsi, nginx-mod-vts
- Fedora 43 update for nginx, nginx-mod-brotli, nginx-mod-fancyindex, nginx-mod-headers-more, nginx-mod-modsecurity, nginx-mod-naxsi, nginx-mod-vts
- Fedora 42 update for nginx, nginx-mod-brotli, nginx-mod-fancyindex, nginx-mod-headers-more, nginx-mod-modsecurity, nginx-mod-naxsi, nginx-mod-vts
- Red Hat Enterprise Linux 9 update for nginx
- Red Hat Enterprise Linux 9 update for the nginx:1.24 module
- Red Hat Enterprise Linux 9 update for the nginx:1.26 module
- Anolis OS update for nginx:1.22 module
- Anolis OS update for nginx:1.20 module
- Anolis OS update for nginx
- Red Hat Enterprise Linux 10 update for nginx
- Red Hat Enterprise Linux 9 update for nginx
- Red Hat Enterprise Linux 9 update for the nginx:1.24 module
- Red Hat Enterprise Linux 9 update for nginx
- Red Hat Enterprise Linux 9 update for nginx
- Ubuntu update for nginx
- Debian update for nginx
- Red Hat Enterprise Linux 9 update for the nginx:1.24 module
- Red Hat Enterprise Linux 9 update for the nginx:1.26 module
- Red Hat Enterprise Linux 9 update for nginx
- openEuler 24.03 LTS SP3 update for nginx
- openEuler 24.03 LTS update for nginx
- openEuler 22.03 LTS SP4 update for nginx
- openEuler 20.03 LTS SP4 update for nginx
- SUSE update for nginx
- openEuler 24.03 LTS SP1 update for nginx
- Ubuntu update for nginx
- SUSE update for nginx
- Gentoo update for nginx
- IBM DataStage on Cloud Pak for Data update for NGINX Plus and NGINX Open Source