psf-nginx2root-check(8)

Script: /opt/psf-security-patches/nginx/nginx2root-check.sh. Tool page: nginx. Source. With the package installed: man psf-nginx2root-check.

nginx2root: five nginx HTTP/2, HTTP/3, resolver and mail-proxy flaws  (v1)
CVE-2026-123007 CVE-2026-123633 CVE-2026-123634 CVE-2026-121810 CVE-2026-113425

If this software is helpful, consider a donation to our 501c3 nonprofit:
https://privacysafe.foundation

nginx 1.30.7 (stable) and 1.31.9 (mainline), released 18 November 2026, fix
five flaws that F5 and nginx both rate 9.2 (CVSS 4.0) critical. Two were
independently found by five separate teams (Wiz Research, Xint, Metnir,
Rapid7 and Ikotas Labs, who also call it NGINX2Shell; it is the same two
bugs, not a sixth): CVE-2026-123007, an HTTP/2 flow-control integer
underflow exploitable even on a plain static-file server with no backend,
and CVE-2026-123633, a use-after-free reachable when HTTP/2 is proxied to
an upstream and the worker is short of connection slots. Xint found three
more on its own as part of research it names nginx2root: CVE-2026-123634
(a resolver use-after-free, reachable through "mirror" plus a request-
derived proxy_pass target), CVE-2026-121810 (the same shape of bug over
HTTP/3 instead of HTTP/2), and CVE-2026-113425 (a use-after-free in the
mail proxy's auth_http path). Xint also chained CVE-2026-123007 with an
undisclosed, unpatched, not-yet-CVE'd Linux kernel SCTP use-after-free to
get root on the host, including out of a Docker container; that kernel bug
is a different, newer issue from three already-fixed 2026 SCTP flaws in the kernel's own
advisory history, one of them nicknamed "SCTPhantom", and this
script cannot check for it, only help you block the module that carries it.

CVE-2026-123007 affects nginx 1.9.5 through 1.31.8 and needs nothing but
HTTP/2 turned on; it was present in every official release for more than a
decade. The other four each need a more specific setup, shown below. Rapid7
published a working proof of concept; it needs about 128 GB of HTTP/2
traffic over one connection and a glibc memcpy implementation chosen at
runtime on CPUs with AVX-512 (Xint's own writeup and demo instead walk
through a build that resolves to the AVX2 memcpy path; both are real,
CPU-dependent variants of the same bug, not a disagreement between them).

CVE | Needs, besides an unpatched version | First affected | http2/http3 off helps?
CVE-2026-123007 | HTTP/2 on, nothing else | 1.9.5 | yes
CVE-2026-123633 | HTTP/2 on, proxied to an upstream | 1.19.7 | yes
CVE-2026-123634 | resolver, a request-derived proxy_pass, and mirror | 0.6.18 | no
CVE-2026-121810 | HTTP/3 (quic) on, proxied to an upstream | 1.25.0 | no (http3 off helps)
CVE-2026-113425 | a mail block with "proxy on" and auth_http | 0.5.33 | no

"check" and "hunt" are read-only and change nothing. "check" reports the
nginx version (host and containers) and audits the running configuration
(nginx -T) for each flaw's trigger directives, the same approach and the
same caveat as our nginx-oct2026-check.sh: a match shows the ingredients
are present, not a guarantee, and matches are not confirmed to share a
server or location block. "hunt" looks for signs in the logs that match
what Xint's own write-up says an attack leaves: sustained one-way traffic,
requests that stay small while received bytes climb, and abnormal worker
exits. None of it can see the WINDOW_UPDATE and RST_STREAM frames the
attack itself sends: those are control frames, not logged requests, and
TLS hides them from a packet capture at the host. "mitigate" edits
nginx.conf for three of the five flaws (http2-off also covers the one
chained with the kernel bug), backs up every file it touches, and rolls
back automatically if nginx rejects the result. The fourth, the resolver
and mirror flaw, needs a fixed upstream address only you know, so "rules"
explains it instead of editing anything (as our wordpress-upgrade and
openssh-musl tools do for what they can't automate either). The kernel
flaw has its own mitigate option, since it is not an nginx.conf change.

Usage:
  ./nginx2root-check.sh [command] [options]

  check (default)  nginx version on the host and in containers, and a
                   configuration audit for the five flaws' trigger
                   directives. Root optional, but nginx -T usually needs
                   root to read the full config. Exit 0 = nothing exposed,
                   1 = a vulnerable nginx is present, 2 = something
                   couldn't be read.
  hunt             read-only: connection and log signals from Section 3.2
                   of Xint's write-up (long-lived connections with far more
                   received than sent, HTTP/2 requests whose logged length
                   stays small while bytes_received climbs, and abnormal
                   nginx worker exits in the logs). None of this proves an
                   attack; Xint's own guidance is to weigh several signs
                   together. Exit 0 = nothing found, 1 = a lead.
  mitigate [options]   (root) changes the host. With no option, applies
                   --http2-off, the single broadest fix (covers the two
                   multiply-discovered flaws and removes the path used to
                   reach host root in Xint's demo). Options:
                     --http2-off    CVE-2026-123007, CVE-2026-123633: sets
                                    "http2 off;" (nginx >= 1.25.1) or drops
                                    the http2 listen parameter (older),
                                    per F5's own workaround. Breaks anything
                                    that specifically needs HTTP/2, such as
                                    native gRPC.
                     --http3-off    CVE-2026-121810: removes "quic" listen
                                    parameters, sets "http3 off;", and
                                    clears any Alt-Svc header advertising
                                    HTTP/3.
                     --mail-loopback  CVE-2026-113425: binds every mail
                                    proxy listen directive to 127.0.0.1, so
                                    only this host can reach it. Only use
                                    this if the mail proxy does not need
                                    outside access; otherwise restrict it
                                    with a firewall instead and skip this.
                     --block-sctp   the undisclosed kernel flaw: adds
                                    "install sctp /bin/false" under
                                    /etc/modprobe.d/, so modprobe refuses to
                                    load the sctp module from now on. Does
                                    not unload a copy already loaded, and
                                    does nothing to a kernel with SCTP
                                    compiled in rather than as a module.
                                    Skip this on a host that uses SCTP.
                     --force        apply a chosen measure even if the
                                    audit does not report that flaw exposed
                     --dry-run, --reload   show only; graceful reload after
                   Every nginx.conf file is copied first and checked with
                   nginx -t before and after; if nginx rejects the result
                   the originals are put back at once. CVE-2026-123634 is
                   not automated: see "rules".
  rollback [--dry-run] [--reload]   put back every file mitigate changed,
                   nginx.conf and the modprobe.d drop-in alike.
  rules            prints the manual fix for CVE-2026-123634 (a fixed
                   upstream group instead of a request-derived proxy_pass
                   target) and the modprobe.d line "mitigate --block-sctp"
                   writes, for anyone who would rather add it by hand.
  version          print the script version.

Env overrides:
  NGINX_STABLE_FIXED=1.30.7     first fixed stable release
  NGINX_MAINLINE_FIXED=1.31.9   first fixed mainline release
  FIXED_BUILDS="1.24.0-2ubuntu7.99"   distro nginx builds known to carry a
                                 backported fix, space-separated full
                                 versions (checked for dpkg-owned nginx).
                                 As of 18 November 2026, no distro had
                                 shipped a backport yet: Debian's and
                                 Ubuntu's own trackers both still marked
                                 every supported release vulnerable.
  SCAN_CONTAINERS=1             1 = read nginx inside running containers
  STATE_DIR (default /var/lib/psf-security-patches/nginx2root) holds the
                                 backups and manifest, including the
                                 modprobe.d drop-in's own backup record
  NGINX_BIN, NGINX_MAIN_CONF, NGINX_CONF_FILES   for mitigate: the binary,
                                 a non-default main configuration file, and
                                 the files to edit
  NGINX_T=1                     1 = run "nginx -T" for the config audit
  HUNT_LOGS="/var/log/nginx/*.log"   extra log globs for hunt
  HUNT_ACCESS_LOG=/var/log/nginx/access.log   the access log hunt reads for
                                 per-request sizes, if it uses a custom path
  PSF_LOCK_WAIT    seconds a run that changes the host waits for another one
                    already changing it (default 30), then stops with exit
                    2; the lock is STATE_DIR/.lock

The Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.

The PrivacySafe Ecosystem

Shop at Ivy Cyber

Ivy Cyber offers PrivacySafe products and services in the USA and has partnerships with 3NSoft in Canada and Kuip Limited in the European Union. Enterprise services and consulting are available at ivycyber.com

PrivacySafe Foundation is a 501(c)(3) nonprofit public charity that supports the development of the PrivacySafe applications, along with the components they rely upon: 3NWeb protocols, filesystem, documentation, and reference implementations.

PrivacySafe Foundation

Donations to PrivacySafe Foundation support education, research, documentation, and public code. Purchases from Ivy Cyber support PrivacySafe products, services, hosting, and technical support. Together, we're building a better web.