CVE-2026-42945: NGINX ngx_http_rewrite_module vulnerability

Published May 13, 2026
·
Updated

Last updated 6 June 2026

Other sources

NGINX ngxhttprewritemodule vulnerability

Microsoft

NGINX Plus and NGINX Open Source have a vulnerability in the ngxhttprewritemodule module. This vulnerability exists when the rewrite directive is followed by a rewrite, if, or set directive and an unnamed Perl-Compatible Regular Expression (PCRE) capture (for example, $1, $2) with a replacement string that includes a question mark (?). An unauthenticated attacker along with conditions beyond its control can exploit this vulnerability by sending crafted HTTP requests. This may cause a heap buffer overflow in the NGINX worker process leading to a restart. Additionally, attackers can execute code on systems with Address Space Layout Randomization (ASLR) disabled or when the attacker can bypass ASLR.  Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.

MITRE

NGINX Plus and NGINX Open Source have a vulnerability in the ngxhttprewritemodule module. This vulnerability exists when the rewrite directive is followed by a rewrite, if, or set directive and an unnamed Perl-Compatible Regular Expression (PCRE) capture (for example, $1, $2) with a replacement string that includes a question mark (?). An unauthenticated attacker along with conditions beyond its control can exploit this vulnerability by sending crafted HTTP requests. This may cause a heap buffer overflow in the NGINX worker process leading to a restart. Additionally, for systems with Address Space Layout Randomization (ASLR ) disabled, code execution is possible. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.

Red Hat

Affected Software

17 affected componentsFixes available
Nginx NGINX Open Source
Nginx NGINX Plus
Microsoft azl3 nginx 1.28.3-1
debian/nginx<=1.18.0-6.1+deb11u3, <=1.22.1-9+deb12u6, <=1.26.3-3+deb13u4
1.18.0-6.1+deb11u61.22.1-9+deb12u71.26.3-3+deb13u51.30.1-3
F5 Dos Nginx>=4.3.0<=4.7.0
F5 Dos Nginx=4.8.0
F5 NGINX Gateway Fabric>=1.3.0<=1.6.2
F5 NGINX Gateway Fabric>=2.0.0<=2.5.1
F5 NGINX Ingress Controller>=3.5.0<=3.7.2
F5 NGINX Ingress Controller>=4.0.0<=4.0.1
F5 NGINX Ingress Controller>=5.0.0<=5.4.1
F5 NGINX Instance Manager>=2.16.0<=2.21.1
F5 NGINX Open Source>=0.6.27<=1.30.0
F5 NGINX Plus>=r32<=r36
F5 Waf Nginx>=4.9.0<=4.16.0
F5 Waf Nginx>=5.1.0<=5.8.0
F5 Waf Nginx>=5.9.0<=5.12.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/nginx to a version that resolves this vulnerability.

    Fixed in 1.18.0-6.1+deb11u6Fixed in 1.22.1-9+deb12u7Fixed in 1.26.3-3+deb13u5Fixed in 1.30.1-3

Event History

May 13, 2026
CVE Published
via MITRE·02:12 PM
Data Sourced
via MITRE·02:12 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·04:04 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
Affected Software
May 14, 2026
News Published
via BleepingComputer·03:43 PM
News Published
via BleepingComputer·03:45 PM
May 16, 2026
Data Sourced
via Microsoft·08:05 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:05 AM
DescriptionSeverity
Jun 3, 2026
Data Sourced
via Debian·01:43 PM
DescriptionAffected Software
Data Sourced
via Launchpad·01:43 PM
Description
Jun 6, 2026
Data Sourced
via Ubuntu·01:44 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42945?

CVE-2026-42945 has been assigned a high severity rating due to the potential for code execution through crafted rewrite rules.

2

How do I fix CVE-2026-42945?

To fix CVE-2026-42945, update NGINX to version 1.30.0-3 or later.

3

Which versions of NGINX are affected by CVE-2026-42945?

CVE-2026-42945 affects NGINX Plus and NGINX Open Source versions prior to 1.30.0-3.

4

What is the impact of CVE-2026-42945?

The impact of CVE-2026-42945 includes possible remote code execution when processing specific rewrite directives.

5

Is CVE-2026-42945 exploitable remotely?

Yes, CVE-2026-42945 is exploitable remotely if an attacker can manipulate the NGINX rewrite configuration.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203