SSD Nodes Learn Hosting plans →
Guides Matt ConnorBy Matt Connor

nginx advisories vs Ubuntu backported versions

nginx.org says fixed in 1.31.9+, but a patched Ubuntu 24.04 server still carries nginx 1.24.0. Compare the package version with the USN, then restart nginx.

nginx advisories on nginx.org list upstream versions, and Ubuntu's backported nginx packages do not carry those numbers. nginx.org says the NGINX2Root bugs are fixed in 1.31.9+ and 1.30.7+. A fully patched Ubuntu 24.04 server still has nginx built from 1.24.0, because Ubuntu applies the fix to the version it already shipped and raises only the packaging revision. So the number to check is the full package version, such as 1.24.0-2ubuntu7.20, and you compare it with the fixed version in the USN (Ubuntu Security Notice) for your release.

Why nginx advisories and Ubuntu versions disagree

nginx.org keeps one advisory list for the project. Each entry names a CVE (Common Vulnerabilities and Exposures) ID and two ranges of upstream versions: the versions that are vulnerable and the versions that are not. These are the five NGINX2Root bugs as nginx.org listed them on 25 November 2026:

  • CVE-2026-123007, memory corruption in HTTP/2 flow control: vulnerable 1.9.5 to 1.31.8.
  • CVE-2026-123633, use-after-free in HTTP/2: vulnerable 1.19.7 to 1.31.8.
  • CVE-2026-123634, use-after-free in the resolver: vulnerable 0.6.18 to 1.31.8.
  • CVE-2026-121810, use-after-free in HTTP/3: vulnerable 1.25.0 to 1.31.8.
  • CVE-2026-113425, use-after-free in the mail proxy: vulnerable 0.5.33 to 1.31.8.

All five are marked "Not vulnerable: 1.31.9+, 1.30.7+". Those ranges describe nginx.org's own source releases. The page says nothing about packages built by a Linux distribution.

Ubuntu works another way. Its security documentation says that Ubuntu releases receive security updates "in the form of backported patches", and that these updates do not generally add new features. The fix is taken from upstream and applied to the nginx source that the release already ships. The upstream version therefore does not move with security updates: Ubuntu 26.04 LTS stays on 1.28.3, 24.04 LTS stays on 1.24.0 and 22.04 LTS stays on 1.18.0.

Every one of those upstream numbers sits inside nginx.org's vulnerable ranges, even after the fix is installed. If you read nginx.org's page alone, every patched Ubuntu server looks vulnerable. That reading is wrong. CIRCL's technical report on NGINX2Root, TR-105, says it directly: "Distribution maintainers may backport fixes without changing the version displayed by nginx -v."

How to read an Ubuntu nginx package version

Take 1.24.0-2ubuntu7.21, the current fixed version for 24.04. The part before the hyphen, 1.24.0, is the upstream nginx release Ubuntu started from. The part after it, 2ubuntu7.21, is the packaging revision. Each security upload raises the revision. The upstream part stays the same.

You can see this across two advisories on the same release. CVE-2026-9256, a buffer overflow in the rewrite module, was fixed on 24.04 in 1.24.0-2ubuntu7.9, through USNs published in June 2026. nginx.org lists that bug as fixed in 1.31.1+ and 1.30.2+. The NGINX2Root fix in November then moved 24.04 to 1.24.0-2ubuntu7.20. Both versions are 1.24.0. Only the revision grew.

This has one practical result. Comparing 1.28.3-2ubuntu1.13 with "1.30.7+" tells you nothing, because the two numbers belong to different version lines. Compare your full installed package version with the fixed version Ubuntu published for your release. That is the only comparison that answers the question.

The fixed versions in USN-9159-1

Ubuntu published USN-9159-1, "nginx vulnerabilities", on 19 November 2026. It covers eight CVEs: the five NGINX2Root bugs plus CVE-2026-120967, CVE-2026-118899 and CVE-2026-123640. Not every CVE applies to every release. For example, the HTTP/3 bug, CVE-2026-121810, applies only to 26.04 and 26.10 in Ubuntu's notes. These are the fixed package versions for the LTS releases:

  • Ubuntu 26.04 LTS (resolute): 1.28.3-2ubuntu1.13
  • Ubuntu 24.04 LTS (noble): 1.24.0-2ubuntu7.20
  • Ubuntu 22.04 LTS (jammy): 1.18.0-6ubuntu14.23
  • Ubuntu 20.04 LTS (focal): 1.18.0-0ubuntu1.7+esm5, available only with Ubuntu Pro

For 26.04 and 24.04 the notice lists the binary packages nginx, nginx-core, nginx-dev, nginx-extras, nginx-full and nginx-light. The 22.04 list has no nginx-dev.

USN-9159-1 is no longer the newest nginx notice. USN-9182-1, "nginx vulnerabilities", published on 20 November 2026, raised every release again: 26.04 LTS to 1.28.3-2ubuntu1.14, 24.04 LTS to 1.24.0-2ubuntu7.21, 22.04 LTS to 1.18.0-6ubuntu14.24 and 20.04 LTS to 1.18.0-0ubuntu1.7+esm6, again only with Ubuntu Pro. This matters for the list above too: on 24.04, CVE-2026-123640 was fixed only in 1.24.0-2ubuntu7.21, so a 24.04 server at 7.20 is not fully patched. Compare against the newest fixed version for your release.

The notice says: "In general, a standard system update will make all the necessary changes." It says nothing about restarting nginx. That step is yours, and it is covered further down.

Check your installed nginx against the USN

First, confirm which release you are on, because each release has its own fixed version.

. /etc/os-release && echo "$VERSION_ID $VERSION_CODENAME"

The output is the version and code name, for example 24.04 noble. Use it to pick the matching line from the list above.

Next, read the installed package version.

dpkg-query -W nginx

dpkg-query -W prints one line per package: the package name and its installed version, separated by a tab. If you installed a flavour package such as nginx-full or nginx-extras, query that name too, for example dpkg-query -W nginx-full.

Then ask apt what it knows.

apt-cache policy nginx

Read the Installed: line and the Candidate: line. The first is the version on disk. The second is the version apt would install if you upgraded now. If the candidate is newer, an update is waiting. The version table below those lines shows which archive each version comes from. If your installed version does not come from an Ubuntu archive, the USN does not describe it at all. The section on other builds below covers that case.

Now compare the installed version with the USN version. Do it with dpkg, not by eye. By eye, 7.9 looks larger than 7.20, because it reads like a decimal number. dpkg compares the numeric parts as whole numbers, so it treats 9 as smaller than 20, which is correct.

dpkg --compare-versions "$(dpkg-query -W -f='${Version}' nginx)" ge 1.24.0-2ubuntu7.21 \
  && echo "at or above the USN fixed version" \
  || echo "older than the USN fixed version"

Replace 1.24.0-2ubuntu7.21 with the fixed version for your release. dpkg --compare-versions exits with 0 when the condition is true and 1 when it is false, so exactly one of the two messages prints.

If the result is "older than the USN fixed version", update the whole system:

sudo apt update && sudo apt upgrade

Ubuntu's CVE tracker gives this same command and advises against cherry-picking single packages. Run the compare command again afterwards. It should now print "at or above the USN fixed version".

Why a reload does not load the patched nginx

Installing the package puts a new binary on disk. The nginx master process that is already running keeps running the old code until something replaces it.

A reload does not do that. nginx's own control documentation says a reload (the HUP signal) starts new worker processes with the new configuration and shuts down old workers gracefully. The master process stays the same. Loading a new executable is a separate procedure, the USR2 binary upgrade. CIRCL TR-105 states the result for this advisory: "a reload does not update the running executable and old connections can persist in old workers." Xint, the team that found NGINX2Root, gives the same instruction: after installing the update, restart nginx or complete a supported live binary upgrade.

Restart nginx yourself:

sudo nginx -t && sudo systemctl restart nginx

nginx -t tests the configuration first. If the test fails, the && stops the restart, so a broken configuration file cannot take the site down. A restart stops nginx for a moment, so pick a quiet time on a busy site.

Then check the order of events:

grep ' upgrade nginx' /var/log/dpkg.log | tail -n 3
systemctl status nginx --no-pager

The first command shows when the nginx packages were upgraded. In the second, the Active: active (running) since time should be later than that upgrade. After an explicit restart it will be, and that is why the restart is the simple path: it gives you a time you can check. If dpkg.log prints nothing, the upgrade may be in an older rotated log such as /var/log/dpkg.log.1.

The same gap exists when unattended upgrades on Ubuntu install the nginx update for you overnight. The package is patched, but the process that serves traffic may not be. It is the same rule that applies to the kernel, where a patched kernel only takes effect after a reboot.

If you cannot patch yet: what disabling HTTP/2 covers

Turning HTTP/2 off is a partial stopgap. CIRCL TR-105 says disabling HTTP/2 blocks the known CVE-2026-123007 and CVE-2026-123633 paths. It does not block CVE-2026-123634 (the DNS resolver), CVE-2026-121810 (HTTP/3 and QUIC) or CVE-2026-113425 (the mail proxy). In CIRCL's words: "Merely disabling HTTP/2 is not a complete NGINX2ROOT mitigation."

The method depends on the nginx version. For nginx 1.25.1 and later, CIRCL says to use http2 off; and remove any http2 parameter from the listen directives. Ubuntu 26.04 ships 1.28.3, so this form applies there:

server {
    listen 443 ssl;
    http2 off;
    # rest of the server block unchanged
}

For versions older than 1.25.1, remove http2 from each relevant listen directive. Ubuntu 24.04 (1.24.0) and 22.04 (1.18.0) use this form:

# before
listen 443 ssl http2;
# after
listen 443 ssl;

Find every place that enables HTTP/2, then test and apply the change:

sudo grep -rn 'http2' /etc/nginx/
sudo nginx -t && sudo systemctl reload nginx

A reload applies the new configuration only to new connections. Existing HTTP/2 sessions stay with the old workers and keep using the old configuration. Check for workers shown in ps as nginx: worker process is shutting down; if they remain, run sudo nginx -t && sudo systemctl restart nginx. This disconnects existing clients, so expect a short service interruption. When you are done, the grep should print no listen lines that still carry http2. Install the real fix as soon as you can, then restart.

Ubuntu 20.04 and older: the fix is in Ubuntu Pro

Ubuntu 20.04's standard security maintenance ended in May 2025. Ubuntu's release-cycle page shows expanded security maintenance for 20.04 until May 2030, and that requires Ubuntu Pro. This is why the 20.04 line in USN-9159-1 is 1.18.0-0ubuntu1.7+esm5 and carries the note "Fix available with Ubuntu Pro". A 20.04 server without Pro will not be offered that version, so the compare command keeps printing "older than the USN fixed version".

Ubuntu Pro is free for personal use on up to 5 physical machines, according to Ubuntu's Pro page. With the Ubuntu Pro client installed, sudo pro fix CVE-2026-123007 is the command for fixing a single CVE. Ubuntu Pro on a server covers attaching a machine and what changes in apt. For comparison, standard security maintenance runs until May 2027 for 22.04, May 2029 for 24.04 and May 2031 for 26.04.

Check one CVE at a time in the Ubuntu CVE tracker

A USN groups several CVEs into one update. When you care about one CVE, open its tracker page at ubuntu.com/security/CVE-2026-123007, changing the ID as needed. The page shows a status for each Ubuntu release. The status names Ubuntu documents include "Needs evaluation", "Not affected", "Vulnerable", "Fixed", "Ignored" and "Not in release". A fixed release shows the version, such as "Fixed in 1.24.0-2ubuntu7.20".

The CVE-2026-123007 page gives it Ubuntu priority High, with the note "this is an RCE" (remote code execution). It lists the same fixed versions as the USN, and 14.04 as "Not affected".

The tracker also shows why the upstream number misleads in the other direction. nginx.org lists CVE-2026-120993, a NULL pointer dereference in PROXY protocol v2, as vulnerable in 1.31.4 to 1.31.8 and fixed in 1.31.9+. Ubuntu's tracker marks it "Not affected" on every release. Ubuntu's note explains that the code exists only in mainline 1.31.4 and later, so the 1.28, 1.24 and 1.18 packages never contained it. There is no USN for it, and none is needed. A missing fixed version in the tracker does not mean a server is unpatched.

Other nginx builds that the USN does not cover

The USN covers only nginx packages from Ubuntu's own archive. Some servers run a different build.

GitLab's Linux package (Omnibus) installs GitLab with its own bundled NGINX by default. Ubuntu's nginx update does not touch that copy. GitLab's patch release of 16 November 2026 (19.5.6, 19.4.8 and 19.3.9) updated the bundled NGINX from 1.31.4 to 1.31.7, which is still below nginx.org's 1.31.9. GitLab's patch release of 25 November 2026 updated the bundled NGINX to 1.31.9 in 19.6.2, 19.5.9 and 19.4.11, including the GitLab Docker images built from those packages. GitLab documents sudo gitlab-ctl restart nginx for restarting its NGINX, and its NGINX settings page explains how the bundled copy is run. NGINX2Root and GitLab's bundled nginx covers this case in full.

If you installed nginx from nginx.org's own packages or built it from source, the Ubuntu USN does not apply either. Those builds carry the code of the upstream version they report, so read nginx.org's ranges against them directly. nginx inside a container image is a separate build again: follow the advisories of whoever publishes that image.

Use the same method for the next nginx advisory

NGINX2Root is one wave. The fixed versions move with each new one. nginx.org's newest entry, CVE-2026-132779 (excessive CPU usage in TLS 1.3 with ssl_early_data), is fixed in 1.31.10+ and 1.30.8+. Do not memorise 1.31.9 as a safe floor. Repeat the method each time:

  1. Read the nginx.org entry to learn which features are involved and which upstream versions are affected.
  2. Open the Ubuntu CVE tracker page for that CVE. Check the status for your release, and the USN it links to.
  3. Compare your installed package version with the USN's fixed version using dpkg --compare-versions.
  4. Upgrade with sudo apt update && sudo apt upgrade, then restart nginx and confirm the restart time is after the upgrade.

For CVE-2026-132779, open ubuntu.com/security/CVE-2026-132779 and read the status for your release yourself. Do not assume it matches the NGINX2Root fix. To run the same check across every package on a server, not only nginx, see how to check your server for known CVEs.

FAQ

Why does my fully patched Ubuntu server still show an old nginx version?

Ubuntu backports security fixes into the nginx version it shipped with the release, and keeps the upstream number. Only the packaging revision changes. On 24.04 the upstream part stays 1.24.0, and the NGINX2Root fix is the revision 2ubuntu7.20. Check the full version with dpkg-query -W nginx and compare it with the fixed version in the USN for your release.

Is my server vulnerable if nginx -v shows a version that nginx.org lists as vulnerable?

Not necessarily. nginx.org's ranges describe its own source releases, and distribution maintainers may backport fixes without changing the version nginx -v displays. On an Ubuntu package, the answer comes from comparing the installed package version with the USN fixed version, for example with dpkg --compare-versions. A build from nginx.org's packages or from source is different: there, nginx.org's ranges apply directly.

Do I need to restart nginx after apt upgrade installs a security fix?

Yes, restart it yourself. A reload starts new workers with a new configuration but does not load a new executable, and old connections can stay on old workers. Run sudo nginx -t && sudo systemctl restart nginx, then check that the since time in systemctl status nginx is later than the upgrade time in /var/log/dpkg.log.

Does Ubuntu's nginx security update fix GitLab's bundled nginx?

No. GitLab's Linux package ships its own NGINX build, and Ubuntu's USN covers only Ubuntu's nginx packages. Update GitLab itself to a release whose bundled NGINX includes the fix, then restart it with sudo gitlab-ctl restart nginx. GitLab's release notes say which NGINX version each release bundles.

Was this article useful?