---
title: "Security Advisory: NGINX Rewrite Module Vulnerabilities"
slug: "security-advisory-nginx-rewrite-module-vulnerabilities"
description: "New vulnerabilities continue to be reported across a wide variety of server software. This blog looks at the recent vulnerabilities reported in the NGINX rewrite module, which need patching now, along with some practical advice for organizations using NGINX."
author: "security-team"
date: "December 4, 2026"
lastUpdated: "2026-12-04"
category: "Security"
featured_image: "https://strapi-main-website.objectstore.e2enetworks.net/security-advisory-nginx-rewrite-module-vulnerabilities.png"
---

## Overview

The NGINX rewrite module (ngx_http_rewrite_module) has been affected by three vulnerabilities disclosed in 2026, CVE-2026-42945 ("NGINX Rift"), CVE-2026-9256 and CVE-2026-15176, which can lead to buffer overflows and memory corruption under certain circumstances. These issues arise when an attacker sends crafted requests to a server whose rewrite configuration matches specific patterns. CVE-2026-42945 has been reported as exploited in the wild.

## Affected Components

- NGINX Open Source versions before 1.30.6 (stable) or 1.31.7 (mainline) that use the rewrite directive, and NGINX Plus without F5's latest security update
- Configurations where a rewrite directive with a query string ("?") is followed, in the same location, by an if or set directive, with an unnamed regex capture such as \$1 (CVE-2026-42945)
- Configurations that combine alias with rewrite (CVE-2026-15176)

## Potential Risks

- Denial-of-Service (DoS) via crafted requests
- Memory corruption leading to worker process crashes
- Remote code execution on systems where ASLR is disabled or can be bypassed (CVE-2026-42945)

## Recommended Actions

- Apply the latest NGINX security patches
- If you cannot upgrade immediately, replace unnamed regex captures (\$1, \$2) with named captures in affected rewrite directives (interim workaround for CVE-2026-42945)
- Review rewrite configurations for unsafe patterns
- Use return directives instead of rewrite where possible

## Patch Guidance

- Upgrade to the latest stable NGINX release (1.30.8 as of 4 December 2026) or the latest mainline release (1.31.10). Versions 1.30.6 (stable) and 1.31.7 (mainline) are the minimum that fix all three vulnerabilities.
- Apply vendor-recommended patches for your distribution. Distribution packages often backport fixes without changing the NGINX version number, so check your distribution's security advisory for each CVE.
- For NGINX Plus, apply the latest security update from F5

Validate your NGINX version:

```nginx
nginx -v
```

## Reference Links

- [NGINX Security Advisories](https://nginx.org/en/security_advisories.html)
- [F5 Security Advisory K000161019 (CVE-2026-42945)](https://my.f5.com/manage/s/article/K000161019)

## Summary: Priority Actions

| Vulnerability Area | Immediate Action | Long-Term Action |
| --- | --- | --- |
| NGINX Rewrite | Upgrade NGINX, audit configs; until patched, use named captures in affected rewrite rules (CVE-2026-42945 workaround) | Keep NGINX on a supported, patched release |

Contact: E2E Networks Security Operations Center (soc@e2enetworks.com)

_This advisory is provided for informational purposes. Organizations should evaluate the applicability of these vulnerabilities within their own environments and take remediation measures as advised by the respective software vendors._
