nginx2root: Remote Code Execution in Nginx HTTP/2 (CVE-2026-123007 / CVE-2026-123633)
Description
nginx2root is a collection of five distinct nginx vulnerabilities, found by Xint, that together with a separate Linux kernel flaw give a path from an unauthenticated nginx visitor to root on the server host. The most severe is a memory-corruption flaw in nginx HTTP/2 flow control: by sending crafted HTTP/2 traffic, an unauthenticated attacker can corrupt memory in an nginx worker process. At minimum this crashes workers; the researchers describe a working path to remote code execution as the nginx worker user, which defeats address randomization by leaking memory addresses through nginx's own responses. Every nginx release from 1.9.5 through 1.31.8 is affected when HTTP/2 is enabled (except stable 1.30.7 and later); no other setting is required. This server is running an affected nginx version and accepts HTTP/2.
The five vulnerabilities affect different features. Each of the other CVEs has its own affected version range; check the installed build, its patch status and the relevant configuration:
- CVE-2026-123007: servers with HTTP/2 enabled.
- CVE-2026-123634: servers using resolver, proxy_pass, mirror, and mirror_request_body off together.
- CVE-2026-123633: servers using HTTP/2 and upstream connections through directives such as proxy_pass, fastcgi_pass, or grpc_pass.
- CVE-2026-121810: servers using HTTP/3/QUIC and upstream connections through directives such as proxy_pass, fastcgi_pass, or grpc_pass.
- CVE-2026-113425: mail proxy servers using proxy on and auth_http.
Note: This detection is based on the nginx version the server reveals. Linux distributions (e.g. Ubuntu, Debian, RHEL) and OpenResty often backport security fixes into their builds without changing the nginx version number, so a backported package may already be patched even though it reports an affected version.
Remediation
Upgrade nginx to 1.31.9 or later (mainline) or 1.30.7 or later (stable), or install your distribution's or OpenResty's patched package, and restart nginx. Until then, disable HTTP/2 by removing "http2" from every listen directive and setting "http2 off;" for every server on the affected ports. HTTP/2 stays on for a whole port if any server block on that port enables it. Setting "server_tokens off;" hides the version but does not fix the issue. Disabling HTTP/2 mitigates only the HTTP/2 findings; follow the nginx security advisories for CVE-2026-123634 (mirror with resolver), CVE-2026-121810 (HTTP/3/QUIC upstreams) and CVE-2026-113425 (mail proxy with auth_http).