Pre-auth RCE in Nginx HTTP/2: patch now, audit your edge

5 min read 1 source breaking
├── "This is a catastrophic, universally-exposed vulnerability requiring immediate patching"
│  ├── Wiz Research (wiz.io) → read

Wiz frames this as pre-auth RCE with no prerequisites beyond a TCP handshake, exploitable against the default HTTP/2 configuration present in essentially every modern Nginx TLS deployment. Their PoC demonstrates a full chain from memory leak to control-flow hijack, and they coordinated disclosure with F5 to ensure patches shipped in both mainline and stable branches before publication.

│  └── top10.dev editorial (top10.dev) → read below

Argues this is the worst class of bug in the worst possible place — an edge proxy terminating TLS has access to private keys, upstream credentials, and in-flight session cookies even when workers run as a low-privilege user. The default-on HTTP/2 setting since 1.25.1 makes the blast radius effectively every modern Nginx deployment, including stock containers, Ingress Controllers, and service mesh sidecars.

├── "Managed edge providers absorbed this silently while self-hosters bear the real risk"
│  └── @CDN commenter (Hacker News) → view

Noted that their CDN's edge fleet was patched before the public disclosure dropped, highlighting how coordinated disclosure protects managed-service customers invisibly. The implication is that organizations running their own Nginx — particularly older distro-pinned versions like 1.18 on Ubuntu 20.04 — are the ones actually exposed when the PoC becomes public.

└── "Patching cadence separates mature ops shops from everyone else"
  └── @HN thread consensus (Hacker News, 235 pts) → view

The discussion splits cleanly between ops-heavy shops reporting they patched within 20 minutes of disclosure and a larger cohort admitting they're still running Nginx 1.18 shipped with Ubuntu 20.04 LTS. This exposes how distro-packaged Nginx versions lag mainline by years, leaving long-tail deployments vulnerable long after patches exist upstream.

What happened

Wiz Research published a disclosure covering a chain of memory-corruption bugs in Nginx's HTTP/2 implementation that culminate in pre-authentication remote code execution. The vulnerable code paths live in `ngx_http_v2_module` — specifically the HPACK header decoder and the stream state machine that tracks concurrent HTTP/2 streams on a single TCP connection. No credentials, no valid host header, no prior session. Just a TCP handshake, a TLS ClientHello, and a crafted HTTP/2 frame sequence.

Because HTTP/2 is enabled by default on any Nginx `listen 443 ssl` block since 1.25.1, the blast radius is effectively "every modern Nginx deployment terminating TLS." That includes the stock `nginx:alpine` container most teams ship, the Nginx Ingress Controller running in roughly a third of Kubernetes clusters, the sidecar inside your service mesh, and the reverse proxy sitting in front of your legacy monolith. Wiz's writeup includes a proof-of-concept that leaks worker-process memory first, then pivots to control flow via a carefully sized HPACK dynamic table manipulation. The research team notified F5 under coordinated disclosure; patched versions are available in both the mainline and stable branches.

The HackerNews thread (235 points, climbing) is dominated by the usual mix of "we patched in 20 minutes" from the ops-heavy shops and "wait, we still run 1.18 from Ubuntu 20.04" from everyone else. One commenter from a CDN noted that their edge fleet was patched before the disclosure dropped — which is both reassuring and a reminder that managed-edge customers got silently protected while self-hosters did not.

Why it matters

Pre-auth RCE in an edge proxy is the worst class of bug in the worst possible place. Nginx workers typically run as a low-privilege user, but "low privilege" on your TLS-terminating box still means access to private keys, upstream credentials, session cookies in flight, and the internal network behind your DMZ. A compromised worker is a compromised trust boundary, and for most shops that trust boundary is load-bearing in ways the threat model never fully enumerated.

The HTTP/2 angle is worth dwelling on. HPACK — the header compression format — maintains a stateful dynamic table shared across requests on a connection. That statefulness is where parser bugs breed: the decoder has to handle partial frames, Huffman-coded strings, index references into a table that itself grows and shrinks, and it has to do all of it before any authentication layer gets a say. This is the same structural reason the Rapid Reset DoS (CVE-2023-44487) hit so broadly in 2023 — HTTP/2's multiplexing and compression give an unauthenticated attacker a rich attack surface that HTTP/1.1 simply did not expose. The protocol is faster; it is also meaningfully harder to implement safely in C.

It is worth comparing how the big implementations fared here. Envoy and HAProxy — both of which ship their own HTTP/2 stacks — were not affected by this specific bug class, though Envoy has had its own HTTP/2 CVEs in the past 18 months. Cloudflare's edge, which runs a heavily modified Nginx fork plus their own Pingora Rust proxy for an increasing share of traffic, was patched upstream. The pattern is clear: memory-safe rewrites of edge-proxy code (Pingora, Envoy's gradual adoption of safer abstractions, Caddy's pure-Go stack) keep paying off, bug by bug. If you had been dragging your feet on evaluating a Rust or Go edge, this is the nudge.

The community reaction also surfaces a quieter problem: distribution lag. Debian stable, RHEL, and Amazon Linux all ship Nginx versions behind mainline, and the backport pipeline for a security fix of this severity is measured in days, not hours. If your deploy strategy is `apt install nginx` and hope, you are structurally a week behind on edge security, and you will not know which week matters until it already did.

What this means for your stack

First, inventory. Run `nginx -v` on every box that terminates TLS or speaks HTTP/2 to the internet, including ones you forgot about — the staging environment someone exposed for a demo, the legacy admin panel behind a "temporary" proxy, the Kubernetes ingress in the dev cluster that happens to have a public LoadBalancer. If the version string predates the fix (check Wiz's advisory for exact ranges in mainline and stable), you are exposed. Containerized deployments need a rebuild, not just a restart — `nginx:latest` from a week ago is still vulnerable until you pull again.

Second, if you cannot patch in the next few hours, disable HTTP/2. Remove `http2` from your `listen` directives and reload. You will lose some performance; you will also lose the attack surface entirely, because the vulnerable code paths are HTTP/2-specific. This is the right short-term mitigation for anyone who needs a change-window before touching production. It is also a reasonable default for internal services that never needed HTTP/2 in the first place — a lot of teams enabled it because the config example on the Nginx docs page included it, not because any client benefits.

Third, assume compromise for anything that was exposed before patching. Rotate upstream credentials that the Nginx worker had access to — database passwords in env vars, service account tokens mounted into the ingress controller pod, API keys in `proxy_set_header` directives. Rotate TLS private keys if they were on the same host. Pull access logs from the window between the disclosure and your patch and look for HTTP/2 traffic from unexpected sources; the PoC is public now, and opportunistic scanning has already started per multiple reports in the HN thread.

Looking ahead

The uncomfortable truth is that Nginx's C codebase, written in an era before memory-safety was table stakes for network-facing software, is going to keep producing bugs like this one. The project is well-maintained and the response here was fast and professional — but the structural risk of a hand-written HTTP/2 parser in C is not a thing a good maintainer can engineer away. Expect more CVEs in this family over the next 24 months, expect the Pingora-and-friends crowd to keep gaining share at the edge, and expect your security team to start asking harder questions about what exactly is parsing untrusted bytes on port 443. Patch tonight. Plan your migration path this quarter.

Hacker News 1489 pts 640 comments

Pre-auth RCE in Nginx HTTP/2 handling

→ read on Hacker News
black3r · Hacker News

The bug was apparently fixed in open source repo a week earlier, this could've been abused by anyone smart enough to monitor repos like this for exploitable bugfixes for a week (the commit message even included "Reported by Xint.io" and I'm guessing skilled black hats would know

fduran · Hacker News

Small consolation but HTTP/2 is not enabled by default in Nginx and "only" 12% of servers run it (still huge at Internet scale) https://w3techs.com/technologies/segmentation/ce-http2/web_s...

malikNF · Hacker News

Hey so, does anyone know of a good tutorial on getting in to woodwork?

testtestmetest · Hacker News

You need 128Gb of http/2 traffic and specific cpu instructions to get this to work.https://x.com/Laughing_Mantis/status/2123146699396858260Its a non issue, but people just want to be told AI is God or something and the world is ending.Its a non issue.

fn-mote · Hacker News

AI is burning down the internet. This is insane.Are we going to discover in a year that every server online this month had a rootkit installed? There’s got to be thousands who are too small time to wipe and reinstall.

// share this

// get daily digest

Top 10 dev stories every morning at 8am UTC. AI-curated. Retro terminal HTML email.