# CVE-2026-9256: NGINX ngx_http_rewrite_module vulnerability

> An unauthenticated attacker can trigger a heap buffer overflow in NGINX via crafted requests, causing a restart or potentially executing code if ASLR is disabled.

- **Severity:** Critical 9.2 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 May 2026
- **Updated:** 25 Aug 2026
- **Also known as:** ALPINE-CVE-2026-9256, ALSA-2026:28212, ALSA-2026:28921, ALSA-2026:28973, ALSA-2026:29151, ALSA-2026:29874, AZL-88116, BELL-CVE-2026-9256, BIT-nginx-2026-9256, BIT-nginx-gateway-2026-9256, CLSA-2026-1779712300, CLSA-2026-1779712426, CLSA-2026-1779736259, CLSA-2026-1779737077, CLSA-2026-1779788634, CLSA-2026-1779788913, CLSA-2026-1779789531, CLSA-2026-1779789551, CLSA-2026-1779789825, CLSA-2026-1779790011, CLSA-2026-1779790051, CLSA-2026-1779804603, CLSA-2026-1779992757, CLSA-2026-1780065226, DEBIAN-CVE-2026-9256, ECHO-5a21-3794-30f7, GHSA-h78r-86c6-jgp4, MGASA-2026-0159, MINI-j5x7-vr73-vfcw, MINI-mxrp-93f6-m62j, OESA-2026-2587, RHSA-2026:28212, RHSA-2026:28921, RHSA-2026:28973, RHSA-2026:29151, RHSA-2026:29874, RLSA-2026:28212, RLSA-2026:28921, RLSA-2026:29151, RLSA-2026:29874, SUSE-SU-2026:22178-1, SUSE-SU-2026:2307-1, UBUNTU-CVE-2026-9256, openSUSE-SU-2026:10852-1, openSUSE-SU-2026:21107-1

## What is CVE-2026-9256?

CVE-2026-9256 is a critical memory corruption vulnerability in Debian Debian Linux, published on 22 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when a rewrite directive uses a regex pattern with distinct, overlapping Perl-Compatible Regular Expression (PCRE) captures (for example, ^/((.*))$) and a replacement string that references multiple such captures (for example, $1$2) in a redirect or arguments context. An unauthenticated attacker along with conditions beyond their 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.

Weakness: CWE-122 (Heap-based Buffer Overflow)

## Which versions are affected by CVE-2026-9256?

2 open source packages ship an affected version, including nginx and nginx-gateway. It affects 12 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nginx` | Bitnami | From 0.1.17 | 1.24.0, 1.30.2, 1.31.1 |
| `nginx-gateway` | Bitnami | From 0.1.17 | 2.2.1 |
| `nginx` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-all-modules` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-core` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-filesystem` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-mod-devel` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-mod-http-image-filter` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-mod-http-perl` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-mod-http-xslt-filter` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-mod-mail` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx-mod-stream` | AlmaLinux:10 | All versions | 2:1.26.3-6.el10_2.4 |
| `nginx` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-all-modules` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-filesystem` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-mod-devel` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-mod-http-image-filter` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-mod-http-perl` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-mod-http-xslt-filter` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-mod-mail` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx-mod-stream` | AlmaLinux:8 | All versions | 1:1.24.0-3.module_el8.10.0+4200+fea3b4c7.2.alma.1 |
| `nginx` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |
| `nginx` | AlmaLinux:9 | All versions | 2:1.20.1-28.el9_8.3.alma.1 |
| `nginx` | AlmaLinux:9 | All versions | 2:1.26.3-9.module_el9.8.0+260+95b8e5ed.1 |
| `nginx-all-modules` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |
| `nginx-all-modules` | AlmaLinux:9 | All versions | 2:1.20.1-28.el9_8.3.alma.1 |
| `nginx-all-modules` | AlmaLinux:9 | All versions | 2:1.26.3-9.module_el9.8.0+260+95b8e5ed.1 |
| `nginx-core` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |
| `nginx-core` | AlmaLinux:9 | All versions | 2:1.20.1-28.el9_8.3.alma.1 |
| `nginx-core` | AlmaLinux:9 | All versions | 2:1.26.3-9.module_el9.8.0+260+95b8e5ed.1 |
| `nginx-filesystem` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |
| `nginx-filesystem` | AlmaLinux:9 | All versions | 2:1.20.1-28.el9_8.3.alma.1 |
| `nginx-filesystem` | AlmaLinux:9 | All versions | 2:1.26.3-9.module_el9.8.0+260+95b8e5ed.1 |
| `nginx-mod-devel` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |
| `nginx-mod-devel` | AlmaLinux:9 | All versions | 2:1.20.1-28.el9_8.3.alma.1 |
| `nginx-mod-devel` | AlmaLinux:9 | All versions | 2:1.26.3-9.module_el9.8.0+260+95b8e5ed.1 |
| `nginx-mod-http-image-filter` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |
| `nginx-mod-http-image-filter` | AlmaLinux:9 | All versions | 2:1.20.1-28.el9_8.3.alma.1 |
| `nginx-mod-http-image-filter` | AlmaLinux:9 | All versions | 2:1.26.3-9.module_el9.8.0+260+95b8e5ed.1 |
| `nginx-mod-http-perl` | AlmaLinux:9 | All versions | 1:1.24.0-7.module_el9.8.0+259+a3b861bb.2.alma.1 |

Products: Debian Debian Linux, F5 Dos, F5 Nginx Gateway Fabric, F5 Nginx Ingress Controller, F5 Nginx Instance Manager, F5 Nginx Open Source, F5 Nginx Plus, F5 Waf, Redhat Discovery, Redhat Enterprise Linux, Redhat Hardened Images, Redhat Update Infrastructure.

## How do I fix CVE-2026-9256?

Upgrade nginx to a fixed version for your release line: 1.24.0, 1.30.2 or 1.31.1.

## Is CVE-2026-9256 being exploited?

There is no known exploitation of CVE-2026-9256 in the wild and no public exploit code.

Public exploit code:

- https://github.com/3nou9h/CVE-2026-9256-Poc (github_poc): https://github.com/3nou9h/CVE-2026-9256-Poc
- https://github.com/W5M1n9/NGINX-ngx_http_rewrite_module-heap-buffer-overflow-CVE-2026-9256 (github_poc): https://github.com/W5M1n9/NGINX-ngx_http_rewrite_module-heap-buffer-overflow-CVE-2026-9256
- CVE-2026-9256 Nginx heap buffer overflow POC (github_poc): https://github.com/06-ux/CVE-2026-9256-POC
- Tracking the nginx CVE-2026-9256 rewrite-module heap overflow (github_poc): https://github.com/suominen/CVE-2026-9256

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-9256 and fix it if it is affected.

What it is: CVE-2026-9256 is a critical memory corruption vulnerability in Debian Debian Linux, published on 22 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-9256 in the wild and no public exploit code.

Affected packages and fixed versions:
- nginx (Bitnami): affected from 0.1.17; fixed in 1.24.0, 1.30.2, 1.31.1
- nginx-gateway (Bitnami): affected from 0.1.17; fixed in 2.2.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-9256/ (Markdown: https://insights.sbomify.com/CVE-2026-9256/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-9256
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-9256
- OSV: https://osv.dev/vulnerability/CVE-2026-9256

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-9256/
Summaries are generated and may contain mistakes; the official description above is the record.
