CVE-2026-42945

NGINX ngx_http_rewrite_module vulnerability

Published May 13, 2026 CVSS 4.0 · 9.2 Critical EPSS 68.0% KEV · Not listed
Description
NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module 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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4589-1 nginx security update
Debian DSA Debian DSA DSA-6278-1 nginx security update
Ubuntu USN Ubuntu USN USN-8271-1 nginx vulnerability
Ubuntu USN Ubuntu USN USN-8375-1 nginx vulnerabilities
References
Link Providers
https://access.redhat.com/errata/RHSA-2026:17417 cve-icon
https://access.redhat.com/errata/RHSA-2026:17751 cve-icon
https://access.redhat.com/errata/RHSA-2026:17752 cve-icon
https://access.redhat.com/errata/RHSA-2026:17753 cve-icon
https://access.redhat.com/errata/RHSA-2026:17790 cve-icon
https://access.redhat.com/errata/RHSA-2026:17791 cve-icon
https://access.redhat.com/errata/RHSA-2026:17792 cve-icon
https://access.redhat.com/errata/RHSA-2026:17793 cve-icon
https://access.redhat.com/errata/RHSA-2026:17794 cve-icon
https://access.redhat.com/errata/RHSA-2026:18029 cve-icon
https://access.redhat.com/errata/RHSA-2026:18041 cve-icon
https://access.redhat.com/errata/RHSA-2026:18063 cve-icon
https://access.redhat.com/errata/RHSA-2026:19159 cve-icon
https://access.redhat.com/errata/RHSA-2026:19371 cve-icon
https://access.redhat.com/errata/RHSA-2026:19372 cve-icon
https://access.redhat.com/errata/RHSA-2026:19374 cve-icon
https://access.redhat.com/errata/RHSA-2026:20442 cve-icon
https://access.redhat.com/errata/RHSA-2026:20444 cve-icon
https://access.redhat.com/errata/RHSA-2026:21275 cve-icon
https://access.redhat.com/errata/RHSA-2026:22382 cve-icon
https://access.redhat.com/errata/RHSA-2026:22383 cve-icon
https://access.redhat.com/errata/RHSA-2026:22388 cve-icon
https://access.redhat.com/errata/RHSA-2026:22389 cve-icon
https://access.redhat.com/errata/RHSA-2026:22390 cve-icon
https://access.redhat.com/errata/RHSA-2026:22393 cve-icon
https://access.redhat.com/errata/RHSA-2026:22394 cve-icon
https://access.redhat.com/errata/RHSA-2026:22396 cve-icon
https://access.redhat.com/errata/RHSA-2026:58981 cve-icon
https://access.redhat.com/security/cve/CVE-2026-42945 cve-icon
https://bugzilla.redhat.com/show_bug.cgi?id=2477116 cve-icon
https://depthfirst.com/nginx-rift cve-icon cve-icon
https://github.com/DepthFirstDisclosures/Nginx-Rift cve-icon
https://my.f5.com/manage/s/article/K000161019 cve-icon cve-icon cve-icon
https://nvd.nist.gov/vuln/detail/CVE-2026-42945 cve-icon
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42945.json cve-icon
https://www.cve.org/CVERecord?id=CVE-2026-42945 cve-icon
History
Type Values Removed Values Added
Description NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module 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. NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module 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.
Type Values Removed Values Added
First Time appeared F5
F5 nginx Open Source
F5 nginx Plus
Vendors & Products F5
F5 nginx Open Source
F5 nginx Plus
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module 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.
Title NGINX ngx_http_rewrite_module vulnerability
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
f5
Published
Updated
Sep 10, 2026, 12:04 PM
Reserved
Apr 30, 2026, 11:04 PM
Status
Modified
Published
May 13, 2026, 4:16 PM
Modified
Oct 26, 2026, 2:10 PM
Severity
Critical
Public date
May 13, 2026, 2:12 PM