If you host Laravel apps on servers provisioned by Laravel Forge, there is one job to do this week: update Nginx by hand. On 18 November 2026 the Nginx team fixed a group of vulnerabilities known as “Nginx to Root” (NGINX2Root), and Forge has published a security advisory explaining that its automatic security updates do not patch Nginx.
This guide walks you through checking every server, switching old servers to the official Nginx repository, upgrading safely, and confirming the fix, using the commands from the Forge advisory.
What NGINX2Root is
The Forge advisory lists five CVEs under the NGINX2Root name: CVE-2026-123007, CVE-2026-123634, CVE-2026-123633, CVE-2026-121810 and CVE-2026-113425. The most severe one lets an unauthenticated remote attacker execute commands on your server over HTTP/2, which is usually enabled on HTTPS sites. The researchers also showed that this can be chained with a separate Linux kernel bug to get root.
The official nginx security advisories page describes them as:
| CVE | Issue | Severity |
|---|---|---|
| CVE-2026-123007 | Memory corruption in HTTP/2 flow control | Major |
| CVE-2026-113425 | Use-after-free in mail proxy module | Major |
| CVE-2026-123633 | Use-after-free in HTTP/2 | Medium |
| CVE-2026-123634 | Use-after-free during response processing in resolver | Medium |
| CVE-2026-121810 | Use-after-free in HTTP/3 | Medium |
The same release also fixed several other nginx issues, so patching is worthwhile even if you don’t use HTTP/3 or the mail module.
Fixed versions
| Branch | Fixed in |
|---|---|
| Stable | 1.30.7 and later |
| Mainline | 1.31.9 and later |
The HTTP/2 flaw goes back to nginx 1.9.5 (2015), so Forge says to assume every server is vulnerable until you have checked.
Why Forge doesn’t patch this for you
Forge installs Nginx from a dedicated package repository. Ubuntu’s unattended upgrades only install updates from Ubuntu’s own security repository, so a new nginx package is never picked up automatically. The Forge service itself has been patched; your servers have not.
Where Nginx came from depends on when the server was provisioned:
| Provisioned | Nginx source |
|---|---|
| After about 27 April 2026 | nginx.org (official packages) |
| Before about 27 April 2026 | Ondřej Surý’s ondrej/nginx PPA |
The ondrej/nginx PPA has been removed from Launchpad, so older servers cannot get the fixed version until you move them to nginx.org.
Ubuntu 20.04 and older cannot be patched. Forge notes that nginx.org no longer builds packages for Ubuntu 20.04, 18.04, 16.04 or 14.04. On 20.04 the newest available version is 1.27.5, which is still vulnerable. Plan to move those apps to a new server on Ubuntu 22.04 or later (Forge suggests 26.04).
Step 1: Check the Nginx version
SSH into the server (as the forge user, or whichever sudo user you use) and run:
nginx -v
grep -rs "nginx.org/packages" /etc/apt/sources.list /etc/apt/sources.list.d/
If nginx -v shows 1.30.7 or later on stable, or 1.31.9 or later on mainline, that server is already patched.
Check many servers at once
If you manage several Forge servers, a short loop saves time. Put your hostnames in a file and run:
#!/usr/bin/env bash
# check-nginx.sh - print the nginx version and package source for each host
while read -r host; do
[ -z "$host" ] && continue
echo "== $host"
ssh -o BatchMode=yes "forge@$host" \
'nginx -v 2>&1; dpkg-query -W -f="${Version} ${Maintainer}\n" nginx; lsb_release -ds' \
< /dev/null
done < servers.txt
nginx -v prints to stderr, which is why the command redirects 2>&1. The < /dev/null stops ssh from swallowing the rest of servers.txt.
Step 2: Find out where Nginx was installed from
dpkg-query -W -f='${Version} ${Maintainer}\n' nginx
- If the output contains
NGINX Packaging <[email protected]>, the package already comes from nginx.org. Skip to Step 4. - If it contains
Ubuntuorsury.org, continue with Step 3.
Step 3: Switch to the nginx.org repository
Run these in order. Forge warns not to use add-apt-repository --remove for the old PPA, because it fails now that Launchpad has removed it.
# Remove the old Ondřej PPA
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
The pin file makes apt prefer the nginx.org package over Ubuntu’s own nginx package, which would otherwise be a lower version.
Step 4: Install the update
sudo apt-get update
sudo apt-get install --only-upgrade -o Dpkg::Options::=--force-confold nginx
--only-upgrademakes sure nothing new gets installed.--force-confoldkeeps your existing configuration files, including the site configs Forge generated.
Accept the defaults if needrestart asks which services to restart.
Step 5: Verify and restart
nginx -v
sudo nginx -t
nginx -t should report that the configuration syntax is OK and the test is successful. Forge says warnings like listen ... http2 is deprecated are harmless.
Then restart. This is the step people miss: a reload does not load the new binary.
sudo systemctl restart nginx
systemctl status nginx --no-pager
Finally, check your app from outside, for example curl -I https://your-app.test (use your real domain), and confirm you still get the expected status code and certificate.
Edge cases from the advisory
- Missing modules. When you switch from the Ondřej PPA, its module packages (
brotli,geoip,image-filter,xsltandssl-ct) are removed. Thestreamandmailmodules are built into nginx.org packages. If Nginx won’t start, remove theload_modulelines for missing modules from/etc/nginx/nginx.confand/etc/nginx/modules-enabled. - New default server. The nginx.org package adds
/etc/nginx/conf.d/default.conf. Check that your own default server still wins, or a request with an unknownHostheader might land on the wrong site. - apt is locked. Another package job is running. Wait a few minutes and try again.
If you can’t upgrade today
As a temporary measure, Forge suggests disabling HTTP/2 in your sites’ Nginx configuration. This blocks the HTTP/2 attack path but not the other vulnerabilities, so it is only a stopgap. In a Forge site config that usually means removing http2 from the listen 443 ssl line or setting http2 off; in the server block, followed by sudo nginx -t and a restart.
Don’t forget the kernel
Patching Nginx closes the way in, but the root escalation uses a separate kernel bug, which is tracked separately. Forge recommends keeping automatic security updates turned on and rebooting once the kernel fix is released. Add a reminder to check:
# Is a reboot pending after updates?
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required
uname -r
A quick checklist for each Forge server
nginx -v: patched (≥ 1.30.7 stable / ≥ 1.31.9 mainline)? Stop here.dpkg-query: PPA or Ubuntu package? Switch to nginx.org.- Ubuntu 20.04 or older? Plan a migration; it cannot be patched.
- Upgrade with
--only-upgradeand--force-confold. nginx -t, thensystemctl restart nginx(not reload).- Test the site over HTTPS.
- Reboot when the kernel patch arrives.
Takeaway
NGINX2Root is a reminder that “managed” doesn’t mean every package is updated for you. On Forge, Nginx comes from its own repository, so Ubuntu’s unattended upgrades won’t fix it. Spend ten minutes per server: check the version, move older servers off the removed PPA, upgrade, test the config and restart. Then put any Ubuntu 20.04 boxes on your migration list, because they cannot be patched.
