Critical NGINX HTTP/2 RCE Flaws: Patching CVE-2026-123007 (nginx2root) and CVE-2026-123633

Critical NGINX HTTP/2 RCE Flaws: Patching CVE-2026-123007 (nginx2root) and CVE-2026-123633

The Data Plane Risk of HTTP/2 Memory Corruption

HTTP/2 is enabled by default across virtually every modern internet-facing reverse proxy, API gateway, and Kubernetes Ingress Controller to deliver multiplexed streams and header compression. Because NGINX terminates untrusted client traffic directly at the network perimeter, memory safety flaws inside its HTTP/2 state machine expose massive swaths of production infrastructure without requiring authentication.

On November 18, 2026, F5 Networks and security researchers publicly disclosed two critical, CVSS v4.0 9.2 vulnerabilities affecting both NGINX Open Source and NGINX Plus (alongside downstream forks such as OpenResty and Kubernetes ingress-nginx):

  • CVE-2026-123007 (dubbed nginx2root): A 10-year-old integer underflow leading to a heap buffer overflow in HTTP/2 flow control window handling (F5 Advisory K000163926).
  • CVE-2026-123633: A use-after-free (UAF) vulnerability in HTTP/2 reverse-proxy connection handling triggered when a worker runs low on worker_connections (F5 Advisory K000163928).

Both flaws are strictly data plane vulnerabilities—no control plane exposure is required. A remote, unauthenticated attacker transmitting specially crafted HTTP/2 frames can reliably trigger worker segmentation faults (Denial of Service) or achieve Remote Code Execution (RCE) on hosts where Address Space Layout Randomization (ASLR) is disabled or bypassed.

┌────────────────────────────────────────────────────────┐
│  Unauthenticated Remote Client (Crafted HTTP/2 Frames) │
└───────────────────────────┬────────────────────────────┘
                            │ Multiplexed Streams / Window Updates
                            ▼
┌────────────────────────────────────────────────────────┐
│  NGINX Worker Process (HTTP/2 Data Plane)              │
│  ├── 1. CVE-2026-123007 (nginx2root):                  │
│  │   - Flow Control Window Integer Underflow (CWE-191) │
│  │   - Triggers Heap Buffer Overflow (CWE-787)         │
│  └── 2. CVE-2026-123633:                               │
│      - HTTP/2 Proxy Fails to Clear Reusable State      │
│      - Low worker_connections -> Use-After-Free (416)  │
└───────────────────────────┬────────────────────────────┘
                            │ Memory Corruption Boundary
                            ▼
         ┌──────────────────┴──────────────────┐
         ▼                                     ▼
┌──────────────────────────────┐    ┌──────────────────────────────┐
│  Worker Process Crash / DoS  │    │  Remote Code Execution (RCE) │
│  (SIGSEGV / Dropped Traffic) │    │  (ASLR Disabled or Bypassed) │
└──────────────────────────────┘    └──────────────────────────────┘

Deep Technical Breakdown of the CVEs

1. CVE-2026-123007 (nginx2root): HTTP/2 Flow Control Integer Underflow & Heap Overflow

  • Weakness Enumeration: CWE-191 (Integer Underflow / Wraparound) and CWE-787 (Out-of-bounds Write)
  • CVSS v4.0 Score: 9.2 (CRITICAL) — CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • Affected Versions:NGINX Open Source: 1.9.5 through < 1.30.7 (Stable) and 1.31.0 through < 1.31.9 (Mainline)NGINX Plus: R33+, 37.0.0 before 37.0.8.1, and 37.1.0 before 37.3.0.1
  • NGINX Open Source: 1.9.5 through < 1.30.7 (Stable) and 1.31.0 through < 1.31.9 (Mainline)
  • NGINX Plus: R33+, 37.0.0 before 37.0.8.1, and 37.1.0 before 37.3.0.1
  • Fixed Releases: NGINX Open Source 1.30.7 / 1.31.9; NGINX Plus 37.0.8.1 / 37.3.0.1
Vulnerability Mechanism

HTTP/2 uses per-stream and connection-level flow control windows to throttle frame transmission between clients and servers. In NGINX's ngx_http_v2_module, an arithmetic edge case present since NGINX 1.9.5 allows specially crafted HTTP/2 traffic to drive the flow control window calculation into an integer underflow.

Once the window wraps around and exceeds its allowed boundary threshold, NGINX miscalculates the expected buffer capacity for incoming frame payloads. Subsequent data writes spill past the allocated heap chunk boundaries (out-of-bounds write), corrupting adjacent heap metadata. At a minimum, this immediately crashes the worker process via SIGSEGV; with heap grooming and an ASLR bypass (or disabled ASLR), an attacker can overwrite function pointers and hijack execution flow.

2. CVE-2026-123633: HTTP/2 Reverse-Proxy Use-After-Free

  • Weakness Enumeration: CWE-416 (Use After Free)
  • CVSS v4.0 Score: 9.2 (CRITICAL) — CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • Affected Versions:NGINX Open Source: 1.19.7 through < 1.30.7 (Stable) and 1.31.0 through < 1.31.9 (Mainline)NGINX Plus: R33+, 37.0.0 before 37.0.7.1, and 37.1.0 before 37.2.0.1
  • NGINX Open Source: 1.19.7 through < 1.30.7 (Stable) and 1.31.0 through < 1.31.9 (Mainline)
  • NGINX Plus: R33+, 37.0.0 before 37.0.7.1, and 37.1.0 before 37.2.0.1
  • Fixed Releases: NGINX Open Source 1.30.7 / 1.31.9; NGINX Plus 37.0.7.1 / 37.2.0.1
Vulnerability Mechanism

CVE-2026-123633 specifically targets reverse-proxy deployments where NGINX terminates HTTP/2 from clients and proxies requests upstream to backend servers (e.g., via proxy_pass).

Under normal operation, NGINX marks idle connections as reusable so they can be reclaimed if a worker approaches its configured worker_connections ceiling. Due to a state-tracking flaw in HTTP/2 proxy handling, active HTTP/2 connections fail to clear their reusable flag properly.

If an attacker opens concurrent connections to drive a worker process low on available worker_connections, NGINX's connection reaper forcefully reclaims and frees the still-active HTTP/2 connection structure. When subsequent upstream events or client frames reference the freed memory pointer, a classic Use-After-Free (UAF) condition triggers, enabling worker crashes or arbitrary code execution.

Exposure Audit and Temporary Mitigations

Step 1: Automated Fleet Exposure Audit Script

Before rolling out patches, audit your server fleet to confirm installed NGINX versions, detect active HTTP/2 listeners, check worker_connections ceilings, and verify kernel ASLR enforcement:

#!/usr/bin/env bash
# audit_nginx_http2_cves.sh - Checks exposure to CVE-2026-123007 & CVE-2026-123633
set -euo pipefail

echo "=== [1/4] Checking Installed NGINX Version ==="
if command -v nginx >/dev/null 2>&1; then
    nginx -v 2>&1
else
    echo "[ERROR] nginx binary not found in PATH."
    exit 1
fi

echo "=== [2/4] Scanning for Active HTTP/2 Configurations ==="
NGINX_CONF_DIR="/etc/nginx"
HTTP2_HITS=$(grep -rnE '(^\s*http2\s+on;|listen\s+.*http2)' "$NGINX_CONF_DIR" 2>/dev/null || true)
if [ -n "$HTTP2_HITS" ]; then
    echo "[!] HTTP/2 listeners detected (Exposed if unpatched):"
    echo "$HTTP2_HITS"
else
    echo "[OK] No explicit HTTP/2 directives found in ${NGINX_CONF_DIR}."
fi

echo "=== [3/4] Checking Reverse-Proxy & worker_connections Settings ==="
grep -rnE '^\s*worker_connections\s+' "$NGINX_CONF_DIR" 2>/dev/null || echo "[WARN] Default worker_connections in use."
PROXY_COUNT=$(grep -rnE '^\s*proxy_pass\s+' "$NGINX_CONF_DIR" 2>/dev/null | wc -l)
echo "[*] Active proxy_pass directives found: ${PROXY_COUNT}"

echo "=== [4/4] Verifying Linux Kernel ASLR Enforcement ==="
ASLR_VAL=$(cat /proc/sys/kernel/randomize_va_space 2>/dev/null || echo "unknown")
echo "[*] kernel.randomize_va_space = ${ASLR_VAL} (2 = Full Randomization required)"
if [ "$ASLR_VAL" != "2" ]; then
    echo "[CRITICAL] ASLR is not set to full randomization. RCE risk is significantly elevated."
fi

Step 2: Emergency Configuration Workaround (If Patching Is Delayed)

If an immediate binary upgrade is blocked by change-freeze windows, you can neutralize both attack surfaces by temporarily disabling HTTP/2 on public-facing listeners and enforcing strict connection limits:

# /etc/nginx/sites-available/production.conf
# TEMPORARY WORKAROUND: Disable HTTP/2 until upgraded to 1.30.7 / 1.31.9
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    
    # Comment out or disable HTTP/2 directives
    # http2 on;

    server_name api.example.com;

    ssl_certificate /etc/letsencrypt/live/api.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/api.example.com/privkey.pem;

    location / {
        proxy_pass http://backend_pool;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
    }
}

Additionally, if you cannot disable HTTP/2 immediately on reverse-proxy nodes, raise worker_connections and enforce per-IP connection limits (limit_conn) to make exhausting connection slots (required for CVE-2026-123633) substantially harder:

# /etc/nginx/nginx.conf
events {
    # Increase headroom to resist connection slot exhaustion
    worker_connections 16384;
}

http {
    # Cap concurrent connections per client IP
    limit_conn_zone $binary_remote_addr zone=per_ip_conn:10m;
    limit_conn per_ip_conn 50;
}

Zero-Downtime Binary Patching Workflow

Configuration workarounds are strictly temporary. Binary replacement to NGINX 1.31.9 (Mainline), 1.30.7 (Stable), or NGINX Plus 37.3.0.1 / 37.0.8.1 is the only complete remediation.

1. Upgrade Packages on Linux Hosts

Ubuntu / Debian:

# Refresh package lists and upgrade NGINX core
sudo apt-get update
sudo apt-get --only-upgrade install -y nginx

# Confirm patched version (>= 1.30.7 or 1.31.9, or distro backport)
nginx -v

RHEL / Rocky Linux / AlmaLinux:

sudo dnf clean all
sudo dnf upgrade -y nginx
nginx -v

2. Zero-Downtime Master Binary Replacement

Reloading configuration (systemctl reload nginx) does not load a newly installed NGINX binary into memory. To swap the executable without dropping active TCP connections, send the standard NGINX binary upgrade signals:

# 1. Validate configuration syntax against the newly installed binary
sudo nginx -t

# 2. Spawn a new master process running the patched binary
sudo kill -USR2 $(cat /var/run/nginx.pid)

# 3. Gracefully shut down old worker processes once new workers are serving traffic
sudo kill -WINCH $(cat /var/run/nginx.pid.oldbin)

# 4. Terminate the old master process
sudo kill -QUIT $(cat /var/run/nginx.pid.oldbin)

3. Kubernetes ingress-nginx and OpenResty Containers

If you run NGINX inside Kubernetes or OpenResty gateways, host OS patching does not remediate container images. Update your container image tags to patched upstream builds (e.g., nginx:1.30.7-alpine or nginx:1.31.9-alpine) and roll out your Ingress Controller Helm charts immediately:

# Update Helm repository and upgrade ingress-nginx controller
helm repo update
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --reuse-values

# Verify rollout completion and inspect binary version inside the running pod
kubectl rollout status deployment/ingress-nginx-controller -n ingress-nginx
kubectl exec -n ingress-nginx deploy/ingress-nginx-controller -- nginx -v

Vulnerability Comparison Matrix

AttributeCVE-2026-123007 (nginx2root)CVE-2026-123633
F5 Advisory IDK000163926K000163928
CVSS v4.0 Score9.2 (CRITICAL)9.2 (CRITICAL)
Weakness ClassInteger Underflow (CWE-191) & Heap Overflow (CWE-787)Use-After-Free (CWE-416)
PrerequisitesHTTP/2 enabled on client listenerHTTP/2 enabled + reverse-proxy (proxy_pass) + low worker_connections
Historical Exposure~10 years (Introduced in NGINX 1.9.5)~5 years (Introduced in NGINX 1.19.7)
Attack PlaneData plane only (Unauthenticated remote)Data plane only (Unauthenticated remote)
Primary ImpactWorker crash (DoS) or RCE (ASLR disabled/bypassed)Worker crash (DoS) or RCE (ASLR disabled/bypassed)
Fixed Open Source1.30.7 (Stable) / 1.31.9 (Mainline)1.30.7 (Stable) / 1.31.9 (Mainline)
Fixed NGINX Plus37.0.8.1 / 37.3.0.137.0.7.1 / 37.2.0.1
  • Run Workers Under Unprivileged Users: Verify that the user directive in nginx.conf drops privileges to a non-root account (www-data or nginx) with a read-only root filesystem in containers (readOnlyRootFilesystem: true). This restricts post-exploitation blast radius if a worker is ever compromised.
  • Monitor for Repeated Worker Segfaults: Configure log alerts on /var/log/nginx/error.log watching for worker process ... exited on signal 11 (SIGSEGV). Sudden bursts of worker crashes on HTTP/2 listeners are a primary indicator of active exploitation attempts.
  • Audit Downstream Forks: Do not overlook embedded NGINX binaries inside OpenResty, Kong Gateway, APISIX, or custom WAF appliances. Track vendor advisories and apply patched container images across all API gateways.

Enforce Full Kernel ASLR: Both advisories explicitly note that RCE relies on ASLR being disabled or bypassed. Enforce full memory randomization across all edge nodes:

sudo sysctl -w kernel.randomize_va_space=2
echo "kernel.randomize_va_space=2" | sudo tee /etc/sysctl.d/99-aslr.conf

Getting Started

To verify your exposure and patch your NGINX fleet today:

# 1. Run the version and HTTP/2 audit
nginx -v && grep -rnE '(http2\s+on|listen.*http2)' /etc/nginx/

# 2. Upgrade to patched NGINX releases
sudo apt-get update && sudo apt-get --only-upgrade install -y nginx

# 3. Validate syntax and perform a zero-downtime binary reload
sudo nginx -t && sudo kill -USR2 $(cat /var/run/nginx.pid)

By auditing HTTP/2 listeners, enforcing ASLR, and upgrading binaries across standalone hosts and Kubernetes Ingress Controllers to NGINX 1.30.7 or 1.31.9, engineering teams close both critical data-plane memory corruption vectors without disrupting production traffic.

Share: