Critical NGINX ‘NGINX2Root’ bugs let attackers hijack servers

NGINX under attack

Two critical NGINX vulnerabilities dubbed "nginx2root" allow unauthenticated attackers to execute code remotely on vulnerable web servers, with researchers demonstrating how the flaws can be chained with a Linux kernel bug to gain root access.

The two HTTP/2 vulnerabilities were discovered independently by researchers at Xint, Wiz, Ikotas Labs, Metnir, and Rapid7, while Xint also discovered three additional NGINX RCE flaws.

Censys later reproduced the underlying memory corruption conditions in four of the five flaws through lab testing, but did not achieve remote code execution.

image

The first of the two "nginx2root" flaws is CVE-2026-123007, a flow-control bug that can corrupt memory in an NGINX worker. It impacts all versions from 1.31.8 down to 1.9.5, released in 2015.

Wiz demonstrated unauthenticated remote code execution on a server hosting ordinary static files over HTTP/2 with TLS, while Xint demoed root access by chaining it with a separate Linux kernel flaw.

Xint says the separate vulnerability affects the Linux kernel's SCTP subsystem and can be used to escape an NGINX Docker container and gain root privileges on the underlying host.

The second flaw is CVE-2026-123633, a use-after-free problem that affects NGINX when it accepts HTTP/2 connections and proxies requests to a backend. It impacts all versions from 1.19.7 through 1.31.8.

When the worker runs low on connection slots, it can close an active connection and free memory that a request still uses. Wiz also demonstrated remote code execution via CVE-2026-123633, but the firm is not publicly releasing its proof-of-concept (PoC) exploits at this time.

The other three flaws the researchers discovered and F5 fixed are CVE-2026-121810, CVE-2026-123634, and CVE-2026-113425, all use-after-free vulnerabilities affecting HTTP/3 reverse proxying, DNS resolution with subrequests, and mail proxy authentication, respectively.

The flaws were fixed in NGINX Open Source 1.30.7 stable and 1.31.9 mainline. NGINX Plus users should update to versions 37.0.8.1 or 37.3.0.1.

F5’s latest security update also addresses five more vulnerabilities not highlighted in the Wiz or Xint reports.

The most notable is CVE-2026-118899, a high-severity issue that allows an unauthenticated attacker to cause a worker to enter an infinite loop while reading a request body over TLS 1.3, resulting in denial of service.

For system administrators, it is recommended to upgrade immediately to the latest NGINX release, or temporarily disable HTTP/2 until an upgrade is possible. However, this mitigation only covers the two "nginx2root" flaws.

Evaluating the risk

Regarding the real exploitability risk of "nginx2root," security researcher Florian Roth says it's worse than Node2Shell and Java2Shell, but doesn’t appear to be an imminent threat for most NGINX deployments.

Commenting on X, Roth said the flaws are exploitable in non-default configurations, warning that claims of widespread exposure based solely on NGINX version numbers are misleading.

Xint previously reported that 98.9% of NGINX hosts disclosing recognizable versions were running software within the affected range, but this does not account for whether HTTP/2 is enabled or security fixes have been backported.

The two HTTP/2 flaws require an unpatched server with HTTP/2 enabled on a listener an attacker can reach, while CVE-2026-123633 also requires NGINX to proxy requests to a backend.

Roth scanned a sample of a few hundred NGINX HTTPS endpoints from Shodan and found that roughly 66% of them support HTTP/2, but confirming actual exposure requires checking the server’s configuration and whether a fix has been backported.

According to Censys' live exposure tracker, approximately 8.8 million NGINX services were potentially exposed to CVE-2026-123007 as of November 19, based on affected version numbers and HTTP/2 support.

The company reports that more than 511,000 previously exposed services have already been patched or mitigated, while another 104 million NGINX services do not disclose their versions, making it difficult to determine whether they are affected.

Adaptive Security's AI agents analyze email intent, context, and behavior to uncover phishing, business email compromise, and invoice fraud.

See what's getting through with a 14-day read-only scan of Microsoft 365 or Google Workspace, with no MX changes.

Dive deeper

Free tools to verify and analyze what this article covers:

source: BleepingComputer