AI Agents Uncover Decade-Old Nginx Flaws Enabling Remote Code Execution

| 5 min read

Nginx has shipped fixes for a critical, unauthenticated remote code execution flaw that has sat in its HTTP/2 code for more than a decade. The bug is serious on its own, but the more useful story for infrastructure teams is how it was found. Four separate research groups turned up overlapping flaws using AI agents, and that pattern is showing up across other widely deployed internet software.

Why this one matters

Nginx is estimated to power about a third of the web's servers, so a flaw here doesn't stay contained. The headline bug, CVE-2026-123007, lets an attacker manipulate flow-control windows in the HTTP/2 implementation and trigger an out-of-bounds memory copy. Xint.io turned that primitive into command execution with Nginx worker privileges. Every official release since version 1.9.5, which introduced HTTP/2 support in 2015, carries it.

A second HTTP/2 bug, CVE-2026-123633, is a use-after-free affecting releases 1.19.7 through 1.31.8. Researchers at Metnir named it Drainbreak. Both are fixed in Nginx 1.31.9 and 1.30.7, which F5 released alongside fixes for eight other vulnerabilities.

Exposure is wide. Shodan shows 56.7 million hosts running Nginx, and 98.9% of those that disclose their version fall in the vulnerable range. Those numbers are hard to wave away.

The AI angle

Here's the thing: the attribution list tells you where the discovery work happened. CVE-2026-123007 was reported by Rapid7, Wiz, Xint, and Ikotas Labs. Drainbreak came from Metnir, Wiz, and Xint. Of those teams, only Rapid7's Stephen Fewer skipped mentioning AI in his write-up. The other four used AI agents or harnesses.

Xint's own platform found five of the flaws and a separate Linux kernel bug. CEO Brian Pak described the scan as covering "50,000 lines of code in just 90 minutes" to surface "a critical vulnerability that gave an unauthenticated user a RCE path — essentially an internet breaker." That's a striking claim, and the scale of the scan is the detail I'd focus on. Code review that once took a team weeks is now a background job, which changes the economics for attackers and defenders alike.

How hard is exploitation, really?

No one has exploited either HTTP/2 flaw in the wild, according to the US Cybersecurity and Infrastructure Security Agency's assessment of both CVEs. That's the good news. The less comfortable part is that every research team built a working exploit.

Xint says CVE-2026-123007 is highly exploitable. An externally reachable TLS/HTTP/2 port was enough to corrupt the send window, leak addresses, and run commands. The team validated the attack against public IPs on AWS, GCP, and Azure under concurrent traffic.

Metnir's Drainbreak exploit took about 10 minutes against a target with ASLR enabled, and nearly all of that time went to defeating memory layout randomization. The team reproduced the use-after-free in OpenResty and crashed shipped binaries from Kong, Apache APISIX, NGINX Gateway Fabric, and the community ingress-nginx controller. All of them enable HTTP/2 by default, which is why this matters for Kubernetes and API gateway setups as much as bare-metal web servers.

Fewer at Rapid7 ran the numbers on his exploit. It needs to send roughly 128GB of HTTP/2 data to the target, which takes about two minutes on a 10Gbit/s link and 17 minutes on 1Gbit/s. It also depends on a glibc memory-copy routine that only runs on CPUs with AVX-512 extensions. That's a narrower condition, but AVX-512 hardware is common in servers.

Still, the exploit isn't push-button. "Exploitation is by no means a walk in the park, as the vulnerable systems must be directly exposed to the internet with no WAF or CDN terminating HTTP/2," Yordan Ganchev, principal threat intelligence specialist at watchTowr, told CSO. "Memory corruption can also be tricky, as an effective exploit must properly groom and shape the memory heap and handle different NGINX versions, builds, and configuration variants. And when the system is internet-facing and under load, exploitation can cause more crashes than successful code execution."

Patching, mitigations, and the kernel problem

Upgrade to Nginx 1.31.9 or 1.30.7 first. Nginx Plus customers should move to 37.3.0.1 on the newer release line or 37.0.8.1 on the 37.0 line. The older R33 through R36 Nginx Plus releases have reached end of technical support and won't get a fix, so those deployments need a migration plan, not a patch.

If you can't patch right away, disabling HTTP/2 blocks the two most severe flaws. The cost is real, though. Services that depend on HTTP/2, including native gRPC, stop working. Disabling it also leaves three other Xint findings open, CVE-2026-123634, CVE-2026-121810, and CVE-2026-113425, because they sit in other components. The resolver flaw affects setups that pick backends per request and use the mirror directive. The HTTP/3 flaw hits QUIC listeners. The mail proxy flaw applies to deployments running proxy on with auth_http. Xint's technical write-up covers per-flaw mitigations.

The Linux kernel issue is harder to live with. Xint found a flaw in the SCTP subsystem that can be chained with any of the Nginx bugs to gain root on the server. In the team's tests, the chain escaped a Docker container running Nginx and reached root on the host. The bug has existed since Linux 4.15, released in 2018, and has no CVE or patch yet. Xint is withholding details until distributions ship a fix. If you don't use SCTP, you can block the module by adding install sctp /bin/false to a file under /etc/modprobe.d.

Wiz recommends watching for unexpected Nginx worker crashes and for commands launched by worker processes. Those signals may be the only evidence an exploit attempt leaves behind.

Then there's the verification gap. "The real risk with this nginx bug isn't the 11 years it went unnoticed, it's how many teams will think they've patched when they haven't," Daniel Shechter, co-founder and CEO of Miggo Security, told CSO. "The version number can be wrong because distros backport fixes without changing it, a reload doesn't swap out the running code, and the attack happens in HTTP/2 traffic that WAFs and access logs never see. If you can't prove the fix is actually running, assume you're still exposed."

Shechter's point is where I'd put the effort this week. Inventory what's actually serving traffic, confirm the running binary and not just the package version, restart what needs restarting, and check worker behavior. AI-driven code auditing will keep surfacing bugs like this, and the teams that can verify their fixes will absorb them far more easily than the ones that can't.

Source: James Garcia · www.csoonline.com