> ## Content Index
> Fetch the complete content index at: https://trendboxgeek.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# NGINX 1.30.6 and 1.31.7 Security Updates: All 5 CVEs Patched
- URL: https://trendboxgeek.com/blog/nginx-1-30-6-updates/
- Published: 2026-11-12T14:11:23.000Z
- Updated: 2026-11-12T14:11:23.000Z
- Author: Pankajbhai Chavda
- Tags: #blog-col

NGINX pushed out 1.30.6 (stable) and 1.31.7 (mainline) on October 14, 2026\. If you checked the upstream NGINX security advisories page, all five bugs were marked "medium". Nothing looked urgent.

Then The Hacker News ran a deeper breakdown on October 15, and by October 19 BleepingComputer was covering F5's out-of-band emergency patches. F5, which owns NGINX, scored three of those five "medium" bugs at 9.2 (Critical) on CVSS v4.0, one at 8.3 (High), and one at 6.9 (Medium).

Why is there such a big difference between NGINX and F5? Upstream NGINX marks bugs as medium whenever they don't affect a blank, out-of-the-box default config. F5 scores what happens if you actually use the affected directives in production. And in this batch, the triggers aren't obscure edge cases. We're talking about `alias` with `rewrite`, regex `map` blocks, `aio`, HTTP/3 (`quic`), and `ssl_session_cache shared:SSL:10m;`, which is literally the exact line NGINX tells you to copy and paste in its own SSL documentation.

What's worse is that one of the heap overflows had been sitting in NGINX since version 0.1.29 back in May 2005\. Another one was a broken fix from July's security update (`CVE-2026-42533`), so even if you patched your servers in July, you were still exposed.

I tested all of this on my Ubuntu 26.04 LTS (`resolute`) lab box, `boxgeek`. I wanted to see how Canonical handled the package backports, run a quick grep audit across nginx.conf, and then upgrade straight to upstream `1.30.6` and `1.31.8`. Along the way, I tripped over a stupid Bash quoting bug and an Ubuntu package conflict that killed the NGINX service without a single warning. Here is what I found.

## The 5 Bugs Fixed in NGINX 1.30.6 and 1.31.7

Every one of these five CVEs can be triggered remotely by an unauthenticated client over the network if your config uses the matching feature.

| CVE                | F5 Score         | Versions affected                  | What triggers it in nginx.conf                                                               |
| ------------------ | ---------------- | ---------------------------------- | -------------------------------------------------------------------------------------------- |
| **CVE-2026-15176** | **9.2 Critical** | 0.1.29 to 1.31.6                   | location with alias, a rewrite that changes the URI, and anything reading $request\_filename |
| **CVE-2026-93479** | **9.2 Critical** | 1.30.0 to 1.30.5, 1.31.2 to 1.31.6 | Regex map captures referenced by root or log\_format before the map variable itself          |
| **CVE-2026-97205** | **9.2 Critical** | 0.8.11 to 1.31.6                   | aio turned on alongside ssi on serving pages with include virtual                            |
| **CVE-2026-97629** | **8.3 High**     | 1.23.2 to 1.31.6                   | ssl\_session\_cache shared:... without an explicit ssl\_session\_ticket\_key file            |
| **CVE-2026-95101** | **6.9 Medium**   | 1.25.0 to 1.31.6                   | HTTP/3 (listen ... quic) with default proxy\_request\_buffering on                           |

### CVE-2026-15176: The 21-Year-Old alias + rewrite Overflow

F5 found this one internally. It has been in `ngx_http_core_module` since May 2005\. The bug opens up in the brief moment after a rewrite rule changes a request's URI, right before NGINX picks the next location block.

If that `location` uses `alias`, the location prefix is longer than the rewritten URI, and anything in your config reads `$request_filename` during that window (`add_header`, `set`, `return`, `if`, or your access `log_format`), NGINX calculates the file path length wrong and overflows a heap buffer in the worker process.

### CVE-2026-93479: The Botched July Patch (map + root / log\_format)

Matt Suiche (Tolmo Inc.) and Mateusz Gierblinski found this heap overflow inside `src/http/ngx_http_script.c` and `src/stream/ngx_stream_script.c`.

Back on July 15, 2026, NGINX shipped a patch for `CVE-2026-42533`, another 9.2-rated heap overflow involving regex `map` captures. That July patch added a check to stop buffer overruns, except data could still spill into a reserved memory area, and a second part of the July patch used that spilled length to size the final string. If your `root` directive or `log_format` uses regex capture variables from a `map` before referencing the `map`'s output variable, a crafted request overflows the worker heap. Even if you updated to 1.30.4 or 1.31.3 in July, you were still inside the vulnerable range.

### CVE-2026-97205: Counting to 256 in an 8-Bit Field (`aio` \+ `ssi`)

This use-after-free bug (reported by `cyberlancer`) dates all the way back to NGINX 0.8.11\. NGINX tracks pending asynchronous file I/O operations on a request using an 8-bit integer with no overflow check.

An 8-bit unsigned counter maxes out at 255\. If you have `aio` enabled and serve an SSI page with `include virtual` commands (which fire subrequests in parallel), hitting 256 pending operations wraps that counter right back to `0`. NGINX thinks all operations are done and frees the request memory while background AIO threads are still writing to it.

### CVE-2026-97629: Uninitialized TLS Session Ticket Key Slot

PhiNode Labs reported this one, and it hits every version since `1.23.2` (October 2022). When you set `ssl_session_cache shared:SSL:10m;` without manually managing key files via `ssl_session_ticket_key`, NGINX automatically generates and rotates TLS session ticket keys in shared memory.

Each worker process keeps a copy of three key slots. The bug in `src/event/ngx_event_openssl.c` was simple: during key rotation, NGINX only synced two of the three slots to the worker process. The third slot held whatever garbage was already sitting in memory. If a client sent a session ticket pointing to that third slot, NGINX decrypted and verified it using uninitialized memory. F5 says the forgery is non-deterministic and outside the attacker's control, but if it hits, an attacker can forge a resumed TLS session and bypass client certificate verification (`ssl_verify_client`).

### CVE-2026-95101: HTTP/3 Parser Doing Two Jobs with One Variable

If you aren't running HTTP/3 yet, you can skip this one. Hansol Lee at GOTROOT found a flaw in `ngx_http_v3_module` affecting versions `1.25.0` through `1.31.6`. In `src/http/v3/ngx_http_v3_parse.c`, one internal struct field was being used for two different things: tracking how many bytes were left to skip in an unknown HTTP/3 frame, and counting how many `DATA` bytes to pass along as the request body.

If a client sent an unknown HTTP/3 frame split across two network reads while `proxy_request_buffering on` was active (which is on by default), the leftover skipped-frame byte count got treated as request body bytes. That lets a client smuggle extra bytes into a proxied backend request or blow past `client_max_body_size`.

## Other October Updates Worth Knowing About

A few related updates dropped right alongside or right after 1.30.6 and 1.31.7:

**`njs` 1.0.2 (Oct 14):** If you use the NGINX JavaScript module (`ngx_http_js_module`), NGINX released `njs 1.0.2` the same day to fix two medium-severity XML-handling bugs (**CVE-2026-101025** and **CVE-2026-101019**).

**F5 Enterprise Products (Oct 15 to 19):** F5 pushed out-of-band advisories (`K000163408`, `K000162416`, `K000162606`, `K000162607`, `K000162608`) for NGINX Plus, NGINX Ingress Controller, NGINX Gateway Fabric, and NGINX Instance Manager.

**Community Kubernetes Ingress NGINX:** If you still run the community Kubernetes `ingress-nginx` controller (which went EOL in March 2026), a stock default setup isn't reachable by these five October CVEs. The build strips `alias` out completely (`00_drop-alias-root.patch`), sets `ssl-session-tickets` to `false`, doesn't enable `ssi on`, and doesn't open a UDP `quic` socket unless you manually turn on custom snippets. Your vulnerability scanner will still scream about the image version, though.

**Quieter SSL Logs & Crash Fixes in 1.30.6 / 1.31.7:** Check the [1.30 changelog](https://nginx.org/en/CHANGES-1.30?ref=trendboxgeek.com) and [mainline changelog](http://nginx.org/en/CHANGES?ref=trendboxgeek.com) and you'll notice NGINX finally lowered `"invalid alert"`, `"record layer failure"`, and `"SSL alert number N"` log messages from `crit` to `info`. If internet scanners were filling up your `error.log` with fake critical alerts, this update cleans that up. Both releases also fix worker segfaults with cached `X-Accel-Redirect` headers and WebDAV `COPY`/`MOVE` inside `alias` locations. Mainline `1.31.7` also adds native MaxMind DB (`MMDB`) support to the GeoIP modules and RFC 9218 HTTP/2 prioritization.

**Mainline 1.31.8 (Oct 21):** Dropped a week later with **no security fixes**, just bugfixes for an HTTP/3 `SIGBUS` crash on strict-alignment CPUs, fake `recv() failed (5: Input/output error)` log alerts when closing kernel TLS (kTLS) connections on OpenSSL 3.2.0+, and a startup crash when `working_directory` points to a bad path.

## Testing on Ubuntu 26.04 LTS: Is `1.28.3` Vulnerable or Already Patched?

Upstream `nginx.org` only patches the current stable (`1.30.x`) and mainline (`1.31.x`) branches. If you compiled `1.28.x` from source, upstream is never coming to save you.

But if you use Ubuntu or Debian's built-in APT packages, the version number in nginx -v will lie to you. Let's look at my Ubuntu 26.04 LTS (resolute) box:

lsb_release -ds && nginx -v 2>&1 && apt-cache policy nginx

**Output from my Ubuntu 26.04 LTS host:**

![Ubuntu version checked.](https://trendboxgeek.com/content/images/2026/11/Screenshot-From-2026-11-08-17-49-32.png)

If you only look at `nginx/1.28.3`, you'd think the box is wide open. Let's read the actual Debian/Ubuntu package changelog on disk:

sudo apt update && zcat /usr/share/doc/nginx/changelog.Debian.gz | head -n 35

**Here is the real output from `1.28.3-2ubuntu1.12`:**

![real output from 1.28.3-2ubuntu1.12.](https://trendboxgeek.com/content/images/2026/11/Screenshot-From-2026-11-08-17-50-42.png)

Canonical backported all five patches into `1.28.3-2ubuntu1.12` on October 24.

One thing I always check after an APT security update is whether the running NGINX master process actually loaded the new binary from disk, or if it's still running an old deleted binary in RAM because someone ran `systemctl reload nginx` instead of restarting:

systemctl status nginx --no-pager && sudo lsof -nP -p $(cat /run/nginx.pid 2>/dev/null) 2>/dev/null | grep -E "nginx|DEL"

**Output:**

nginx 3763 root  txt    REG  252,0 1603320 666018 /usr/sbin/nginx
nginx 3763 root  DEL    REG    0,1           1063 /dev/zero

Look at the `/usr/sbin/nginx` line. Its type is `txt REG`, not `DEL`. That confirms the running process is using the patched binary on disk.

## Auditing Your Config with `nginx -T` 

If you manage dozens of vhosts and can't upgrade right away, you can dump the entire merged NGINX config with `sudo nginx -T` and grep for the five triggers.

Since my stock `boxgeek` config was clean, I created a dummy test file at `/etc/nginx/conf.d/cve-audit-test.conf` with a regex `map` inside `root`, `ssl_session_cache shared:SSL:10m;`, and a `location` block mixing `alias`, `rewrite`, and `$request_filename`:

sudo tee /etc/nginx/conf.d/cve-audit-test.conf >/dev/null <<'EOF'
map $uri $mapped_tenant {
    ~^/app/(?'tenant'[^/]+) $tenant;
    default "public";
}

server {
    listen 8088;
    server_name localhost;
    root /var/www/$tenant;
    ssl_session_cache shared:SSL:10m;

    location /files/ {
        alias /var/www/static/;
        rewrite ^/files/(.*)\.html$ /files/$1.txt break;
        add_header X-Resolved-File $request_filename;
    }
}
EOF

Watch what happens if you run `grep -E` using **double quotes** vs **single quotes**:

sudo nginx -T 2>/dev/null | grep -E -n "alias\b|rewrite\b|\$request_filename|map\b|aio\b|ssi\b|quic\b|ssl_session_cache|ssl_session_ticket"

**Output:**

137:map $uri $mapped_tenant {
146:    ssl_session_cache shared:SSL:10m;
149:        alias /var/www/static/;
150:        rewrite ^/files/(.*)\.html$ /files/$1.txt break;

Notice how line 151 (`add_header X-Resolved-File $request_filename;`) didn't show up at all? Inside double quotes, Bash turns `\$request_filename` into literal `$request_filename` before passing it to `grep -E`, and `grep` treats `$` as an end-of-line anchor.

Wrap the pattern in **single quotes** so `grep` actually escapes the dollar sign:

sudo nginx -T 2>/dev/null | grep -E -n 'alias\b|rewrite\b|\$request_filename|map\b|aio\b|ssi\b|quic\b|ssl_session_cache|ssl_session_ticket' && sudo rm -f /etc/nginx/conf.d/cve-audit-test.conf

**Output:**

137:map $uri $mapped_tenant {
146:    ssl_session_cache shared:SSL:10m;
149:        alias /var/www/static/;
150:        rewrite ^/files/(.*)\.html$ /files/$1.txt break;
151:        add_header X-Resolved-File $request_filename;

Now it catches all five lines cleanly.

If you can't restart or upgrade a production box today and find any of these combinations in your dump, here are the temporary config mitigations:

# Stop CVE-2026-97629 (TLS session forgery) if you use ssl_session_cache shared:... without a key file:
ssl_session_tickets off;

# Stop CVE-2026-95101 (HTTP/3 body injection) on quic listeners:
proxy_request_buffering off;

# Stop CVE-2026-97205 (AIO + SSI UAF):
aio off;
ssi off;

For **CVE-2026-15176**, don't mix `alias` with `rewrite` in the same location, or stop referencing `$request_filename`. For **CVE-2026-93479**, only use named captures inside the `map` block itself and don't reference them in `root` or `log_format` before the mapped variable.

## Upgrading Ubuntu 26.04 to Official Upstream NGINX 1.30.6 or 1.31.7 / 1.31.8

Even though Ubuntu backports security patches into `1.28.3-2ubuntu1.12`, I usually prefer running the official `nginx.org` packages on my own boxes to get current stable (`1.30.6`) or mainline (`1.31.8`) features directly from upstream.

If you switch an existing Ubuntu server over to `nginx.org`, watch out for two gotchas I hit during testing on `boxgeek`:

1. **Removing `nginx-common` overwrites `/etc/nginx/nginx.conf`:** Ubuntu splits `/etc/nginx/nginx.conf` into the `nginx-common` package, whereas `nginx.org` bundles everything into a single `nginx` package. When `apt` removes `nginx-common` to install upstream `nginx`, `dpkg` replaces `/etc/nginx/nginx.conf` with upstream's config (which only includes `/etc/nginx/conf.d/*.conf` and drops `/etc/nginx/sites-enabled/*`), even if you pass `--force-confold`. Back up `/etc/nginx` before you touch anything.
2. **The service silently stops during the repo switch:** When `nginx-common` gets removed, `systemd` stops NGINX, and Ubuntu's `needrestart` hook still prints `"No services need to be restarted."` Your web server will sit dead until you run `sudo systemctl enable --now nginx`.

### Step 1: Back Up `/etc/nginx` and Pull the Signing Key

sudo cp -a /etc/nginx /etc/nginx.ubuntu-backup
sudo apt install -y curl gnupg2 ca-certificates lsb-release ubuntu-keyring
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg

### Step 2: Add the Official `nginx.org` Stable Repo (`1.30.6`) with APT Pinning

echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" | sudo tee /etc/apt/sources.list.d/nginx.list && printf "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx && sudo apt update && apt-cache policy nginx

**Output:**

![The Official nginx.org Stable Repo (1.30.6) with APT Pinning](https://trendboxgeek.com/content/images/2026/11/Screenshot-From-2026-11-08-17-53-07.png)

### Step 3: Install `1.30.6` and Start the Service Back Up

sudo apt-get -y install nginx
sudo nginx -t
sudo systemctl enable --now nginx && systemctl status nginx --no-pager && curl -sI http://127.0.0.1 | grep -i "^Server:"

**Output:**

![Nginx 1.30.6's status.](https://trendboxgeek.com/content/images/2026/11/Screenshot-From-2026-11-08-17-54-18.png)

If your virtual hosts live in `/etc/nginx/sites-enabled/`, copy your backed-up `/etc/nginx.ubuntu-backup/nginx.conf` back into place (or add `include /etc/nginx/sites-enabled/*;` into the `http {}` block of `/etc/nginx/nginx.conf`) and reload.

### Step 4: Or Jump Straight to Mainline `1.31.7` / `1.31.8`

If you want mainline instead of stable, point `/etc/apt/sources.list.d/nginx.list` at `packages/mainline/ubuntu`:

echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/ubuntu $(lsb_release -cs) nginx" | sudo tee /etc/apt/sources.list.d/nginx.list && sudo apt update

Once you are already on an `nginx.org` package, upgrading to `1.31.7` or `1.31.8` doesn't remove `nginx-common` anymore, so `needrestart` catches the binary update and restarts `nginx.service` for you automatically.

sudo apt-get -y install nginx && nginx -v 2>&1 && curl -sI http://127.0.0.1 | grep -i "^Server:"

**Output:**

![Nginx 1.31.8.](https://trendboxgeek.com/content/images/2026/11/Screenshot-From-2026-11-08-17-55-53.png)

If systemd prints that yellow unit-file warning after the upgrade, run sudo systemctl daemon-reload to clear it.

Sticking with Ubuntu's `1.28.3-2ubuntu1.12` package is fine for most servers, and moving to upstream `1.30.6` or `1.31.8` only takes a few minutes if you want the newer features. Just don't forget to check `lsof` after upgrading so you know your workers aren't still running the old binary in RAM.