nginx2root Chains Five nginx RCE Flaws With Linux Kernel Bug for Host Root Access

· Original article ↗

Summary

The nginx2root disclosure details five unauthenticated nginx RCE flaws and an unpatched-at-disclosure Linux SCTP use-after-free that can chain to host root. It explains vulnerable configurations, exploit mechanics, affected releases, fixes and mitigations.

Key points

  • The five nginx flaws—CVE-2026-123007, CVE-2026-123633, CVE-2026-121810, CVE-2026-123634 and CVE-2026-113425—allow unauthenticated command execution as the nginx worker when their respective features are enabled.
  • CVE-2026-123007 affects nginx releases 1.9.5 through 1.31.8 when HTTP/2 is enabled; the article describes an HTTP/2 flow-control accounting error leading to an out-of-bounds heap write.
  • The other nginx flaws involve use-after-free conditions in HTTP/2 connection handling, HTTP/3 streams, DNS resolution and the mail proxy.
  • The article explains how the nginx worker-level foothold can be chained with a Linux kernel SCTP use-after-free to gain host root, including from a Docker container; the kernel flaw was unpatched at disclosure.
  • F5 rates the five nginx flaws CVSS 4.0 9.2; CERT-EU lists CVSS 3.1 8.1 for each.
  • nginx Open Source 1.31.9 and 1.30.7 fix all five flaws; NGINX Plus fixes are listed in 37.0.8.1 and 37.3.0.1.
  • Mitigations include disabling affected protocols or restricting exposed services where patching is unavailable, and monitoring for processes spawned by nginx workers.

Article Details

Attack Vectors
  • Unauthenticated remote attackers can exploit any of five nginx memory-safety flaws; each requires only its associated feature or configuration, such as HTTP/2, HTTP/3, request-time DNS resolution, or mail proxying.
  • CVE-2026-123007 abuses HTTP/2 flow-control accounting to cause an out-of-bounds heap write, leak memory addresses, and execute commands as the nginx worker.
  • The four use-after-free flaws involve HTTP/2 connection handling, HTTP/3 stream handling, the DNS resolver, and the mail proxy; exploitation can disclose memory addresses and enable command execution as the worker.
  • An attacker who has code execution as the nginx worker can exploit a separate SCTP use-after-free or double-free in the Linux kernel to gain root access, including from a Docker container.
Defensive Notes
  • Upgrade nginx Open Source to 1.31.9 or 1.30.7. The article says NGINX Plus fixes covering all five flaws are in 37.0.8.1 and 37.3.0.1; versions 37.0.7.1 and 37.2.0.1 fix only CVE-2026-123633.
  • Restart nginx or perform a supported live binary upgrade after patching; a configuration reload alone does not replace the running executable. Check distribution advisories because fixes may be backported without changing the reported nginx version.
  • If patching is not immediately possible, disabling HTTP/2 blocks CVE-2026-123007 and CVE-2026-123633, but not the other three nginx flaws.
  • For CVE-2026-123634, use a fixed upstream group instead of a request-derived upstream name. For CVE-2026-121810, disable HTTP/3 and block UDP port 443 where appropriate.
  • Restrict mail-proxy listeners to loopback or trusted client IP addresses. Until a kernel fix exists, hosts that do not use SCTP can block its module from loading; this does not unload an already loaded module or disable SCTP built into the kernel.
  • Monitor program executions by the nginx worker account and correlate worker crashes with process-creation logs. Crashes alone may indicate exploitation attempts, not confirmed code execution.

MITRE ATT&CK

CVE

Vendors

Products

Related Articles