DEV Community

RobustTrueTry
RobustTrueTry

Posted on

Check Your NGINX HTTP/2 Config Before Attackers Do

Two critical remote code execution vulnerabilities in NGINX, tracked as CVE-2026-123633 and CVE-2026-123007, were disclosed on November 18. Both require HTTP/2 to be enabled, and neither needs authentication. An attacker who reaches the port can potentially run code on the server itself.

Your application code can be flawless and it will not matter. The bug lives in the web server in front of it.

By the end of this article you will know how to inventory your NGINX deployments for HTTP/2, decide between patching and disabling HTTP/2, and set up detection for exploitation attempts.

What the bugs actually are

CVE-2026-123633 is a use-after-free in the HTTP/2 request handling path. A use-after-free means the server keeps using memory that has already been released, and an attacker can shape heap contents so that reused memory contains their own data.

CVE-2026-123007 is an integer underflow that dates back to NGINX 1.9.5, released in 2015. An underflow lets a length field wrap around to a huge value, which corrupts memory downstream. Researchers showed code execution on a server serving nothing but static files. No backend, no third-party modules.

Both are rated CVSS 4.0 9.2. F5 shipped fixes on November 18, so the immediate job is finding your exposure.

Find every server with HTTP/2 on

Most teams enable HTTP/2 with one line and forget about it. Run this across your fleet to list listening NGINX processes and whether each advertises HTTP/2:

# Which servers expose h2 on the wire?
for host in $(cat hosts.txt); do
  echo "== $host =="
  curl -sI --http2 "https://$host/" | head -n 1
  grep -rn 'listen .*http2' "$host:/etc/nginx/" 2>/dev/null || echo "no http2 in config"
done
Enter fullscreen mode Exit fullscreen mode

Also check gRPC. The grpc_* directives imply an HTTP/2 listener even when your listen lines do not mention it. Config-as-code repositories are another place to grep, because a Terraform or Ansible module may turn HTTP/2 on somewhere you never looked.

grep -rn 'http2\|grpc_listen' infra/ charts/ playbooks/ | grep -v vendor
Enter fullscreen mode Exit fullscreen mode

Expect surprises. Edge load balancers frequently terminate TLS with HTTP/2 enabled by default, and those count as exposed if they run a vulnerable NGINX version.

Patch, or disable HTTP/2

Patching is the real fix. Disabling HTTP/2 is the stopgap when you cannot roll out quickly.

Option Tradeoff When to use
Upgrade NGINX Only reliable fix; needs rollout coordination Always, eventually
Disable HTTP/2 Kills the attack surface but loses multiplexing and header compression Same-day mitigation
Block at the LB Fast, but only works if every path to the server forces HTTP/1.1 When you control the edge

Disabling HTTP/2 means browsers fall back to HTTP/1.1. Most sites tolerate that fine. If you serve heavy gRPC traffic, you cannot disable HTTP/2 without breaking clients, so patching is your only option and should jump the queue.

# Before
listen 443 ssl;
http2 on;

# Emergency mitigation: HTTP/1.1 only
listen 443 ssl;
# http2 disabled until the patched build is deployed
Enter fullscreen mode Exit fullscreen mode

Note the modern syntax: since NGINX 1.25.1, http2 is a standalone directive rather than a flag on listen. Older configs still use listen 443 ssl http2;, so grep for both forms.

After upgrading, verify the running binary, not just the package version:

nginx -v
nginx -T 2>/dev/null | grep -E 'http2|listen'
systemctl restart nginx  # workers keep old code until reload or restart
Enter fullscreen mode Exit fullscreen mode

A package upgrade without a restart is a classic miss. The old workers keep serving traffic on the vulnerable code for hours or days.

What exploitation looks like in logs

Memory corruption bugs rarely leave clean traces, but watch for these signals in error.log:

  • Worker process segfaults or aborts, often repeated.
  • HTTP/2 connection resets clustered in time from a small set of source IPs.
  • Unexpected child processes or new binaries near the NGINX prefix.
# Workers dying unexpectedly is the loudest signal
journalctl -u nginx --since "24 hours ago" | grep -iE 'signal|segfault|core'
Enter fullscreen mode Exit fullscreen mode

A crash does not prove exploitation, but a crash followed by an outbound connection from the nginx worker does. If you see that, isolate the host and pull the core dump before anything else.

The part that should change your roadmap

Multiple independent teams found these same bugs within weeks of each other, after they sat in the code for years. The researchers attribute that convergence to AI-assisted code analysis making deep memory-safety bugs reachable in practice. The takeaway for engineering teams is blunt: a vulnerability being hard to find is no longer a security strategy.

That shifts the practical metric from "are we patched" to "how fast can we patch." If your last NGINX rollout took three weeks, that lead time is now part of your risk model. Pre-build the patched image, keep an emergency HTTP/2-off config tested, and know which services cannot tolerate that mitigation before the next disclosure, not during it.

Key takeaways

  • CVE-2026-123633 (use-after-free) and CVE-2026-123007 (integer underflow) both require HTTP/2 enabled and neither requires authentication, so inventory your HTTP/2 listeners today.
  • Disabling HTTP/2 is a valid stopgap, but it breaks gRPC traffic, so gRPC-heavy services must patch first.
  • Restart NGINX workers after upgrading; a package install alone leaves the vulnerable code running.
  • Watch for worker segfaults in error.log followed by unexpected outbound traffic as evidence of exploitation attempts.
  • Treat time-to-patch as a security metric, because long-standing bugs are now being found by multiple parties at once.

Source

Unauthenticated remote code execution in Nginx — this article adds practical inventory commands, a mitigation tradeoff comparison, log-based detection signals, and rollout pitfalls the original advisory does not cover.

Support this work

These write-ups are researched and published with no paywall, sponsor, or tracking. If one saved you an afternoon, a small tip keeps them coming.

USDT, USDC or USDD · TRC-20 (Tron)

TFTNsfyomKrnUutRjBTGVULp19ByW29KbY
Enter fullscreen mode Exit fullscreen mode

Top comments (0)