
The SonicWall Capture Labs threat research team became aware of a heap buffer overflow vulnerability in NGINX products, assessed its impact and developed mitigation measures. NGINX is the top web server and reverse proxy globally. It runs approximately one-third of all websites. Organizations deploy it at the perimeter for CDN nodes and load balancers. It also secures Kubernetes ingress controllers and API gateways.
The issue, tracked as CVE-2026-42945, affects NGINX Open Source 0.6.27 through 1.30.0 and NGINX Plus R32 through R36. This flaw, categorized under CWE-122 Heap-based Buffer Overflow, allows an unauthenticated remote attacker to crash a worker process or, under favorable memory conditions, achieve remote code execution. It carries a CVSS score of 9.2. Users are strongly encouraged to apply the vendor-provided updates without delay.
Figure 1 illustrates the overall NGINX operational architecture, which in both editions is built around a master-worker, event-driven, asynchronous processing model. The major distinction is that NGINX Open Source focuses on the data plane (traffic processing), while NGINX Plus adds an enterprise-grade control plane with runtime APIs, active health checks, observability, and advanced load-balancing capabilities, making it suitable for large-scale production and mission-critical environments.

The area of interest is the worker process and the rewrite phase — the vulnerable deployment model for CVE-2026-42945. The rewrite phase inside each NGINX worker is where the risk lies. A malicious request can hit a vulnerable location block, pass through rewrite/set handling, corrupt worker memory, and then either crash the worker or potentially pivot to code execution. NGINX’s master process may respawn crashed workers, so repeated exploitation can look like unstable workers, spikes in 5xx/connection resets, or a persistent denial-of-service (DoS) condition. Figure 2 illustrates the flow of the heap-based buffer overflow.

The exploitation entry vector is a malformed HTTP request handled by the location or rewrite phase of the worker process, as shown in Figure 2. The vulnerability is configuration-dependent. To identify actual vulnerable endpoints, an attacker must inspect the NGINX configuration and find location blocks containing the affected rewrite pattern rather than scanning for a specific URL path.
As shown in Figure 3, vulnerability exists when all the following are true:

As shown in Figure 4, the exploitation process typically follows these steps:

Successful exploitation enables a remote, unauthenticated attacker to execute arbitrary code on the host operating system with the privileges of the NGINX worker process. Alternatively, the attacker can cause a complete DoS by corrupting heap structures and forcing the active worker processes into an immediate loop crash. Figure 5 demonstrates a real-world proof of concept, showing successful exploitation to achieve remote code execution via heap buffer overflow, using a publicly available exploit. A successful compromise drops the attacker directly into an active command shell operating with the local system privileges of the NGINX worker account. Given NGINX functions as the primary edge proxy for a massive portion of global web traffic, its potential blast radius is severe.

To ensure SonicWall customers are prepared for any exploitation that may occur due to this vulnerability, the following signatures have been released:
With NGINX's growing user base and increasing deployment footprint, organizations and individual users should upgrade to the latest patched version as outlined in the official vendor advisory.
Share This Article

An Article By
An Article By
Dhiren Vaghela
Dhiren Vaghela
Dhiren Vaghela has over a decade of experience in the IPS domain, with a strong focus on defensive security. His expertise lies in identifying, analyzing and mitigating vulnerabilities. Dhiren is well-versed in content-based signature writing, scanner-based alert generation and technical blog writing. By leveraging emerging technologies, he has developed numerous IPS signatures across various protocols. Known for his exceptional signature writing skills and collaborative team spirit, Dhiren is a valuable asset in the field of cybersecurity.