CVSS 9.2
Critical severity score assigned to CVE-2026-42945 via CVSS v3.1 — the highest tier for remotely exploitable unauthenticated server-side vulnerabilities, placing it alongside the most dangerous web server disclosures on record
18 years
Duration this heap buffer overflow existed undetected in the nginx codebase — every stable release from nginx 0.6.27 in 2008 through 1.30.0 ships with the vulnerable rewrite module code
34%
Percentage of all active websites globally that run nginx (W3Techs, May 2026) — making CVE-2026-42945 one of the widest-reach unauthenticated server vulnerabilities ever disclosed for production web infrastructure
0 credentials required
Authentication required to trigger CVE-2026-42945 — a single crafted HTTP request to any reachable nginx port with the vulnerable rewrite pattern is sufficient to crash the worker process or achieve code execution

CVE-2026-42945, the nginx vulnerability researchers named NGINX Rift, exposes every web server running nginx versions 0.6.27 through 1.30.0 to unauthenticated heap corruption via a single crafted HTTP request. A public proof-of-concept demonstrating root-level code execution became available on May 13, 2026 — 18 years after the vulnerable code first shipped.

The nginx rewrite module vulnerability CVE-2026-42945 lives in ngx_http_rewrite_module, the component responsible for URL rewriting and redirection. Researchers at depthfirst discovered that a size-calculation pass and a subsequent write pass handle certain URI characters differently under specific rewrite conditions. When a rewrite directive includes an unnamed PCRE capture group ($1 or $2) and a question mark in the replacement string, an internal flag called is_args remains set during the allocation phase. A downstream set directive then calculates memory needed assuming no URI escaping is required, while the write operation still observing the flag applies URI escaping that expands the data past the allocated buffer boundary. The result is a heap overflow in the nginx worker process.

The attack requires no authentication and no user interaction. Any HTTP client can send a single specially crafted request to any nginx-exposed port where the vulnerable rewrite pattern is active. The immediate outcome is a denial of service: the worker process crashes and nginx's master process restarts it. Researchers confirmed full code execution in environments where address space layout randomization is disabled, a configuration common in container deployments, older Linux distributions, and embedded systems.

The nginx rewrite module has been part of the project since 0.6.27, released in 2008. Every stable and mainline nginx release for the next 18 years shipped with the vulnerable code. Nginx powers approximately 34% of all active websites globally, making CVE-2026-42945 one of the widest-reach server vulnerabilities ever disclosed. Patch to nginx 1.30.1 before this weekend.

How Does the NGINX Rift Buffer Overflow Work?

The buffer overflow in CVE-2026-42945 originates from a design flaw in how ngx_http_rewrite_module processes URL rewrite replacements containing both a question mark and unnamed PCRE capture groups.

Nginx processes rewrite directives in two sequential passes. The first pass estimates the size of the destination buffer needed to store the rewritten URL. The second pass writes the transformed result into that allocated buffer. The vulnerability emerges when these two passes handle the same characters differently under specific conditions.

When a rewrite directive contains a question mark in the replacement string, nginx sets an internal flag called is_args permanently for the remainder of that request's rewrite chain. This flag signals that the URL contains query arguments and triggers URI encoding for special characters during the write phase. The allocation phase calculates buffer size without accounting for the escaping expansion that is_args will cause in the same directive scope.

The trigger condition requires three elements in the nginx configuration: a rewrite directive using an unnamed PCRE capture group ($1 or $2 syntax), a replacement string containing a literal question mark, and a second rewrite, if, or set directive in the same location or server block scope following the initial rewrite. When all three conditions are present, the allocation pass calculates a buffer that is too small for the data the write pass will produce. The write pass overflows the buffer into adjacent heap memory, corrupting internal nginx state.

Researchers at depthfirst published a working proof-of-concept on May 13, 2026 alongside their full technical paper. The PoC demonstrates complete code execution in environments where ASLR is disabled, which is common in container-based deployments and older Linux distributions. In ASLR-enabled environments, the primary impact is a repeatable denial of service: the nginx worker process crashes and is automatically restarted by the master process, dropping all in-flight connections handled by that worker during the restart window. The CVSS 9.2 score reflects the worst-case RCE scenario as documented by the National Vulnerability Database.

Which nginx Versions Are Affected by CVE-2026-42945?

CVE-2026-42945 affects nginx versions 0.6.27 through 1.30.0, covering every stable and mainline release issued between 2008 and May 13, 2026. This 18-year window means no nginx deployment that shipped before the patch exists without the vulnerable code in its rewrite module.

The affected range covers nginx 1.24.x, 1.26.x, and 1.28.x — the most widely deployed stable versions in production as of 2026. Nginx powers approximately 34% of all active websites globally according to W3Techs data from May 2026. The nginx open-source distribution also forms the foundation for commercial products including NGINX Plus and the NGINX Ingress Controller for Kubernetes. Organizations running Kubernetes ingress controllers based on nginx must verify whether their ingress controller version incorporates the patch.

Which configurations are vulnerable? Exploitation requires the specific three-element rewrite pattern: unnamed PCRE capture group, question mark in replacement, followed by another rewrite-type directive. Standard reverse proxy configurations using only proxy_pass without rewrite directives are not affected. Configurations using rewrite directives with named capture groups are not affected. WordPress permalink configurations, Django URL dispatching setups, and many Node.js reverse proxy templates commonly use the vulnerable unnamed-capture pattern, placing a large proportion of production nginx deployments in scope.

The nginx rewrite module vulnerability is not present in Prisma Access, Cloud NGFW, or Panorama appliances. It is limited to deployments of the open-source nginx binary and products built on it.

The fixed version is nginx 1.30.1, released May 13, 2026. Ubuntu, Debian, Red Hat Enterprise Linux, and Alpine Linux all pushed updated packages by May 14, 2026, per The Hacker News coverage of the disclosure.

Free daily briefing

Briefings like this, every morning before 9am.

Threat intel, active CVEs, and campaign alerts, distilled for practitioners. 50,000+ subscribers. No noise.

Is CVE-2026-42945 Being Actively Exploited Right Now?

A working proof-of-concept for CVE-2026-42945 became publicly available on May 13, 2026, the same day as the full vulnerability disclosure. Researchers at depthfirst published both the technical analysis and the exploit code in their paper "NGINX Rift: Achieving NGINX Remote Code Execution via an 18-Year-Old Vulnerability."

No confirmed in-the-wild exploitation had been reported as of May 15, 2026. Several factors indicate that active scanning is underway. The vulnerability requires no authentication, making automated probing feasible with minimal infrastructure. The GitHub repository for the nginx-rift proof-of-concept is publicly accessible, and Shodan and Censys continuously index internet-facing nginx servers. Security researchers at Picus Security noted in their May 13 analysis that the conditions triggering the vulnerability appear in the majority of reverse-proxy setups serving dynamic web applications.

CISA had not added CVE-2026-42945 to its Known Exploited Vulnerabilities catalog as of May 15, 2026. Based on CISA's historical pattern of adding vulnerabilities with public proof-of-concept code within 72 hours of confirmed in-the-wild exploitation, federal agencies should treat this as a likely near-term KEV addition and prioritize patching now rather than waiting for an official deadline.

The threat actor profile for initial exploitation follows the standard post-disclosure pattern: opportunistic automated scanners will probe at scale before targeted actors adapt the PoC for specific campaigns. The 48-hour window between public PoC availability and first confirmed exploitation has been documented across previous high-profile server vulnerabilities. Security teams that applied emergency patches for the CVE-2026-33032 nginx-ui MCPwn authentication bypass within two days of that disclosure found themselves ahead of confirmed exploitation by approximately 24 hours.

The conditions triggering CVE-2026-42945 appear in the majority of reverse-proxy setups serving dynamic web applications. It is one of the most broadly deployed vulnerable patterns we have assessed.

Picus Security Research, May 2026

How to Detect CVE-2026-42945 Exploitation Attempts

Two detection layers provide the earliest warning of CVE-2026-42945 exploitation: nginx process monitoring and HTTP access log analysis.

Process-level detection: CVE-2026-42945 exploits cause the nginx worker process to crash with a segmentation fault. Nginx logs these crashes to the error log as "worker process [PID] exited on signal 11." A single crash may be a transient error. Two or more crashes from the same remote IP address within 60 seconds indicate automated exploitation scanning and should trigger immediate investigation and block action. Configure alerting on this pattern in your SIEM with a threshold of two or more occurrences per source IP per minute.

Access log detection: The malicious request must target a URI location served by a rewrite rule with the vulnerable three-element pattern. Exploitation attempts appear in nginx access logs as requests to rewrite-mapped locations with anomalous URI structures, particularly unexpected query string expansions in locations that normally do not process complex query parameters. Log analysis rules that baseline normal request patterns for rewrite-enabled locations will surface deviations within hours of a scanning campaign targeting your infrastructure.

Network behavior detection: Successful RCE via CVE-2026-42945 results in the nginx worker process establishing outbound connections to attacker-controlled infrastructure. Monitor for any outbound TCP connection initiated from the nginx worker process user to external IP addresses. This activity has no legitimate operational cause and indicates post-exploitation code execution.

The four detection artifacts listed below cover the full exploitation chain from initial crash through post-exploitation network behavior.

Subscribe to unlock Indicators of Compromise

Free subscribers unlock full IOC lists, remediation steps, and every daily briefing.

How to Patch and Mitigate the nginx Rewrite Module Vulnerability

Patches for CVE-2026-42945 are available now. Nginx 1.30.1 was released on May 13, 2026, the same day as the public disclosure and proof-of-concept publication. Every major Linux distribution pushed updated packages by May 14. Upgrading is the complete fix. No configuration change removes the vulnerability from nginx versions below 1.30.1.

The interim workaround of converting unnamed capture groups to named capture groups is viable for organizations that cannot patch immediately due to maintenance windows or change-freeze policies. Named capture groups use a different code path in ngx_http_rewrite_module that does not exhibit the size-calculation mismatch. The syntax change is minimal: a rule like "rewrite ^/(.) /$1?q=1 last" becomes "rewrite ^/(?P<path>.) /$path?q=1 last." Test all rewrite rules after this conversion to verify URL routing behavior is unchanged.

For defense-in-depth beyond patching, restrict file-system write access for the nginx worker user. Post-exploitation code execution in an nginx worker runs as the nginx service account. If that user cannot write to the nginx configuration directory or the document root, persistence through configuration modification or web shell deployment is blocked. File permission controls on nginx configuration directories provide an effective post-exploitation constraint that complements patching.

Kubernetes environments require separate attention. Helm-based nginx Ingress Controller deployments use a container image that bundles the nginx binary. Upgrading the host nginx package does not update nginx inside running containers. The ingress controller Helm chart must be upgraded to a version that ships with an nginx 1.30.1 or later base image. Check the current nginx version inside ingress controller pods with: kubectl exec -n ingress-nginx [pod-name] -- nginx -v.

Subscribe to unlock Remediation & Mitigation steps

Free subscribers unlock full IOC lists, remediation steps, and every daily briefing.

Why the nginx Rewrite Module Vulnerability CVE-2026-42945 Matters for Your Organization

The nginx rewrite module vulnerability CVE-2026-42945 is not a hypothetical risk. Nginx is the default web server for cloud-native frameworks, Kubernetes ingress, and the majority of modern reverse proxy architectures. A successful denial-of-service attack against a production nginx server drops all connections handled by the affected worker. For high-traffic environments, this is a customer-visible outage lasting seconds to minutes per exploitation attempt. A successful RCE attack places an attacker inside your application tier with code execution.

From that network position, an attacker with code execution on an nginx server can read all proxied traffic in cleartext before upstream TLS termination, access backend service credentials embedded in nginx configuration files or environment variables, enumerate internal IP routing and pivot to backend services reachable from the web tier, and extract TLS private keys if nginx terminates SSL directly. This post-exploitation path mirrors the lateral movement documented in the Palo Alto PAN-OS CVE-2026-0300 firewall compromise, where attackers used code execution on a perimeter device to enumerate Active Directory and harvest VPN credentials before pivoting deeper.

Organizations using nginx in shared-ingress deployments face an amplified blast radius. A single compromised nginx worker in a shared Kubernetes ingress controller can access traffic from all tenants routing through that ingress, not only the targeted application. Multi-tenant SaaS platforms, managed hosting providers, and Kubernetes clusters serving multiple applications from one ingress pod face cross-tenant data exposure risk.

The 18-year lifespan of this flaw in production code is a practical reminder that vulnerability age does not correlate with patchability or exploitability. Today is close-this-gap day: verify your nginx version, apply the patch, and close the exposure before Monday morning.

The bottom line

CVE-2026-42945 (NGINX Rift) puts every nginx server running rewrite rules with unnamed PCRE captures at risk of unauthenticated heap corruption, with a public proof-of-concept available since May 13. Three takeaways: the flaw spans all nginx versions 0.6.27 through 1.30.0, no credentials are required to trigger it, and the vulnerable rewrite pattern appears in the majority of production reverse-proxy and WordPress configurations. Upgrade to nginx 1.30.1 or later before end of day today. If patching is not immediately possible, convert unnamed capture groups to named captures and restrict the worker process from writing to configuration directories.

Frequently asked questions

What is CVE-2026-42945 (NGINX Rift)?

CVE-2026-42945, named NGINX Rift by the researchers who discovered it, is a heap buffer overflow vulnerability in ngx_http_rewrite_module, the component of nginx responsible for URL rewriting and redirection. The flaw was introduced in nginx 0.6.27 in 2008 and affects every stable and mainline release through 1.30.0. A remote unauthenticated attacker can trigger the overflow by sending a single specially crafted HTTP request to any nginx server where the vulnerable rewrite configuration pattern is active. The immediate outcome is a worker process crash. In environments with address space layout randomization disabled, full remote code execution is possible. The fixed version is nginx 1.30.1, released May 13, 2026.

How does the NGINX Rift vulnerability work?

The flaw originates from a mismatch between nginx's buffer size estimation pass and its buffer write pass during rewrite directive processing. When a rewrite directive uses an unnamed PCRE capture group ($1 or $2) and includes a question mark in the replacement string, an internal flag called is_args remains set permanently. A downstream set or rewrite directive then calculates buffer size assuming no URI escaping is needed, but the write operation applies URI escaping that expands the output past the allocated boundary. The resulting heap overflow corrupts internal nginx state, crashing the worker process and enabling code execution in environments where ASLR is disabled.

Which nginx versions are affected by CVE-2026-42945?

CVE-2026-42945 affects nginx versions 0.6.27 through 1.30.0, covering every stable and mainline release issued between 2008 and May 13, 2026. Both the nginx open-source distribution and commercial NGINX Plus products built on affected nginx versions are vulnerable. The vulnerability is limited to deployments of nginx binaries that include ngx_http_rewrite_module, which is compiled in by default. Prisma Access, Cloud NGFW, and Panorama appliances are not affected. The fixed version is nginx 1.30.1. Major Linux distributions including Ubuntu, Debian, Red Hat Enterprise Linux, and Alpine Linux all had updated packages available by May 14, 2026.

Is there a patch for CVE-2026-42945?

Yes. Nginx 1.30.1, released May 13, 2026, fully resolves CVE-2026-42945 by correcting the size calculation logic in ngx_http_rewrite_module. All major Linux distribution package repositories had updated packages available by May 14, 2026. Organizations can verify their installed version with the command nginx -v. An interim workaround is available for environments that cannot immediately patch: converting unnamed PCRE capture groups ($1 and $2) to named capture groups avoids the vulnerable code path while maintaining identical URL routing behavior. Named capture syntax is rewrite ^/(?P<path>.*) /$path?q=1 last instead of rewrite ^/(.*) /$1?q=1 last.

How do I detect CVE-2026-42945 exploitation attempts?

Configure alerting on the pattern 'worker process exited on signal 11' in the nginx error log at /var/log/nginx/error.log. A single occurrence may be a transient error. Two or more occurrences from the same source IP address within 60 seconds indicate automated exploitation scanning and should trigger immediate investigation. At the network layer, monitor for outbound TCP connections initiated by the nginx worker process user (typically www-data or nginx) to external IP addresses. This activity has no legitimate cause and indicates successful post-exploitation code execution following a heap overflow.

How do I fix or mitigate the NGINX Rift vulnerability?

Upgrade nginx to version 1.30.1 or higher using your distribution package manager: apt update and apt install nginx on Ubuntu and Debian, dnf update nginx on RHEL and CentOS, or apk upgrade nginx on Alpine Linux. Verify the installed version with nginx -v. For Kubernetes environments, upgrade the nginx Ingress Controller Helm chart separately to pull the patched nginx base image, as upgrading the host nginx package does not update nginx inside running containers. If immediate patching is not possible, convert all unnamed PCRE capture groups in rewrite directives from $1/$2 syntax to named capture group syntax as an interim workaround.

Do I need rewrite rules for CVE-2026-42945 to be exploitable?

Yes. Exploitation of CVE-2026-42945 requires a specific three-element pattern in the nginx configuration: an unnamed PCRE capture group in the rewrite match expression using $1 or $2 syntax, a question mark in the rewrite replacement string, and a second rewrite, if, or set directive in the same location or server block scope. Nginx servers using only proxy_pass, fastcgi_pass, or other directives without rewrite rules containing unnamed captures and question marks are not vulnerable to this attack path. However, this exact three-element pattern appears in default WordPress permalink configurations, many Django reverse proxy setups, and common Node.js routing templates.

What can an attacker do with the NGINX Rift RCE?

An attacker achieving code execution via CVE-2026-42945 runs as the nginx worker process user, typically www-data or nginx. From this position, the attacker can read all proxied traffic in cleartext before upstream TLS termination, access backend service credentials stored in nginx configuration files or environment variables, enumerate internal network routing to pivot to backend services accessible from the web tier, and extract TLS private keys if nginx terminates SSL directly. In shared-ingress Kubernetes deployments, the blast radius expands to all application tenants routing through the compromised ingress controller, not just the targeted application.

Sources & references

  1. NVD — CVE-2026-42945 Detail
  2. The Hacker News — 18-Year-Old NGINX Rewrite Module Flaw Enables Unauthenticated RCE
  3. depthfirst Research — NGINX Rift: Achieving NGINX RCE via an 18-Year-Old Vulnerability
  4. Picus Security — NGINX Rift CVE-2026-42945 Critical Heap Buffer Overflow Vulnerability Explained

Free resources

25
Free download

Critical CVE Reference Card 2025–2026

25 actively exploited vulnerabilities with CVSS scores, exploit status, and patch availability. Print it, pin it, share it with your SOC team.

No spam. Unsubscribe anytime.

Free download

Ransomware Incident Response Playbook

Step-by-step 24-hour IR checklist covering detection, containment, eradication, and recovery. Built for SOC teams, IR leads, and CISOs.

No spam. Unsubscribe anytime.

Free newsletter

Get threat intel before your inbox does.

50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, weekly, no spam.

Unsubscribe anytime. We never sell your data.

Eric Bang
Author

Founder & Cybersecurity Evangelist, Decryption Digest

Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals weekly.

Free Brief

The Mythos Brief is free.

AI that finds 27-year-old zero-days. What it means for your security program.

Joins Decryption Digest. Unsubscribe anytime.

Daily Briefing

Get briefings like this every morning

Actionable threat intelligence for working practitioners. Free. No spam. Trusted by 50,000+ SOC analysts, CISOs, and security engineers.

Unsubscribe anytime.

Mythos Brief

Anthropic's AI finds zero-days your scanners miss.