Two small, dependency-light Bash scripts to check whether an nginx host is exposed
to **NGINX2Root** — the set of five vulnerabilities fixed in the nginx security
release of **18 November 2026** (stable **1.30.7**, mainline **1.31.9**).
- **`nginx2root-surface.sh`** — *external*, non-exploitative. Run it from anywhere
against a host you are authorised to test. It reports what attack **surface** is
visible from outside (version header, HTTP/2, HTTP/3, mail ports).
- **`nginx2root-check.sh`** — *local*, read-only. Run it **on the host**. It reads
the installed binary version and the active config to tell you which CVEs your
build and configuration are actually exposed to.
Neither script sends exploit traffic or tries to trigger any bug. They report
**surface and configuration**, not confirmed exploitability.
> ⚠️ **Authorised use only.** Run these only against systems you own or have
> explicit written permission to test. Port scanning and probing third-party hosts
> without authorisation may be illegal in your jurisdiction.
| CVE | Component | First affected | Severity (nginx) | Mitigated by disabling HTTP/2? |
|-----|-----------|----------------|------------------|-------------------------------|
| CVE-2026-123007 | HTTP/2 flow-control memory corruption (RCE) | 1.9.5 | major | ✅ yes |
| CVE-2026-123633 | HTTP/2 use-after-free to upstream | 1.19.7 | medium | ✅ yes |
| CVE-2026-121810 | HTTP/3 (QUIC) use-after-free, proxied | 1.25.0 | medium | ❌ no |
| CVE-2026-123634 | resolver use-after-free (resolver + variable `proxy_pass` + `mirror`) | 0.6.18 | medium | ❌ no |
| CVE-2026-113425 | mail-proxy use-after-free (`auth_http`) | 0.5.33 | major | ❌ no |
**Fixed in:** nginx **1.30.7** (stable) and **1.31.9** (mainline). Distro packages
may carry a backport at a different version string — check your package changelog.
> Because the mail-proxy and resolver bugs reach back to very old releases,
> effectively every build before the fix is affected by *something*. Treat any
> unpatched nginx as vulnerable and upgrade.
- `bash`, `curl`, `grep`, `sort` (standard on Linux/macOS)
- `openssl` (optional, improves HTTP/2 ALPN detection in the surface scan)
- The host check uses `nginx -v` and `nginx -T`; run it with `sudo` so it can read
./nginx2root-surface.sh example.com example.org:8443
[EXPOSED] nginx 1.31.8 predates the NGINX2Root fix. Fixed: 1.30.7 (stable) / 1.31.9 (mainline).
[EXPOSED] HTTP/2 negotiated (ALPN h2) -> CVE-2026-123007 (core RCE) surface; -123633 if it proxies upstream.
[ OK ] No HTTP/3 (h3) advertised in Alt-Svc (may still be enabled without advertising).
[ OK ] No common mail-proxy ports reachable.
sudo ./nginx2root-check.sh /usr/local/nginx/sbin/nginx
- **`[EXPOSED]` / `[VULNERABLE]`** — the condition for that CVE's attack surface is
present. For the surface scan this means *visible from outside*, not *proven
- **`[WARN]`** — a partial match worth a manual look (e.g. mail ports are open, but
the scanner can't tell from outside whether nginx is the mail proxy behind them).
- **`[?]`** — the check couldn't run (version hidden by `server_tokens off`, a
fronting CDN/proxy, or missing `openssl`). Confirm on the host.
- **`[ OK ]`** — that specific surface/condition was not found.
A fronting CDN or reverse proxy can hide the real origin version and still answer on
HTTP/2 — the surface scan sees the edge, not necessarily your nginx. Always confirm
[`lab/`](lab/) contains a Docker lab that verifies the scanner against the **real
nginx images released on 18 Nov 2026** — a vulnerable 1.31.8 to the patched
1.31.9 — plus a Docker-free unit test of the fix boundary:
./run-lab-test.sh # version matrix + surface scan + on-host check, with asserts
It is a **detection** lab: stock official images, no exploit code, no exploit
traffic. See [lab/README.md](lab/README.md).
1. **Upgrade** to nginx ≥ 1.31.9 (mainline) or ≥ 1.30.7 (stable), or your distro's
2. **Restart** nginx — a `reload` reuses the running binary and does **not** swap in
- `http2 on;` off (or remove the `http2` listen flag) → blocks CVE-2026-123007
- `http3 off;` / remove `quic` listeners → reduces CVE-2026-121810.
- Bind mail listeners to loopback/trusted networks → reduces CVE-2026-113425.
- The resolver bug (CVE-2026-123634) has no protocol toggle; review `resolver` +
- nginx November 2026 security release (1.30.7 / 1.31.9)
- F5 / nginx security advisories for the individual CVE records
- Independent write-ups: Wiz, Infosecurity Magazine, The Hacker News
These scripts have only been tested against the Docker lab in this repository, not
against production systems. Use them at your own risk. They are provided "as is",
without any warranty; the author accepts no liability for any damage or
consequences resulting from their use. Only run them against systems you own or are
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
