See How Fidelis Deception® Turns Attacker Activity Into Actionable Evidence

CVE-2026-42945

From Worker Crashes to Potential Code Execution: A Closer Look at CVE-2026-42945

CVSS Gauge
CVSS Needle

Summary

CVE-2026-42945 is a critical heap-based buffer overflow vulnerability in the NGINX ngx_http_rewrite_module that occurs when rewrite directives containing a query string are used with rewrite, if, or set directives referencing unnamed PCRE capture groups such as $1 or $2. An unauthenticated attacker can exploit the flaw through crafted HTTP requests, potentially causing NGINX worker crashes and denial-of-service conditions. In environments where ASLR is disabled or bypassed, the vulnerability may also enable remote code execution. The issue affects NGINX Open Source versions 0.6.27–1.30.0, and NGINX Plus releases R32-R36, and is fixed in NGINX Open Source 1.30.1/1.31.0 and NGINX Plus R36 P4, R35 P2, and R32 P6.

Urgent Actions Required

Which Systems Are Vulnerable to CVE-2026-42945?

Technical Overview 

How Does the CVE-2026-42945 Exploit Work?

The attack typically follows these steps:

CVE-2026-42945

What Causes CVE-2026-42945?

Vulnerability Root Cause:   

This vulnerability is caused by a flaw in the NGINX ngx_http_rewrite_module script engine. When a rewrite directive containing a query string is used with subsequent rewrite, if, or set directives that reference unnamed PCRE capture groups (such as $1 or $2), the module incorrectly calculates the required buffer size during request processing. This mismatch can lead to a heap-based buffer overflow in the NGINX worker process, resulting in worker crashes and, under certain conditions, remote code execution. 

How Can You Mitigate CVE-2026-42945?

If immediate patching is delayed or not possible: 

  • Review NGINX configurations for rewrite directives that use unnamed capture groups such as $1 or $2.
  • Replace unnamed captures with named captures in affected rewrite rules.
  • Ensure Address Space Layout Randomization (ASLR) is enabled on the operating system.
  • Restrict access to affected services using firewall rules or access control lists where feasible.
  • Monitor NGINX logs and worker processes for unexpected crashes, restarts, or abnormal activity that may indicate exploitation attempts.

Which Assets and Systems Are at Risk?

Will Patching CVE-2026-42945 Cause Downtime?

Patch application impact: Low. Upgrading to a fixed NGINX version typically requires a service restart or redeployment, resulting in minimal downtime.

Mitigation (if immediate patching is not possible): Replace unnamed capture groups ($1, $2) with named captures and ensure ASLR is enabled. This reduces risk but does not fully remediate the vulnerability.

How Can You Detect CVE-2026-42945 Exploitation?

Exploitation Signatures:

Look for crafted HTTP requests targeting NGINX servers that use vulnerable rewrite configurations with unnamed capture groups ($1, $2) and query string handling. 

Indicators of Compromise (IOCs/IOAs):

Behavioral Indicators:

Alerting Strategy:

Remediation & Response

See What Deep Session Inspection Detects Beyond Traditional DPI

      • Understand the gap between DPI and DSI
      • Detect hidden threats and data leaks
      • Gain deeper visibility into network, email, and web traffic
      • Improve threat detection with context-rich analysis
Download the Whitepaper

CVSS Breakdown Table 

MetricValue Description
Base Score8.1High-severity vulnerability with potential for denial of service and remote code execution under specific conditions
Attack VectorNetworkCan be triggered through crafted HTTP requests sent remotely
Attack ComplexityHighExploitation requires a specific NGINX configuration and additional conditions
Privileges RequiredNoneNo authentication is required
User Interaction NoneNo user action is needed for exploitation
Scope Unchanged Impact is limited to the affected NGINX component
Confidentiality Impact HighSuccessful code execution could expose sensitive information
Integrity Impact HighAn attacker may be able to execute arbitrary code and alter system behavior
Availability ImpactHighExploitation can crash NGINX worker processes and disrupt services

Related Readings

One Platform for All Adversaries

See Fidelis in action. Learn how our fast and scalable platforms provide full visibility, deep insights, and rapid response to help security teams across the World protect, detect, respond, and neutralize advanced cyber adversaries.

How to Track Key Vulnerabilities and Exposures (CVEs) in the Modern Threat Landscape

Explore terrain-based, risk-informed strategy that helps security teams monitor and assess vulnerabilities in real time!

Insights from the Latest Global Network Security Report
Read the report on emerging cyber threats, AI-powered attacks, and strategies to strengthen security and resilience.