Skip to content

NGINX2Root protection: exposure, crash, RCE, SCTP & HTTP/2 spray detection - #36

Merged
vsilent merged 4 commits into
mainfrom
feat/nginx2root-protection
Nov 19, 2026
Merged

vsilent merged 4 commits into
mainfrom
feat/nginx2root-protection

Conversation

@vsilent

@vsilent vsilent commented Nov 19, 2026

Copy link
Copy Markdown

Summary

Adds detection for NGINX2Root — the five nginx memory-corruption bugs (CVE-2026-123007 and four more) plus the unpatched Linux kernel SCTP escalation to root, disclosed 2026-11-18 — and ships the stackdog.app blog post and a user announcement about it.

Stackdog detects and responds, it does not patch; upgrading nginx to 1.30.7 / 1.31.9 and restarting (a reload is not enough) is the fix.

What's included

Detection (host + running containers):

Detector Fires on
vuln.nginx2root nginx builds older than the fixes whose config reaches a specific CVE (HTTP/2, HTTP/3, mail proxy, proxy_pass + SSI/mirror) — names the CVE + the exact mitigation
nginx.worker-crash a run of nginx workers dying on memory faults (SIGSEGV …) — the heap-grooming tell
web.worker-exec a web-server worker executed a program — the RCE end state
kernel.sctp-socket a web worker / container opened an SCTP socket — the escalation step
kernel.sctp-exposed the Linux sctp module is loaded — the unpatched kernel step is reachable
nginx.http2-spray a workload moved lots of inbound bytes while logging few/no requests — the spray footprint (heuristic)

eBPF: now traces socket() so SCTP creation is captured alongside execve/connect/openat/ptrace (userspace parse + SyscallDetails::Socket).

Website: long-form post /nginx2root ("CVE-2026-123007: NGINX2Root and How to Protect Your Servers and Containers"), wired into the sitemap + footer.

Docs: README + CHANGELOG coverage, .env.sample toggles (STACKDOG_NGINX2ROOT_ENABLED, STACKDOG_KERNEL_SCTP_ENABLED), and docs/nginx2root-user-announcement.md (trydirect/nginx update + Stackdog install for PHP2Shell & wider CVE coverage).

Test plan

  • cargo fmt --check clean, cargo clippy --all-targets clean (in touched code)
  • cargo test — 657 pass (494 lib incl. new detector/parsing tests, 8 main, 155 integration)
  • Blog page parses clean (esbuild); matches sibling article conventions

Notes / caveats

  • The eBPF kernel code (trace_socket) mirrors trace_connect line-for-line but can't be compiled on macOS (no bpf-linker); it builds on Linux/CI. The userspace parsing + detector are tested here.
  • web.worker-exec / kernel.sctp-socket consume eBPF syscall events, which the serve runtime does not yet start (a pre-existing gap affecting all syscall detection). nginx.http2-spray is a workload-level heuristic (Docker byte counters + log counts), not per-connection telemetry.
  • None of these detectors name a client address, so none of them ban.

House style: em dashes out of marketing copy, replaced by commas, colons
and sentence breaks. Titles use a pipe separator.
…ay detection

Detect the five NGINX2Root nginx bugs (CVE-2026-123007 and four more) plus the
kernel step of the chain, on the host and in running containers:

- vuln.nginx2root: flag nginx builds older than 1.30.7/1.31.9 whose config
  reaches a specific CVE (HTTP/2, HTTP/3, mail proxy, proxy_pass + SSI/mirror),
  naming the CVE and its mitigation. Reads NGINX_VERSION from official images
  and the package databases, following nginx's two version tracks.
- nginx.worker-crash: alert on a run of nginx workers dying on memory faults.
- web.worker-exec: alert when a web-server worker executes a program (RCE).
- kernel.sctp-socket / kernel.sctp-exposed: alert on SCTP socket creation and a
  loaded SCTP module -- the unpatched root-escalation step.
- nginx.http2-spray: workload heuristic for the heap-spray footprint (inbound
  bytes up while logged requests stay flat), from Docker stats + log counts.

The eBPF collector now traces socket() so SCTP creation is captured alongside
execve/connect/openat/ptrace. None of these name a client address, so none ban.
Document the NGINX2Root detectors (exposure, crash, RCE, SCTP, HTTP/2 spray)
and their honest limits, add the STACKDOG_NGINX2ROOT_ENABLED and
STACKDOG_KERNEL_SCTP_ENABLED toggles to .env.sample, and add a ready-to-send
announcement telling users to update the trydirect/nginx image (restart, not
reload) and install Stackdog for PHP2Shell and wider CVE coverage.
Add a long-form article, "CVE-2026-123007: NGINX2Root and How to Protect Your
Servers and Containers", covering the five CVEs and the kernel bug, the fixed
releases, why a reload is not enough, the IOCs, the interim mitigations, and how
Stackdog detects each step. Wired into the sitemap and the footer Explore list.
@vsilent
vsilent merged commit ca005b6 into main Nov 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants