Decade-Old NGINX HTTP/2 Vulnerability Allows Code Execution Without Authentication
A vulnerability in NGINX‘s HTTP/2 support allows unauthenticated attackers to execute code on servers with HTTP/2 enabled. This flaw, identified as CVE-2026-123007 and referred to as nginx2root, has existed since version 1.9.5, released on September 22, 2015. Fixed versions 1.31.9 and 1.30.7 have been released.
F5, the company behind NGINX, reported that attackers can execute code in environments where Address Space Layout Randomization (ASLR) is disabled or can be bypassed. Security researchers from Wiz demonstrated the ability to bypass ASLR and execute code through this vulnerability. Researchers from Xint confirmed they could run code using only an accessible HTTP/2 port.
Code executed through this vulnerability operates with the permissions of an NGINX worker process. To gain root access, an additional privilege escalation method is necessary, according to the Computer Incident Response Center Luxembourg (CIRCL).
In tests by Xint, code running as a worker process was able to escalate privileges to root on the host by exploiting a bug in the Linux kernel’s SCTP code, even when NGINX was inside a Docker container.
As of now, neither F5 nor researchers have reported any active exploitation of this vulnerability. The Cybersecurity and Infrastructure Security Agency (CISA) has not listed it in its Known Exploited Vulnerabilities catalog as of November 18.
Publicly available proof-of-concept code for the vulnerability can be found on GitHub, but it is noted to be suitable only for demonstrating the attack against a freshly started Docker container on the same machine.
NGINX’s security advisories indicate that every open-source release from 1.9.5 through 1.31.8 is vulnerable, including version 1.31.8 from October 21, and the security releases from October 14, 1.31.7 and 1.30.6.
NGINX Plus is also affected, specifically in 37.x releases prior to the fixed builds and in versions R34 to R36, as stated in the vendor advisory.
The latest releases address four additional vulnerabilities that could lead to code execution under similar ASLR conditions, each scoring 9.2 out of 10 on the CVSS 4.0 scale.
Each vulnerability requires specific conditions to be exploited:
- CVE-2026-123007: HTTP/2 must be enabled.
- CVE-2026-123633: HTTP/2 must be enabled, with requests forwarded to a backend server while the worker is low on
worker_connections. - CVE-2026-123634: A proxied server name built from variables, plus a server-side include (SSI) or
mirrorsubrequest to a location that looks up the same name. - CVE-2026-121810: HTTP/3 must be enabled.
- CVE-2026-113425: NGINX must be used as a mail proxy.
Fixes and Workarounds
The recent releases address CVE-2026-123007 as follows:
- NGINX Open Source 1.31.0 to 1.31.8 (mainline): fixed in 1.31.9.
- NGINX Open Source 1.9.5 to 1.30.6: fixed in 1.30.7.
- NGINX Plus 37.1.0 to 37.2.0.1: fixed in 37.3.0.1.
- NGINX Plus 37.0.0 to 37.0.7.1: fixed in 37.0.8.1.
- NGINX Plus R34 to R36: no fix listed.
Versions 1.31.9 and 1.30.7 address all five vulnerabilities. For NGINX Plus, versions 37.3.0.1 and 37.0.8.1 fix four of the vulnerabilities, while the fix for CVE-2026-123633 was introduced in earlier builds 37.2.0.1 and 37.0.7.1.
After upgrading, it is necessary to fully restart NGINX or use its live binary upgrade, as a simple reload will leave the old executable running.
As of November 18, official Docker images for NGINX include tags for versions 1.31.9 and 1.30.7. However, Ubuntu and Debian had not yet released fixed packages.
Workarounds are available for only two of the five vulnerabilities. For CVE-2026-123634, it is recommended to avoid SSI and mirror directives. For CVE-2026-113425, limiting listeners to trusted networks is advised.
CIRCL’s guidance suggests disabling HTTP/2 as a temporary mitigation until an upgrade can be performed. This action blocks CVE-2026-123007 and CVE-2026-123633, but does not address the other three vulnerabilities.
For NGINX versions 1.25.1 and later, set http2 off; in each affected server block. For earlier versions, remove http2 from the listen directive. After making these changes, restart NGINX and rerun the openssl check.
Until the Linux kernel’s SCTP bug is resolved, it is recommended that hosts not using SCTP block its kernel module from loading.
For signs of an attack, CIRCL advises monitoring for unexpected NGINX worker behavior, long-lived HTTP/2 connections with heavy traffic, and unusual outbound connections or DNS lookups.
Rapid7’s analysis indicates that their version of the attack requires approximately 128 GB of HTTP/2 traffic, with the demonstration taking two and a half minutes.
Wiz conducted tests on official NGINX versions 1.31.7 and 1.31.8, while Xint’s attack was successful against test servers on AWS, GCP, and Azure.
Source: The Hacker News