NGINX2Root: Patching Nginx on Trellis Servers
Nginx 1.31.9 was released on November 18. It fixes five vulnerabilities that security firm Xint disclosed as NGINX2Root. The most serious, CVE-2026-123007, lets an unauthenticated attacker run code on any server with HTTP/2 enabled.
Trellis enables HTTP/2 by default, so every Trellis server is affected. Every Nginx release from 1.9.5 through 1.31.8 is vulnerable.
The vulnerabilities
The five bugs are independent. Each one is a separate way in, and each needs a different Nginx feature to be turned on:
- CVE-2026-123007: an integer overflow in HTTP/2 flow control. Needs HTTP/2. Affects 1.9.5 and later.
- CVE-2026-123633: needs HTTP/2 with requests forwarded to a backend server. Affects 1.19.7 and later.
- CVE-2026-121810: needs HTTP/3 with requests forwarded to a backend server. Affects 1.25.0 and later.
- CVE-2026-123634: needs
resolver, a variableproxy_passdestination, andmirror. Affects 1.13.4 and later. - CVE-2026-113425: needs the Nginx mail proxy with
auth_http. Affects 0.5.15 and later.
Each bug gives an attacker code execution as the Nginx worker process. Xint also found a Linux kernel bug that can be chained with any of them to get root on the server, which is where the name comes from.
Trellis v1.29.0 and later also enable HTTP/3 by default.
Upgrading Nginx on Trellis
Trellis installs Nginx from the official nginx.org mainline repository with apt_package_state: present, which installs packages but never upgrades them. Ubuntu’s unattended-upgrades doesn’t cover third-party repositories by default either, so your servers won’t pick up the patch on their own.
The 1.31.9 packages are already published for Ubuntu 22.04, 24.04, and 26.04. Provision to upgrade Nginx:
trellis provision --extra-vars nginx_package_state=latest --tags nginx production
This runs only the Nginx role and upgrades Nginx to 1.31.9. The package swaps the running Nginx over to the new version automatically. Confirm it on the server:
nginx -v
You should see nginx/1.31.9. Repeat for staging and development.
Can’t upgrade right away?
Turn off HTTP/2 and HTTP/3 in group_vars/all/main.yml:
nginx_http2_enabled: false
nginx_http3_enabled: false
Then re-provision:
trellis provision --tags wordpress-setup production
This blocks the three bugs that a default Trellis server could be exposed to. If your sites are behind Cloudflare or another CDN, visitors still get HTTP/2 and HTTP/3 from the edge. Upgrading is still the real fix, so turn them back on once you’re on 1.31.9.
Not using Trellis?
Run nginx -v on your server or check with your host. Anything from 1.9.5 through 1.31.8 is potentially vulnerable, depending on which features you’ve enabled.
If you install Nginx from your distribution instead of nginx.org, the version number won’t tell you much. Ubuntu and Debian backport security fixes without changing it, so compare the full package version (apt-cache policy nginx) against your distribution’s security advisory.
More info
- NGINX2Root, from Xint
- Xint’s full writeup, with the configuration each CVE needs and how to check your server
- Nginx downloads and changes
Questions or problems upgrading? Let us know!