CVE-2026-123007: Nginx HTTP/2 Heap Overflow Enables RCE Chain to Root
A critical 9.2 CVSS vulnerability in Nginx (CVE-2026-123007) affecting versions 1.9.5 to 1.31.8 allows unauthenticated remote code execution via HTTP/2 flow control flaw, which combined with a Linux kernel SCTP bug enables full host compromise; mitigation includes upgrading, disabling HTTP/2, or blocking SCTP module.
Reading font

Vulnerability Overview
Nginx disclosed a critical vulnerability CVE-2026-123007 with a CVSS score of 9.2. The flaw resides in the HTTP/2 flow control implementation and affects all versions from 1.9.5 through 1.31.8 — spanning nearly 11 years of releases. According to a Shodan scan, approximately 99% of the 11.94 million publicly identifiable Nginx instances fall within the vulnerable range.
Root Cause: HTTP/2 Flow Control Credit Calculation
HTTP/2 uses a flow control mechanism analogous to a bucket: before sending data, the sender checks available credit; credit is returned when the receiver processes data. Both peers can adjust the window size via SETTINGS frames.
The bug occurs when returning credit to a stream. Under heavy load with many streams being rapidly opened and closed while high-frequency SETTINGS frames adjust window sizes, Nginx miscalculates the credit to return. A subtraction that should yield a positive value instead produces a negative number. Because the underlying arithmetic uses unsigned integers, the negative value wraps around to an extremely large positive integer. This bypasses memory bounds checks and triggers a heap buffer overflow .
In typical scenarios the overflow crashes the worker process (segmentation fault), resulting in a denial-of-service condition. However, with a favorable memory layout or by bypassing ASLR, an attacker can craft packets that precisely overwrite function pointers, achieving remote code execution as the Nginx worker user.
Exploit Chain: From Worker to Host Root
The vulnerability alone grants code execution in the context of the Nginx worker (often a low-privilege user). The published exploit demonstrates a three-step chain:
Remote breach: Attacker sends malicious HTTP/2 traffic to the public 443 port, exploiting the heap overflow to gain control of the worker process.
Local privilege escalation: Using the compromised worker, the attacker exploits an unpatched vulnerability in the Linux kernel's SCTP module (Stream Control Transmission Protocol) to elevate privileges.
Container escape: The kernel-level flaw breaks namespace isolation, allowing the attacker to obtain root on the host machine.
The entire chain leaves minimal forensic traces and writes no files to disk.
Mitigation Strategies
Quick Self-Check (30 seconds)
# Step 1: Check version (vulnerable range: 1.9.5 – 1.31.8)
nginx -v
# Step 2: Check if HTTP/2 is enabled (if not, you are immune)
nginx -T 2>/dev/null | grep -nE '^\s*(http2\s+on\b|listen\b[^#]*\bhttp2\b)'If both checks match, the server is exposed to automated exploitation.
Option A: Upgrade (Permanent Fix)
Mainline: upgrade to 1.31.9 or later.
Stable: upgrade to 1.30.7 or later.
After upgrading, a simple reload ( nginx -s reload) is insufficient because old workers continue running the vulnerable code. A full restart is required during a low-traffic window:
sudo systemctl restart nginxOption B: Disable HTTP/2 (Immediate Workaround)
If upgrading is not immediately possible, disable HTTP/2 by removing the http2 parameter from listen directives or changing http2 on; to http2 off;. Then test and reload:
nginx -t
nginx -s reloadClients will fall back to HTTP/1.1 with negligible performance impact.
Option C: Block SCTP Module (Break the Escalation Path)
Most web servers do not use SCTP. Adding the module to the kernel blacklist prevents the local privilege escalation step:
echo "install sctp /bin/false" >> /etc/modprobe.d/blacklist.confThis mitigation does not fix the Nginx vulnerability but stops the full chain from reaching host root.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.