CVE-2026-42945
HighCVSS 8.1Exploitation Probability (EPSS)
Very high risk99th percentile - higher than 99% of all known CVEs
Summary
A vulnerability exists in NGINX Plus and NGINX Open Source within the ngx_http_rewrite_module. It occurs when the rewrite directive is followed by rewrite, if, or set directives and an unnamed PCRE capture (e.g., $1, $2) with a replacement string containing a question mark (?). An unauthenticated attacker can send crafted HTTP requests, causing a heap buffer overflow in the NGINX worker process, leading to a restart.
Risk Assessment
This vulnerability allows remote code execution on systems with ASLR disabled or when the attacker can bypass ASLR. It could lead to full compromise of the NGINX server and potentially the underlying system.
Recommendation
Immediately update NGINX to the latest patched version. Enable ASLR on the operating system and consider additional security measures such as a web application firewall.
Other vulnerabilities in NGINX
See all- CVE-2016-1247High
The nginx package before 1.6.2-5+deb8u3 on Debian jessie and earlier versions on Ubuntu and Gentoo allow local users with access to the web server user account to gain root privileges via a symlink attack on the error log.
- CVE-2016-4450High
In nginx before 1.10.1 and 1.11.x before 1.11.1, a vulnerability allows remote attackers to cause a denial of service (NULL pointer dereference and worker process crash) via a crafted request, involving writing a client request body to a temporary file.
- CVE-2016-0742High
The resolver in nginx before 1.8.1 and 1.9.x before 1.9.10 allows remote attackers to cause a denial of service via an invalid pointer dereference, leading to a worker process crash.
- CVE-2014-0133High
Heap-based buffer overflow in the SPDY implementation in nginx 1.3.15 before 1.4.7 and 1.5.x before 1.5.12 allows remote attackers to execute arbitrary code via a crafted request.
- CVE-2009-4487Medium
nginx 0.7.64 writes data to a log file without sanitizing non-printable characters. A remote attacker could send an HTTP request containing a terminal escape sequence, potentially modifying a window's title, executing arbitrary commands, or overwriting files.
- CVE-2026-42055High
Heap-based buffer overflow in NGINX ngx_http_proxy_v2_module and ngx_http_grpc_module. Specific configuration conditions and large headers can cause NGINX worker process crash, and in some cases allow code execution.
- CVE-2026-9256High
A vulnerability in the ngx_http_rewrite_module of NGINX Plus and NGINX Open Source occurs when a rewrite directive uses a regex pattern with overlapping PCRE captures and a replacement string referencing multiple captures. An unauthenticated attacker can send crafted HTTP requests, causing a heap buffer overflow in the NGINX worker process, leading to a restart.
- CVE-2026-27654High
A vulnerability in the NGINX ngx_http_dav_module allows an attacker to trigger a buffer overflow in the NGINX worker process. The issue occurs when the configuration uses MOVE or COPY methods with alias directives and prefix locations.
- CVE-2016-0746Critical
A use-after-free vulnerability in the resolver in nginx versions 0.6.18 through 1.8.0 and 1.9.x before 1.9.10 allows remote attackers to cause a denial of service (worker process crash) or possibly have unspecified other impact via a crafted DNS response related to CNAME response processing.
- CVE-2026-97629Medium
NGINX Plus and NGINX Open Source configured with ssl_session_cache shared:name:size without explicit ssl_session_ticket_key directives to automatically rotate SSL session ticket keys allow a remote unauthenticated attacker to forge client SSL sessions in a non-deterministic manner. An attacker could leverage this to bypass verification of client certificates.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

