Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/nginx-http2-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: nginx (CVE-2026-123007, CVE-2026-123633, CVE-2026-123634) bash detector
name: nginx (CVE-2026-123007, CVE-2026-123633, CVE-2026-123634, CVE-2026-121810, CVE-2026-113425) bash detector

on:
push:
Expand Down Expand Up @@ -37,6 +37,7 @@ jobs:
run: >-
shellcheck -S warning
"$DIR/detect-nginx-http2.sh" "$DIR/ssh-nginx-http2.sh"
"$DIR/k8s-exec-nginx-http2.sh"
"$DIR/tests/run-tests.sh" "$DIR/tests/fake-nginx"

test-linux:
Expand Down
143 changes: 113 additions & 30 deletions CVE-2026-123633.CVE-2026-123007/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CVE-2026-123007, CVE-2026-123633 and CVE-2026-123634 (nginx) detection
# CVE-2026-123007, CVE-2026-123633, CVE-2026-123634, CVE-2026-121810 and CVE-2026-113425 (nginx) detection

Fleet checks for three nginx worker memory-corruption bugs that were fixed
Fleet checks for five nginx worker memory-corruption bugs that were fixed
together in nginx 1.30.7 and 1.31.9 on 2026-11-18. Each one is reached
through a feature the config has to turn on:

Expand All @@ -9,6 +9,8 @@ through a feature the config has to turn on:
| CVE-2026-123007 | Memory corruption in HTTP/2 flow control | major | HTTP/2 | 1.9.5-1.31.8 | 1.30.7+, 1.31.9+ |
| CVE-2026-123633 | Use-after-free in HTTP/2 | medium | HTTP/2 | 1.19.7-1.31.8 | 1.30.7+, 1.31.9+ |
| CVE-2026-123634 | Use-after-free during response processing in resolver | medium | `resolver` | 0.6.18-1.31.8 | 1.30.7+, 1.31.9+ |
| CVE-2026-121810 | Use-after-free in HTTP/3 | medium | HTTP/3 (QUIC) | 1.25.0-1.31.8 | 1.30.7+, 1.31.9+ |
| CVE-2026-113425 | Use-after-free in mail proxy module | major | mail proxy | 0.5.33-1.31.8 | 1.30.7+, 1.31.9+ |

**The HTTP/2 pair.** Wiz rates both CVSS 4.0 9.2 and shows remote code
execution in a worker process.
Expand All @@ -24,21 +26,33 @@ freeing it. The stated impact is a segmentation fault in a worker process,
"or might have potential other impact". Turning HTTP/2 off does nothing for
this one; it needs an upgrade.

The same releases fix seven other CVEs, including CVE-2026-121810, a similar
use-after-free in HTTP/3. These scripts check only the three CVEs above; see
the nginx.org advisories page for the others.
**HTTP/3 and the mail proxy.** Neither is in the Wiz write-up; both are in
Xint's.
- CVE-2026-121810 is the HTTP/3 counterpart of CVE-2026-123633. The nginx
changelog says a "use-after-free might occur in a worker process when
using HTTP/3 if worker_connections were not enough".
- CVE-2026-113425 is a "use-after-free [that] might occur in a worker
process in the mail proxy server". It is reached during login, before any
credentials are checked.

Turning HTTP/2 off does nothing for these two either.

The same releases fix five other CVEs. These scripts check only the five
above; see the nginx.org advisories page for the others.

## Directory contents

`linux/` holds bash scripts for Linux and macOS hosts.

| File | Purpose |
|---|---|
| `linux/detect-nginx-http2.sh` | Host detector (bash 3.2+). The name predates CVE-2026-123634; it checks all three CVEs. |
| `linux/detect-nginx-http2.sh` | Host detector (bash 3.2+). The name predates the CVEs outside HTTP/2; it checks all five. |
| `linux/ssh-nginx-http2.sh` | Fleet run over plain SSH |
| `linux/ansible-nginx-http2.yml` | Fleet run through Ansible |
| `linux/k8s-nginx-http2.yaml` | Fleet run as a privileged Kubernetes DaemonSet |
| `linux/k8s-exec-nginx-http2.sh` | Fleet run with `kubectl exec` into each container |

The SSH wrapper finds the detector next to itself, so keep the files
The wrappers find the detector next to themselves, so keep the files
together. `linux/tests/` holds the maintainers' test harness. It is not needed
to run any script.

Expand All @@ -49,15 +63,16 @@ show `[!]`. An nginx is impacted when at least one CVE applies, and the
result line lists the CVEs that do (`=> [!] impacted: CVE-2026-123634`).

1. **version**: `nginx -V` reports a version that has at least one of the bugs.
- nginx open source: from 0.6.18 (CVE-2026-123634), 1.9.5
(CVE-2026-123007) or 1.19.7 (CVE-2026-123633), through 1.31.8. 1.30.7
and later 1.30.x releases are fixed.
- nginx open source: from 0.5.33 (CVE-2026-113425), 0.6.18
(CVE-2026-123634), 1.9.5 (CVE-2026-123007), 1.19.7 (CVE-2026-123633)
or 1.25.0 (CVE-2026-121810), through 1.31.8. 1.30.7 and later 1.30.x
releases are fixed.
- NGINX Plus (read from `(nginx-plus-r...)` in the version string):
- R-series (R36 and earlier): affected; no R-series fix exists.
- PLS.37.0.x LTS: all three before 37.0.7; CVE-2026-123007 and
CVE-2026-123634 in 37.0.7; fixed from 37.0.8.
- PLS.37.x CR: all three in 37.1.x; CVE-2026-123007 and CVE-2026-123634
in 37.2.x; fixed from 37.3.0.
- PLS.37.0.x LTS: all five before 37.0.7; all but CVE-2026-123633 in
37.0.7; fixed from 37.0.8.
- PLS.37.x CR: all five in 37.1.x; all but CVE-2026-123633 in 37.2.x;
fixed from 37.3.0.
- 38 and later: not affected.
- OpenResty: judged on its nginx core (`openresty/1.27.1.2` → 1.27.1). A
fixed core is `OK`; an affected core is `[?]`, because OpenResty may ship
Expand Down Expand Up @@ -93,6 +108,14 @@ result line lists the CVEs that do (`=> [!] impacted: CVE-2026-123634`).
modules (`auth_request`, SSI, `mirror`, `slice`, `addition`, njs, Lua),
so the script does not try to rule them out: a configured resolver counts
as exposed.
- **http/3** (CVE-2026-121810): the binary was built with
`--with-http_v3_module`, and a `listen` directive in an http `server {}`
has the `quic` parameter. As with the HTTP/2 use-after-free, the script
does not try to tell whether `worker_connections` can run out: an
attacker fills them.
- **mail** (CVE-2026-113425): the binary was built with `--with-mail`
(or `--with-mail=dynamic`), and `mail {}` has at least one `server {}`.
Any protocol counts: IMAP, POP3 or SMTP.

The script reads the config files itself, starting at the master's `-c` file
(or the binary's built-in `--conf-path`) and following `include` directives,
Expand All @@ -109,24 +132,29 @@ edited them without reloading, the running config may differ.
## Output

```
nginx check: CVE-2026-123007, CVE-2026-123633 (HTTP/2) and CVE-2026-123634 (resolver)
nginx check: CVE-2026-123007, CVE-2026-123633 (HTTP/2), CVE-2026-123634 (resolver), CVE-2026-121810 (HTTP/3) and CVE-2026-113425 (mail proxy)
legend: [!] impacted | OK not impacted | [?] could not check | n/a not checked
checks: version, backport, then http/2 (CVE-2026-123007, CVE-2026-123633) or resolver (CVE-2026-123634).
checks: version, backport, then http/2 (CVE-2026-123007, CVE-2026-123633), resolver (CVE-2026-123634),
http/3 (CVE-2026-121810) or mail (CVE-2026-113425).
A CVE applies only if version, backport and its own check all show [!].
host: Linux x86_64

/usr/sbin/nginx (pid 812)
version: nginx/1.24.0 (Ubuntu): CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 [!]
backport: nginx 1.24.0-2ubuntu7.19 (dpkg), changelog does not list CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 [!]
version: nginx/1.24.0 (Ubuntu): CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 CVE-2026-113425 [!]
backport: nginx 1.24.0-2ubuntu7.19 (dpkg), changelog does not list CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 CVE-2026-113425 [!]
http/2: on, listen 443 ssl http2 (/etc/nginx/sites-enabled/default) [!]
resolver: not set (/etc/nginx/nginx.conf) OK
http/3: - n/a
mail: no mail server (/etc/nginx/nginx.conf) OK
=> [!] impacted: CVE-2026-123007 CVE-2026-123633

/usr/sbin/nginx (pid 40211, container web-6c9f7d8b5-x2x7q)
version: nginx/1.30.6: CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 [!]
version: nginx/1.30.6: CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 CVE-2026-121810 CVE-2026-113425 [!]
backport: nginx 1.30.6-1~trixie (dpkg), nginx.org package: fixed only by upgrading [!]
http/2: off (/etc/nginx/nginx.conf) OK
resolver: on, resolver 10.96.0.10 valid=10s (/etc/nginx/conf.d/default.conf) [!]
http/3: off (/etc/nginx/nginx.conf) OK
mail: no mail server (/etc/nginx/nginx.conf) OK
=> [!] impacted: CVE-2026-123634

impacted
Expand All @@ -139,7 +167,7 @@ Each nginx instance gets one block. Each check ends in one of four markers:
- `[?]`: could not check.
- `n/a`: not checked, because no open CVE depends on it. For example, the
feature checks are `n/a` once the version or the backport rules out every
CVE they gate.
CVE they gate, and `http/3` is `n/a` on a version older than 1.25.0.

The title line names the binary and where it came from:

Expand All @@ -149,8 +177,8 @@ The title line names the binary and where it came from:
is the pod name; in Docker it is the short container ID.
- `-n`: a binary passed on the command line.

The http/2 and resolver lines name the file and directive that turned the
feature on. `-q` prints only the verdict line.
The http/2, resolver, http/3 and mail lines name the file and directive that
turned the feature on. `-q` prints only the verdict line.

## Exit codes

Expand Down Expand Up @@ -195,8 +223,8 @@ as cloud load balancers or a CDN. Check those vendors' advisories.
### Kubernetes ingress

`ingress-nginx` controller pods run nginx with HTTP/2 enabled by default and
set `resolver` to the cluster DNS, so expect the detector to report all three
CVEs for them. The DaemonSet below checks them like any other container. The
set `resolver` to the cluster DNS, so expect the detector to report the HTTP/2
pair and the resolver CVE for them. The DaemonSet below checks them like any other container. The
`kubernetes/ingress-nginx` project ended maintenance in March 2026 and
releases no security fixes
([Kubernetes blog](https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/)).
Expand Down Expand Up @@ -232,8 +260,29 @@ the targets.
- The wrapper exits `1` if any host is impacted, else `2` if any host is
unknown or errored, else `0`.

### Ansible

`ansible-nginx-http2.yml` runs `detect-nginx-http2.sh` on every Linux/macOS
host in the inventory and collects each host's verdict on the control node.
No agent is installed; `ansible.builtin.script` copies the detector to a temp
path, runs it, and removes it.

```sh
ansible-playbook -i inventory linux/ansible-nginx-http2.yml
ansible-playbook -i inventory linux/ansible-nginx-http2.yml -e detect_args="--no-disk"
```

Each host's full detector output is saved to `./results/<host>.txt`, and a
per-verdict host list (`impacted` / `unknown` / `not impacted` / `no result`)
prints at the end. Exit codes `1` (impacted) and `2` (unknown) are verdicts
and do not fail the play; `3` (usage error) does. As in the SSH wrapper, a
verdict counts only when the detector's last line agrees with the exit code.
Run with `become` (the default here) for full coverage.

### Kubernetes

Two methods, both running this directory's own detector.

`k8s-nginx-http2.yaml` is a DaemonSet: one pod per node, with `hostPID` and
`privileged`, so the detector checks every nginx on the node, including those
in other pods (through its own `nsenter` path, as root). Nothing is copied
Expand All @@ -253,9 +302,28 @@ when you have your results. The base image installs `util-linux` (for
`nsenter`) at start; for air-gapped clusters, bake bash + util-linux + the
script into your own image.

`k8s-exec-nginx-http2.sh` is for clusters that forbid privileged pods. It
`kubectl exec`s the detector (piped over stdin) into every running container.
It needs only list and exec rights.

```sh
sh linux/k8s-exec-nginx-http2.sh > results.txt # all namespaces
sh linux/k8s-exec-nginx-http2.sh -n ingress > results.txt # one namespace
DETECT_ARGS="--no-disk" sh linux/k8s-exec-nginx-http2.sh # running masters only
```

It prints one line for each container that is not impacted and the detector's
full output for the rest, then a roll-up, and exits `1` / `2` / `0` like the
SSH wrapper. Two limits, both covered by the DaemonSet:
- Containers without bash (distroless, some Alpine images) are reported
unknown.
- The detector runs as the container's own user. Where that is not root and
the nginx master is, the master cannot be read and the container is
unknown.

## Remediation

1. **Upgrade.** This is the only fix that covers all three CVEs.
1. **Upgrade.** This is the only fix that covers all five CVEs.
- Install nginx 1.30.7 / 1.31.9 or later, NGINX Plus PLS.37.0.8.1 LTS /
PLS.37.3.0.1 CR, or your distribution's patched package.
- Then make sure the old master is gone: a binary upgrade or a restart.
Expand All @@ -282,6 +350,14 @@ script into your own image.

Without a resolver, those fail. In most setups that use a resolver,
upgrading is the practical fix.
4. **Until you can upgrade, CVE-2026-121810:** turn HTTP/3 off. Remove the
`quic` listeners (`listen ... quic`), stop advertising HTTP/3 in
`Alt-Svc`, and reload. Clients fall back to HTTP/2 or HTTP/1.1 over TCP.
Re-run the detector: the http/3 line names any listener it still finds.
5. **Until you can upgrade, CVE-2026-113425:** keep untrusted clients away
from the mail proxy. Bind its listeners to loopback if nothing remote
needs them, or restrict them with a firewall to the addresses you trust.
The bug is reached before authentication, so credentials do not help.

## Sources

Expand All @@ -293,18 +369,25 @@ script into your own image.
1.30.7+".
- CVE-2026-123634: "Vulnerable: 0.6.18-1.31.8. Not vulnerable: 1.31.9+,
1.30.7+".
- CVE-2026-121810: "Vulnerable: 1.25.0-1.31.8. Not vulnerable: 1.31.9+,
1.30.7+".
- CVE-2026-113425: "Vulnerable: 0.5.33-1.31.8. Not vulnerable: 1.31.9+,
1.30.7+".
- Changelogs: `CHANGES` for 1.31.9 and `CHANGES-1.30` for 1.30.7, both dated
18 Nov 2026.
- F5 advisories: K000163926 (CVE-2026-123007), K000163928 (CVE-2026-123633)
and K000163925 (CVE-2026-123634).
- F5 advisories: K000163926 (CVE-2026-123007), K000163928 (CVE-2026-123633),
K000163925 (CVE-2026-123634), K000163927 (CVE-2026-121810) and K000163931
(CVE-2026-113425).
- NGINX Plus fix versions: the release notes at
<https://docs.nginx.com/nginx/releases/>. CVE-2026-123634 is listed under
PLS.37.0.8.1 LTS and PLS.37.3.0.1 CR.
<https://docs.nginx.com/nginx/releases/>. CVE-2026-123634, CVE-2026-121810
and CVE-2026-113425 are listed under PLS.37.0.8.1 LTS and PLS.37.3.0.1 CR.
- `resolver` contexts: the `ngx_http_core_module` and
`ngx_http_upstream_module` docs on nginx.org.
- Wiz Research write-up (HTTP/2 CVEs only):
<https://www.wiz.io/blog/nginx-http2-rce-vulnerabilities>.
- Xint write-up (all five, including HTTP/3 and the mail proxy):
<https://xint.io/blog/nginx2root-remote-code-execution>.

As of 2026-11-18, no Debian, Ubuntu or AlmaLinux package changelog listed any
of the three CVEs. When vendors ship fixes, the backport check picks them up
of the five CVEs. When vendors ship fixes, the backport check picks them up
with no script change.
94 changes: 94 additions & 0 deletions CVE-2026-123633.CVE-2026-123007/linux/ansible-nginx-http2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
# ansible-nginx-http2.yml
#
# Run the nginx (CVE-2026-123007, CVE-2026-123633, CVE-2026-123634,
# CVE-2026-121810, CVE-2026-113425) host detector on every Linux/macOS host in
# the inventory and collect each host's verdict on the control node.
#
# Self-contained: it drives this directory's own detect-nginx-http2.sh and
# nothing else. No agent is installed on the targets. ansible.builtin.script
# copies the detector to a temp path, runs it, and removes it. The detector is
# read-only: it runs "nginx -V" and reads config and package files.
#
# Usage:
# ansible-playbook -i inventory ansible-nginx-http2.yml
# ansible-playbook -i inventory ansible-nginx-http2.yml -e detect_args="--no-disk"
#
# Exit-code contract (from the detector; this is the fleet signal):
# 0 not impacted 1 impacted 2 unknown 3 usage error
# Codes 1 and 2 are verdicts, not failures, so they do not fail the play; 3 does.
# A verdict counts only when the detector's last line agrees with the exit
# code, so a failure that also exits 1 is not read as "impacted".
#
# Output:
# - each host's full detector output is saved to ./results/<host>.txt
# - a per-verdict host summary prints at the end
#
# Run as root (become) for full coverage of master processes, containers and
# root-only config files, matching the detector's own guidance.

- name: nginx CVE-2026-123007/123633/123634/121810/113425 host detection
hosts: all
gather_facts: false
become: true
vars:
detect_script: "{{ playbook_dir }}/detect-nginx-http2.sh"
detect_args: ""
results_dir: "{{ playbook_dir }}/results"

tasks:
- name: Run the detector (copied, run, and removed by Ansible; nothing installed)
ansible.builtin.script: "{{ detect_script }} {{ detect_args }}"
args:
executable: bash
register: detect
changed_when: false
failed_when: detect.rc not in [0, 1, 2]

- name: Derive this host's verdict from the exit code and the last output line
vars:
by_rc: "{{ 'impacted' if detect.rc == 1 else ('unknown' if detect.rc == 2 else 'not impacted') }}"
last_line: "{{ detect.stdout_lines | map('trim') | select | list | last | default('') }}"
ansible.builtin.set_fact:
nginx_cve_verdict: "{{ by_rc if last_line == by_rc else 'no result' }}"

- name: Create the results folder on the control node
ansible.builtin.file:
path: "{{ results_dir }}"
state: directory
mode: "0755"
delegate_to: localhost
become: false
run_once: true

- name: Save this host's detector output on the control node
ansible.builtin.copy:
content: "{{ detect.stdout }}"
dest: "{{ results_dir }}/{{ inventory_hostname }}.txt"
mode: "0644"
delegate_to: localhost
become: false
changed_when: false

- name: Print the fleet summary
run_once: true
delegate_to: localhost
become: false
vars:
# [host, verdict] pairs. Hosts that failed or were unreachable have no
# fact set, so extract yields Undefined, mapped to "no result".
pairs: >-
{{ ansible_play_hosts_all
| zip(ansible_play_hosts_all
| map('extract', hostvars, 'nginx_cve_verdict')
| map('default', 'no result')
| list)
| list }}
ansible.builtin.debug:
msg:
- "nginx CVE-2026-123007/123633/123634/121810/113425 fleet detection"
- "impacted: {{ pairs | selectattr('1', 'equalto', 'impacted') | map(attribute='0') | list }}"
- "unknown: {{ pairs | selectattr('1', 'equalto', 'unknown') | map(attribute='0') | list }}"
- "not impacted: {{ pairs | selectattr('1', 'equalto', 'not impacted') | map(attribute='0') | list }}"
- "no result: {{ pairs | selectattr('1', 'equalto', 'no result') | map(attribute='0') | list }}"
- "per-host output saved under {{ results_dir }}/"
Loading
Loading