Blog/Nginx2Root
Security

Nginx2Root: your server did not patch itself.

On 18 November 2026 Nginx fixed five vulnerabilities. The worst one lets a stranger run code on your server over an ordinary HTTPS connection. On a great many servers, that fix is not installed until someone logs in and installs it, whatever the automatic updates setting says. This is what a founder or CTO needs to know, followed by the runbook for the person doing the work.

The short version
  • What: five vulnerabilities in Nginx, fixed on 18 November 2026. The most severe lets someone with no account run commands on your server over HTTP/2.
  • Who: every Nginx release since 1.9.5 (2015). Assume your servers are affected until you have checked.
  • Fixed in: Nginx 1.30.7 (stable) and 1.31.9 (mainline).
  • The catch: automatic security updates often do not cover Nginx. On many servers the fix waits until someone logs in and installs it.
  • The hard case: servers on an operating system past its support date may have no fix to install. They need replacing.
  • Effort: about ten minutes per server in the standard case, plus a restart.

What happened, in plain terms

Nginx is the program that answers the door for most web products. Every visitor, API call and webhook passes through it before your application sees anything. Researchers at Xint found five flaws in it and named the set Nginx2Root, because of where the attack ends: full control of the machine.

The path has two steps. First, a flaw in how Nginx handles HTTP/2 lets an attacker run their own code on the server. No password, no account, nothing in your application needs to be wrong. HTTP/2 is switched on for most HTTPS sites, so the door is open by default. Second, the researchers combined that with a separate bug in the Linux kernel to go from “running as the web server” to “root”, including from inside a Docker container.

CVEWhereYou are exposed ifSinceHTTP/2 off helps
2026-123007HTTP/2
remote code execution
HTTP/2 is enabled on a public HTTPS port1.9.5Yes
2026-123633HTTP/2 with a proxyHTTP/2 plus proxy_pass1.19.7Yes
2026-123634DNS resolverproxy_pass with resolver and mirror1.13.4No
2026-121810HTTP/3HTTP/3 (QUIC) plus proxy_pass1.25.0No
2026-113425Mail proxyNginx proxies IMAP, POP3 or SMTP0.5.15No

For a typical web product the first row is the one that matters: HTTPS with HTTP/2 and an application behind it. The last three need configurations most product teams never set up.

The researchers do not report attacks in the wild at the time of writing. Treat that as a head start. The fix is public, and a public fix shows everyone exactly where the hole was.

Why your server did not patch itself

This is the part that catches teams out. Most Linux servers have automatic security updates switched on, and most people reasonably read that as “security updates are handled”. For Nginx, often they are not.

The reason is mundane. Automatic updates install fixes from the operating system’s own security repository and nowhere else. Nginx frequently comes from somewhere else: the nginx.org repository, a third-party package archive, a hosting panel’s own source, or a Docker image. The automatic updater never looks there. Laravel Forge, for one, told its customers plainly this week that its automatic security updates do not include Nginx and that each server has to be updated by hand.

Your applicationUpdated every time you deploy.You, often
Language runtimePHP, Node, Python. Updated when someone asks for it. A deploy does not touch it.You, on request
NginxOften installed from outside the operating system’s repository, where automatic updates never look.Often nobody
Operating system packagesSecurity fixes from the distribution install themselves.Automatic
Linux kernelThe fix installs itself, and does nothing until the server is rebooted.Automatic, after a reboot
Who updates what on a typical cloud server. The highlighted layer is the one Nginx2Root lives in.

None of this is a failure of the tools. A hosting panel provisions servers and makes them pleasant to run. A cloud provider gives you a machine. Neither takes ownership of what runs on it, and neither said it would. The gap is in the assumption, and it is the same whether you use a panel, a plain cloud server, or a Docker image nobody has rebuilt since spring.

So the useful question for a founder is not “are we on a managed platform?” It is: for each layer in that chart, whose name is next to it? If the answer for Nginx is a shrug, you have found the real vulnerability.

The 10-minute check

You do not need to be an engineer to find out where you stand. Send your team these five questions and ask for the answers in writing:

  1. Which of our servers face the internet and run Nginx? Include staging, old marketing sites and anything a contractor set up.
  2. What does nginx -v print on each one?
  3. Which operating system release is each one on, and where was Nginx installed from?
  4. After updating, was Nginx restarted, not just reloaded?
  5. When is the kernel update and reboot planned?

The engineer’s version of questions two and three, on Debian or Ubuntu:

On each server
nginx -v
lsb_release -ds
apt-cache policy nginx

The last command shows the installed package version and the repository it came from. Together, those three lines sort every server into one of three cases.

CASE AAlready fixed

Version 1.30.7 or later (stable), 1.31.9 or later (mainline), or a distribution package your vendor’s security notice lists as fixed. Confirm it was restarted since the update.

CASE BSupported system, old Nginx

The standard case. Follow the runbook below. What you run depends on where Nginx came from.

CASE CSystem past its support date

Ubuntu 20.04 and older, for example. The nginx.org packages are no longer built for them; the newest there is 1.27.5, still vulnerable. Plan a move to a new server.

Which case each server falls into decides the work.
Would you rather someone else ran the check?

Tell us what you host and where. You’ll get a reply within 1 business day with what we would look at first.

Ask us to check

The upgrade runbook

Written for Debian and Ubuntu, which is what most cloud servers run. On Red Hat-family systems the logic is the same with dnf. Do one server first, ideally staging, and take a provider snapshot before you start. It costs a minute and buys you a way back.

1. See where Nginx came from

Terminal
apt-cache policy nginx

Look at the repository address next to the installed version. There are three common answers, and each has its own path:

  • Your distribution’s archive (an ubuntu.com or debian.org address). Go to step 2. The fix arrives as a patched build of the version you already have.
  • nginx.org. Go to step 2. You get the new version directly.
  • A third-party archive that no longer exists. Many servers were set up with the ondrej/nginx PPA, which has been removed. It will never deliver the fix, so do step 3 first.

2. Install the update

Terminal
sudo apt-get update
sudo apt-get install --only-upgrade -o Dpkg::Options::=--force-confold nginx

--only-upgrade installs nothing new, and --force-confold keeps your existing configuration files instead of replacing them with the package’s defaults.

If Nginx comes from your distribution, the version number may not change: Ubuntu and Debian usually patch the version they ship instead of moving to a new one. Compare the full package version against the distribution’s security notice for these CVEs. If no fixed package is offered yet, use the stopgaps further down and check again daily.

3. If the package source is gone, switch to nginx.org

These are the commands Laravel Forge published for servers still on the removed PPA. They work on any Ubuntu 22.04 or later server in the same position. Then run step 2.

Terminal
# Remove the old source. Do not use add-apt-repository --remove: it fails now that the PPA is gone.
sudo rm -f /etc/apt/sources.list.d/ondrej-ubuntu-nginx-*
sudo apt-get update

# Install the nginx.org signing key
curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null

# Add the nginx.org mainline repository
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/ubuntu $(lsb_release -cs) nginx" | sudo tee /etc/apt/sources.list.d/nginx.list

# Prefer nginx.org packages
printf "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx

4. Test, then restart

Terminal
nginx -v
sudo nginx -t
sudo systemctl restart nginx

nginx -t should say the syntax is OK and the test is successful. Warnings that listen ... http2 is deprecated are harmless. If the restart fails, systemctl status nginx tells you why, and the next section covers the usual reasons.

5. Docker: pull and recreate

Terminal
# What is running now?
docker exec your-nginx-container nginx -v

# Fetch the fixed image and replace the container
docker compose pull nginx
docker compose up -d nginx

A fixed image upstream changes nothing until you pull it and recreate the container. If the image is pinned to an exact version or a digest, change the pin first. If you build your own image on top of the official one, rebuild it.

6. Prove it from outside

Load the site, run a checkout or a login, and watch the error log for a few minutes. Then write down the server, the version and the date. That one line is what you will want the next time someone asks “are we patched?”

Where it stops being a one-line upgrade

We have been through this update on the servers we look after for clients. These are the points to watch.

  • A reload is not a restart. Reloading re-reads the configuration and keeps the old program in memory. The server reports the new version and keeps serving traffic with the vulnerable one. Restart the service.
  • Modules disappear when you switch source. Third-party archives often shipped extra modules such as Brotli, GeoIP, image filter, XSLT and SSL-CT; the nginx.org packages do not. If your configuration still has load_module lines for them, Nginx will refuse to start. Remove those lines from /etc/nginx/nginx.conf and /etc/nginx/modules-enabled, and check whether you were relying on what they did, Brotli compression above all.
  • A new default site appears. The nginx.org package adds /etc/nginx/conf.d/default.conf. Make sure your own default server still takes precedence, or unknown hostnames start landing on a welcome page.
  • An old operating system is a dead end. On releases past their support date, Ubuntu 20.04 and older among them, there may be no fixed package to install. The work becomes a migration: a new server on a current release, the application moved across, DNS switched. Better planned this week than done in a hurry later.
  • The kernel half is still open. The root step uses a separate Linux bug, which needs its own kernel update and a reboot once the fix is released. Keep automatic security updates on and put the reboot in the calendar.

If you cannot update today

Sometimes there is a freeze, a launch, or a server nobody dares touch. Two stopgaps buy time. Neither replaces the update.

Turn HTTP/2 off. This blocks the two HTTP/2 flaws, including the most severe, and leaves the other three as they were. On Nginx 1.25.1 and later, add http2 off; to each server block and remove http2 from the listen line. On older versions, removing http2 from listen 443 ssl http2; is enough. Pages get a little slower and native gRPC clients stop working, so check what depends on it.

Block the kernel module used for the root step. The researchers’ suggestion, for servers that do not use the SCTP protocol (most web servers do not):

Terminal
echo "install sctp /bin/false" | sudo tee /etc/modprobe.d/disable-sctp.conf

That stops the module from being loaded. It does not unload one that is already running.

While you wait

Two signs worth an alert: Nginx worker processes crashing (look for signal 11 in the error log), and any program being started by the Nginx user. A web server has no reason to launch anything.

Other setups

The same questions apply; the answers differ by setup.

  • Hosting panels and provisioning tools. Tools that set servers up for you usually stop there. Forge is the clearest example this week: it patched its own service and told customers their servers are theirs to update. Check what your tool says before you assume.
  • Fully managed platforms. If your provider runs the web server for you, the patch is their job. Ask them to confirm in writing that it is done, and when.
  • Behind a load balancer or CDN. If AWS Application Load Balancer or a CDN terminates HTTP/2 and talks to Nginx over HTTP/1.1, the worst flaw is much harder to reach. That holds only if nobody can connect to the server directly, so check the firewall rules before you rely on it. Patch anyway.
  • Kubernetes and other bundled copies. Nginx also ships inside ingress controllers, appliances and vendor products. Those take their fix from the vendor, on the vendor’s schedule. List them and follow each vendor’s advisory.

This will keep happening

One detail in the research matters more than any version number. A person found the first of these five bugs. An automated scan found the other four a few days later, without guidance. The HTTP/2 flaw had been sitting in one of the most widely read codebases on the internet for eleven years.

It is the second time in a month. In October, PHP2Shell exposed flaws in the PHP engine that go back to PHP 5.4, also found with heavy use of AI. The PHP team says it has published 15 CVEs since July. Old, trusted software is being re-read by tools that do not get tired, and the pace of serious fixes is going up.

For a business, that changes patching from an occasional chore into an operating rhythm. What good looks like is not complicated:

  • An inventory. Every server and image, what runs on it, which version.
  • A named owner per layer. A person or a partner, in writing.
  • A clock. Critical fixes on internet-facing systems within two days, with someone checking that it happened.
  • A rehearsal space. A staging server where an update can break something safely.
  • A record. What was patched, when, and by whom.

Teams with those five things spent this week on a ten-minute job. Teams without them are still working out how many servers they have.

Quick answers

Do automatic security updates fix Nginx2Root?

Often not. Automatic updates install fixes from the operating system's own security repository. If Nginx was installed from nginx.org, a third-party archive, a hosting panel's own source or a Docker image, the automatic updater never looks there and someone has to update it by hand.

Which Nginx versions fix Nginx2Root?

Nginx 1.30.7 and later on the stable branch, and 1.31.9 and later on the mainline branch. Distributions such as Ubuntu and Debian may instead ship a patched build of an older version, so check their security notice. The HTTP/2 flaw has been present since HTTP/2 support was added in Nginx 1.9.5 in 2015.

Is reloading Nginx enough after the update?

No. A reload re-reads the configuration but keeps the old program running. Restart the service with sudo systemctl restart nginx so the patched version is the one serving traffic.

What if the server runs an old operating system?

Releases past their support date may have no fixed package. The nginx.org packages are no longer built for Ubuntu 20.04 and older, for example, and the newest Nginx available there, 1.27.5, is still vulnerable. Move the applications to a server on a current release.

Does disabling HTTP/2 fix it?

Only partly. Turning HTTP/2 off blocks two of the five vulnerabilities, including the most severe one. It does not address the other three, so treat it as a stopgap until the update is installed.

Sources

Version numbers, dates and commands in this article come from the primary sources below. Check them before you act, since advisories are updated.

Serhii C., Founder & CEO, Shapelab

Serhii runs Shapelab, a web and mobile development agency in Tallinn, Estonia. The team builds web products, takes them over from other teams and looks after them in production, servers included.

Your servers

Not sure who
patches yours?

Tell us what you run. You’ll get a reply within 1 business day with what we would check first and what it takes to keep it patched.

170+ projects · 100+ clients · 17+ years