Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Where possible, detections are written to be fleet-policy compatible - known una
| Directory | What it detects |
|---|---|
| `CVE-2026-114938/` | JVMs exposed to the HotSpot x86-64 AVX-512 Base64 decode heap overwrite (CVE-2026-114938, JDK-8392044) |
| `nginx2root/` | nginx exposed to the five "nginx2root" bugs fixed in nginx 1.31.9 and 1.30.7 (CVE-2026-123007, CVE-2026-123633, CVE-2026-121810, CVE-2026-123634, CVE-2026-113425) |
348 changes: 348 additions & 0 deletions nginx2root/README.md

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions nginx2root/linux/ansible-nginx2root.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---

- name: nginx2root host detection
hosts: all
gather_facts: false
become: true
vars:
detect_script: "{{ playbook_dir }}/detect-nginx2root.sh"
detect_args: ""
fixed_pkgs: ""
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
environment:
NGINX2ROOT_FIXED_PKGS: "{{ fixed_pkgs }}"
register: detect
changed_when: false
failed_when: detect.rc not in [0, 1, 2]

- name: Derive this host's verdict from the exit code
ansible.builtin.set_fact:
nginx2root_verdict: "{{ 'impacted' if detect.rc == 1 else ('unknown' if detect.rc == 2 else 'not impacted') }}"

- 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:
pairs: >-
{{ ansible_play_hosts_all
| zip(ansible_play_hosts_all
| map('extract', hostvars, 'nginx2root_verdict')
| map('default', 'no result')
| list)
| list }}
ansible.builtin.debug:
msg:
- "nginx2root fleet detection (CVE-2026-123007, -123633, -121810, -123634, -113425)"
- "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