NGINX2Root: Critical NGINX RCE Flaws Require Urgent Patching
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
A set of six vulnerabilities, collectively tracked as nginx2root, can allow unauthenticated attackers to execute arbitrary commands on vulnerable nginx servers. The most critical issue, CVE-2026-123007, enables remote code execution through HTTP/2. When chained with a Linux kernel zero-day affecting the SCTP subsystem, attackers can obtain root privileges on the host or escape Docker containers.
Investigation
Xint researchers uncovered five separate nginx vulnerabilities alongside one Linux kernel flaw. They demonstrated how manipulation of HTTP/2 control frames can trigger out-of-bounds writes, while use-after-free vulnerabilities in DNS resolution, HTTP/3, and mail proxying can also be exploited. Testing confirmed that these issues remain exploitable under concurrent normal traffic across major cloud environments.
Mitigation
The primary mitigation is to upgrade nginx to version 1.31.9 or another patched release. Temporary measures include disabling HTTP/2 for affected CVEs, removing request-time DNS lookups, and turning off HTTP/3 (QUIC). For the Linux kernel vulnerability, administrators should prevent the SCTP module from loading through appropriate modprobe configuration.
Response
Organizations should immediately review nginx versions and configurations for exposure through HTTP/2, HTTP/3, and mail proxy functionality. If patching cannot be completed immediately, apply the recommended configuration changes to disable vulnerable features. Monitor nginx worker processes for abnormal command execution and review TCP statistics for unusual inbound traffic patterns.
Attack Flow
We are still updating this part.
Detections
Client Sending Large Amount of Data (via zeek)
Scripted File was Created in Suspicious Webserver Directories [Linux] (via file_event)
Possible NGINX2Root (CVE-2026-123007 / CVE-2026-123633 / CVE-2026-123634) Exploitation Attempt – nginx Worker Process Crash (via error.log or syslog)
Possible Web Server or WebApp Exploitation [Linux] (via process_creation)
Suspicious Persistence Activity by Execution Of Shell Commands From Web Service Users And Groups (via auditd)
Detecting nginx Remote Code Execution Vulnerabilities from nginx2root [Webserver]
Simulation Execution
-
Attack Narrative & Commands: The attacker aims to achieve Remote Code Execution on the nginx webserver by chaining two vulnerabilities. First, they exploit CVE-2026-123007 to bypass certain security constraints, and subsequently leverage CVE-2026-123634 to execute arbitrary commands. The attacker’s goal is to establish a footprint on the server to facilitate lateral movement. To trigger the detection rule, the exploit payloads must be crafted such that the logging system (WAF or IDS) identifies the specific CVEs involved in the transaction.
-
Regression Test Script:
#!/bin/bash # Simulation script to trigger the Nginx RCE detection rule. # Note: This simulates the LOG ENTRY generation as we are testing the rule logic. echo "Simulating exploit sequence..." # In a real scenario, these would be malicious HTTP requests. # For the purpose of testing the SIEM logic, we simulate the log entry that # a WAF or IDS would generate after seeing these specific CVE patterns. TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") # Simulate the first stage of the exploit (CVE-2026-123007) echo "[$TIMESTAMP] [nginx-waf] ALERT: CVE-2026-123007 detected in payload" >> /var/log/nginx/access.log # We simulate the log ingestion engine mapping this to the field 'cve_exploit' # Simulate the second stage of the exploit (CVE-2026-123634) echo "[$TIMESTAMP] [nginx-waf] ALERT: CVE-2026-123634 detected in payload" >> /var/log/nginx/access.log echo "Simulation payload injected into logs." -
Cleanup Commands:
# Remove the simulated log entries to restore baseline sed -i '/[nginx-waf] ALERT:/d' /var/log/nginx/access.log echo "Cleanup complete."