← Vulnerability feed

Vulnerability record · CVE-2026-42945 · published 13 May 2026

CVE-2026-42945: NGINX rewrite module heap buffer overflow via crafted HTTP requests

F5 · Dos

NGINX Plus and NGINX Open Source contain a heap buffer overflow in the ngx_http_rewrite_module when a rewrite directive is followed by another rewrite, if, or set directive and an unnamed PCRE capture (such as $1) is used in a replacement string containing a question mark. An unauthenticated attacker can trigger the overflow with crafted HTTP requests, crashing the worker process and potentially executing code where ASLR is disabled or bypassable.

9.2 CVSS 4.0 Critical EPSS 3.4% · top 11.6% CWE-122 · Heap-based buffer overflowCWE-131 · CWE-131
9.2CVSS 4.0 base score
3.4%EPSS exploitation probability, 30 days
NoNot in CISA KEV
7Affected product versions listed by NVD
34References, 1 tagged exploit
10 Sep 2026Last modified by NVD

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.

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

critical priorityCVSS 4.0 score of 9.2 with network reachability, no authentication required, high confidentiality/integrity/availability impact, and a public exploit reference.

What it is

NGINX Plus and NGINX Open Source contain a heap buffer overflow in the ngx_http_rewrite_module when a rewrite directive is followed by another rewrite, if, or set directive and an unnamed PCRE capture (such as $1) is used in a replacement string containing a question mark. An unauthenticated attacker can trigger the overflow with crafted HTTP requests, crashing the worker process and potentially executing code where ASLR is disabled or bypassable.

Impact

Attackers can crash or restart NGINX worker processes, causing denial of service, and may achieve code execution on systems with ASLR disabled or bypassable.

Attack surface

Reachable over the network via crafted HTTP requests to servers whose configuration uses the affected rewrite/if/set pattern with unnamed PCRE captures and a question mark in the replacement string. No authentication or user interaction is required, though exploitation depends on conditions beyond the attacker's control.

Exploitation

Not listed in CISA KEV, but EPSS is very high (0.68 probability, 99.3rd percentile) and a public exploit reference exists (DepthFirstDisclosures/Nginx-Rift), indicating active interest and available proof-of-concept code.

What to do

  • Apply the vendor patch or upgrade to a fixed NGINX Plus / NGINX Open Source release per F5 advisory K000161019 and Red Hat errata.
  • Audit nginx configurations for rewrite directives followed by rewrite, if, or set that use unnamed PCRE captures ($1, $2) with a question mark in the replacement string, and rewrite them to avoid the pattern.
  • Enable ASLR on all hosts running NGINX to reduce the chance of code execution from the overflow.
  • Restrict or monitor external access to NGINX endpoints that use affected rewrite configurations until patching is complete.

Detection

  • Monitor NGINX worker process crashes, unexpected restarts, or core dumps correlated with HTTP request bursts.
  • Inspect HTTP request logs for requests targeting URIs that exercise rewrite rules with unnamed captures and question-mark replacements.
  • Alert on repeated 5xx responses or connection resets from NGINX instances running affected configurations.
  • Track EPSS and vendor advisories for updated exploitation status and patch guidance.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

7 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
https://my.f5.com/manage/s/article/K000161019 MitigationVendor Advisory
https://depthfirst.com/nginx-rift MitigationTechnical DescriptionThird Party Advisory
https://github.com/DepthFirstDisclosures/Nginx-Rift ExploitThird Party Advisory
https://access.redhat.com/errata/RHSA-2026:17417
https://access.redhat.com/errata/RHSA-2026:17751
https://access.redhat.com/errata/RHSA-2026:17752
https://access.redhat.com/errata/RHSA-2026:17753
https://access.redhat.com/errata/RHSA-2026:17790
https://access.redhat.com/errata/RHSA-2026:17791
https://access.redhat.com/errata/RHSA-2026:17792
https://access.redhat.com/errata/RHSA-2026:17793
https://access.redhat.com/errata/RHSA-2026:17794
https://access.redhat.com/errata/RHSA-2026:18029
https://access.redhat.com/errata/RHSA-2026:18041
https://access.redhat.com/errata/RHSA-2026:18063
https://access.redhat.com/errata/RHSA-2026:19159
https://access.redhat.com/errata/RHSA-2026:19371
https://access.redhat.com/errata/RHSA-2026:19372
https://access.redhat.com/errata/RHSA-2026:19374
https://access.redhat.com/errata/RHSA-2026:20442
https://access.redhat.com/errata/RHSA-2026:20444
https://access.redhat.com/errata/RHSA-2026:21275
https://access.redhat.com/errata/RHSA-2026:22382
https://access.redhat.com/errata/RHSA-2026:22383
https://access.redhat.com/errata/RHSA-2026:22388
https://access.redhat.com/errata/RHSA-2026:22389
https://access.redhat.com/errata/RHSA-2026:22390
https://access.redhat.com/errata/RHSA-2026:22393
https://access.redhat.com/errata/RHSA-2026:22394
https://access.redhat.com/errata/RHSA-2026:22396
https://access.redhat.com/errata/RHSA-2026:58981
https://access.redhat.com/security/cve/CVE-2026-42945
https://bugzilla.redhat.com/show_bug.cgi?id=2477116
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42945.json

Track CVE-2026-42945 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

7.5CVE-2023-44487HTTP/2 Rapid Reset stream cancellation denial of serviceThe HTTP/2 protocol permits a client to cancel many streams quickly, and the server's handling of those resets consumes disproportionate resources. T…KEVEPSS 100%analysed9.2CVE-2026-42533F5 nginx gateway fabric heap-based buffer overflow vulnerabilityA vulnerability exists in NGINX Plus and NGINX Open Source when a map directive uses regex matching and a string expression references the map's rege…EPSS 0.89%9.2CVE-2026-42055F5 dos heap-based buffer overflow vulnerabilityNGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_proxy_v2_module and ngx_http_grpc_module modules. This vulnerability exists whe…EPSS 2.4%9.2CVE-2026-42530F5 nginx gateway fabric use after free vulnerabilityNGINX Open Source has a vulnerability in the ngx_http_v3_module module. When NGINX Open Source is configured to use the HTTP/3 QUIC module, a remote …EPSS 1.1%9.2CVE-2026-9256F5 nginx open source heap-based buffer overflow vulnerabilityNGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when a rewrite directive uses …EPSS 2.7%8.8CVE-2026-60005F5 nginx gateway fabric use of uninitialized resource vulnerabilityNGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_slice_module module. When the slice directive and unnamed regex captures are co…EPSS 0.53%8.8CVE-2026-27654F5 nginx plus heap-based buffer overflow vulnerabilityNGINX Open Source and NGINX Plus have a vulnerability in the ngx_http_dav_module module that might allow an attacker to trigger a buffer overflow to …EPSS 1.5%8.7CVE-2026-55723F5 nginx ingress controller vulnerabilityWhen NGINX Ingress Controller is configured with Custom Resource Definitions (CRDs) or Ingress annotations, an injection vulnerability exists in the …EPSS 0.51%

Source: NIST National Vulnerability Database (record CVE-2026-42945), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.