Patch Nginx: Check Your Version and Update to 1.30.8
nginx shipped two security releases in five days. Check your version and source, test for ssl_early_data, update to 1.30.8, then reload and verify it safely.
The short answer
Update nginx to 1.30.8 stable or 1.31.10 mainline, released on 23 November 2026, which also include the ten fixes from 18 November. Check your build with nginx -v and your package source with apt-cache policy nginx or rpm -q nginx. If you cannot update today, keep ssl_early_data off, which is already the default. Test with nginx -t, reload, and confirm the running version with a header check.
Reading options
On this page
If your server runs nginx, update it to 1.30.8 (stable) or 1.31.10 (mainline) this week. The nginx project shipped two security releases in five days: on 18 November 2026 it fixed ten vulnerabilities, and on 23 November 2026 it fixed one more, an excessive CPU bug tied to the ssl_early_data setting (CVE-2026-132779).
By the end of this guide you will know which nginx you run and where it came from, whether the newest flaw touches your config, how to update and reload without taking your sites down, and how to prove the fix is live.
What nginx does on your server
nginx (say "engine x") is the web server and reverse proxy sitting in front of your sites. A reverse proxy is a program that takes requests from visitors and passes them to your app, such as PHP or Node.js, then sends the answers back.
Think of it as the front desk of a busy clinic. Every patient walks past it, so if the front desk has a weak lock, it does not matter how good the doctors are. That is why you want the fixed build.
Before you start
Have these ready:
- SSH access to the server, with a user that can run
sudo. - A backup of your nginx config directory (Step 3 shows the exact command).
- A quiet maintenance window, when few visitors are on your sites.
- A second SSH session left open, so you still have a way in if something goes sideways.
Quick tip: if your host manages the server for you (managed VPS or shared hosting), you probably cannot update nginx yourself. Send them the message at the end of this post and ask which version they run.
Know what was fixed
At the time of writing (27 November 2026), the nginx news page lists these recent security releases:
- 23 November 2026: nginx 1.30.8 stable and 1.31.10 mainline, fixing excessive CPU usage when
ssl_early_datais used (CVE-2026-132779). - 18 November 2026: nginx 1.30.7 stable and 1.31.9 mainline, fixing ten issues, including use-after-free bugs in the resolver, HTTP/2, HTTP/3 and the mail proxy, memory corruption in HTTP/2 flow control (CVE-2026-123007), an infinite loop while reading a request body over TLS 1.3, a NULL pointer dereference with PROXY protocol version 2, a buffer overflow when
aliasis used withtry_files, and two issues in the stream module. - 14 October 2026: nginx 1.30.6 stable and 1.31.7 mainline, with five earlier fixes.
A use-after-free is a bug where the program keeps using memory it already handed back. You do not need to memorise the list. You need to know your version.
The official security advisories page lists the affected ranges. Here are a few, copied from that page today:
ssl_early_dataCPU issue: vulnerable 1.21.4 to 1.31.9, fixed in 1.31.10 and 1.30.8.- HTTP/2 flow control memory corruption: vulnerable 1.9.5 to 1.31.8, fixed in 1.31.9 and 1.30.7.
- HTTP/3 use-after-free: vulnerable 1.25.0 to 1.31.8, fixed in 1.31.9 and 1.30.7.
- PROXY protocol version 2 NULL dereference: vulnerable 1.31.4 to 1.31.8, so only those mainline builds were affected, fixed in 1.31.9.
Why this matters: the HTTP/2 range starts at 1.9.5. If you have an old VPS that nobody has touched in years, it is very likely inside at least one of these ranges, unless its distribution backported the fixes (more on that below).
Here, stable means the 1.30 branch and mainline means the 1.31 branch. Both received fixes, so whichever you follow, there is a patched build for you.
Check what you run and where it came from
Step 1: Check which nginx you run
This command prints the version of the nginx program installed on disk.
nginx -vYou should see one line that includes the version number. If you get "command not found", try sudo nginx -v or /usr/sbin/nginx -v, because some systems keep it outside your normal path.
Step 2: Find out which repository it came from
nginx can come from your Linux distribution (Ubuntu, Debian, AlmaLinux and so on), from the official nginx.org repository, or from a manual build. The update path is different for each.
On Debian or Ubuntu, this command shows the installed package and its version.
dpkg -l nginxYou should see a line starting with ii followed by the package name and its version string.
This next command is clearer, because it shows where apt fetches nginx from and which source wins.
apt-cache policy nginxLook at the Installed: and Candidate: lines and the repository URLs below them. If you see nginx.org/packages, you are on the official nginx repo. Otherwise you are on the distro build.
On RHEL, AlmaLinux, Rocky Linux and similar systems, this command shows the installed package.
rpm -q nginxYou should see the package name with its version and release, or a message that the package is not installed.
Heads up: if dpkg -l nginx and rpm -q nginx both say the package is not installed, but nginx -v works, someone compiled nginx by hand. Ask whoever built it to rebuild from the official 1.30.8 source, or move to a package.
Distro builds can be patched without the version changing. Debian's security FAQ explains that they backport security fixes into the version that shipped with the release instead of moving to a new upstream version. So a distro nginx might still say 1.22 or 1.24 and be patched, or might not be patched yet. You check that through your distribution's security tracker or the package changelog, which Step 6 covers.
Check whether the newest flaw touches you
Step 3: Back up your config first
Before you touch anything, make a dated copy of the config directory. On most package installs it lives in /etc/nginx, and this command copies it with permissions intact.
sudo cp -a /etc/nginx /etc/nginx.bak-$(date +%F)You will not see any output. Run ls -d /etc/nginx.bak-* and you should see a folder such as /etc/nginx.bak-2026-11-27.
Step 4: Dump the full config and search for early data
TLS 1.3 early data (sometimes called 0-RTT) lets a returning visitor send a request before the encrypted handshake fully finishes. It saves a tiny bit of time. The nginx docs say ssl_early_data is off by default, applies to TLS 1.3, and warn that requests sent in early data are subject to replay attacks, meaning someone could resend a captured request.
The -T switch tests your config and prints every config file nginx loads, including all include files, so you search everything at once. This command dumps it and keeps any line that mentions early data, with its line number.
sudo nginx -T 2>/dev/null | grep -n "ssl_early_data"If nothing is printed, the directive is not set anywhere, so it sits at its default of off. If you see ssl_early_data on;, find the file that holds it with sudo grep -rn ssl_early_data /etc/nginx.
Here is how to read the result carefully:
- No matching lines: you are not using early data, so CVE-2026-132779 does not apply to your current config. You still need the 18 November fixes, so keep going.
- Only
ssl_early_data off;: same as above, you are not exposed to this one. - Any
ssl_early_data on;in any server block: treat yourself as exposed until you are on 1.30.8 or 1.31.10. - A line that starts with
#, such as# ssl_early_data on;: that is a comment, and nginx ignores it. - A line with
$ssl_early_data, for example insideproxy_set_header: that is a variable your config reads, not the directive itself, so check the other matches.
Why this matters: the docs note that when the directive is set at the server level, the value from the default server can be used. So one on in one site can matter for others sharing the same address and port. Do not stop after checking only your main site file.
Step 5: The interim workaround if you cannot update today
If you found ssl_early_data on; and cannot update right now, switch it off. Open the file that holds the match from Step 4 and change the line to this.
ssl_early_data off;Save the file. You will apply it with the test and reload in Step 8.
Most small sites will never notice early data is gone. Then update as soon as you can, because the switch only protects you from this one flaw, and the ten fixes from 18 November still need the new build.
Made-up example: Sana runs a small online shop on a VPS. Her developer turned on ssl_early_data two years ago after reading a speed tips article. The grep finds it in /etc/nginx/conf.d/shop.conf. She sets it to off, tests, reloads, and schedules the real update for that night. Nothing breaks, and the shop keeps taking orders.
Update nginx
Step 6: Update a distribution build
If Step 2 showed a distribution package, these two commands refresh the package lists and install the newest nginx your distribution offers.
sudo apt update
sudo apt install nginxYou should see apt either upgrade nginx or tell you it is already the newest version. Both are possible on a patched system, because of the backporting point above.
To see whether your distribution has packaged the fix, this command shows the package changelog for the installed version.
apt-get changelog nginxLook near the top for the CVE numbers, such as CVE-2026-132779 or CVE-2026-123007. If they are not listed yet, your distribution may not have shipped the fix. In that case, use the workaround in Step 5 and check again in a day or two, or move to the nginx.org repo in Step 7.
On the RHEL family, sudo yum install nginx installs or updates nginx from whichever enabled repository wins, so the same check applies.
Step 7: Update from the official nginx.org repository
If apt-cache policy nginx already shows nginx.org/packages, you have the repo set up and only need the same two commands.
sudo apt update
sudo apt install nginxYou should see nginx upgrade to 1.30.8 on the stable repo, which the official page says is the default, or 1.31.10 if you chose the separate mainline repo.
If you want to move from the distribution build to nginx.org, follow the official Linux packages page for your system. It covers Debian, Ubuntu, RHEL and derivatives, SLES, Alpine and Amazon Linux. On Ubuntu, the steps are: install the prerequisites, import the signing key, check the fingerprint, add the repo, and set up pinning.
The pinning step is the one people skip. This command, copied from the official page, tells apt to prefer nginx.org packages over the distribution's.
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginxYou should see the pinning text echoed back on screen. After sudo apt update, apt-cache policy nginx should list the nginx.org version as the candidate.
Heads up: switching from a distribution build to the nginx.org build is a bigger change than an update. The packages are built differently, and the nginx.org page notes that some modules, such as nginx-module-njs, ship as separate packages. Try the switch on a test server first, with the backup from Step 3 ready.
Step 8: Test the config, then reload
This command tests your config. The docs say it checks syntax and then tries to open the files the config refers to.
sudo nginx -tYou should see messages that the syntax check and the test both passed. If you see an error message instead, stop and read the Troubleshooting section before going further.
Once the test passes, this command asks nginx to reload its configuration.
sudo systemctl reload nginxNo output means it went through. A reload is gentle: the nginx control docs say the master process first checks the syntax, then tries to apply the new config, and if that fails it rolls back and keeps working with the old config. Old worker processes finish serving their visitors before they shut down.
If your server does not use systemd, sudo nginx -s reload sends the same reload signal.
Step 9: Make sure the new program is actually running
A reload re-reads the config, but it does not swap the nginx program itself. The control docs describe a separate on-the-fly binary upgrade using the USR2, WINCH and QUIT signals for that.
Package installs often handle the switch for you. To be sure, check the running version in the next section. If it still shows the old number, this command restarts nginx cleanly with the new program.
sudo systemctl restart nginxYou should get your prompt back with no output. A restart drops open connections for a moment, which is why you do it in your quiet window.
How to check it worked
First, this command confirms the installed program on disk is the new one.
nginx -vYou should see a line showing version 1.30.8 or 1.31.10. A distribution build may show an older number with the fix backported, so confirm that with the changelog from Step 6.
Next, this command fetches only the response headers from your live site, which shows what the running server reports.
curl -sI https://example.com | grep -i "^server"You should see 1.30.8 (or 1.31.10) in the Server header. The nginx docs say server_tokens is on by default and controls whether the version appears in the Server header and on error pages. If you set server_tokens off;, the header will not show a version number, and you should trust nginx -v plus the restart instead.
If your site sits behind a CDN or another proxy, the Server header may come from that service, not your nginx. Run the check against the server directly, for example curl -sI http://127.0.0.1 from the server itself.
Finally, rerun the Step 4 check if you changed that setting, and load a few real pages in a browser. To confirm your TLS 1.3 handshake still looks right, see our guide to checking and enabling TLS 1.3 on Apache and nginx.
Troubleshooting
Config test fails with a duplicate directive
Symptom: sudo nginx -t reports that the ssl_early_data directive is duplicate, with a file name and line number.
Cause: the same directive appears twice in one block, often because you added a new line instead of editing the old one.
Fix: open the file at the line number shown, delete one of the two lines, and run sudo nginx -t again.
The update keeps installing the old distribution package
Symptom: apt-cache policy nginx shows your distribution's version as Candidate: even after you added the nginx.org repo.
Cause: the pinning file is missing or wrong, or you did not run sudo apt update after adding the repo.
Fix: check that /etc/apt/preferences.d/99nginx exists and contains Pin-Priority: 900, check that /etc/apt/sources.list.d/nginx.list holds the repo line from the official page, then run sudo apt update and look at apt-cache policy nginx again.
The grep finds nothing, but you are sure early data is on
Symptom: the Step 4 command shows no early data line, or no output at all.
Cause: you are looking at a different nginx than the one serving traffic, for example a second install or a container, or you ran nginx -T without sudo and it could not read the config.
Fix: run the command with sudo and without hiding errors (sudo nginx -T | less) so you can see any permission messages, and check that the config files in the dump belong to the server you expect. If nginx runs in Docker, run the command inside the container.
Reload ran, but your change did not take effect
Symptom: sudo systemctl reload nginx gave no error, but the site behaves as before.
Cause: either the reload failed and nginx kept the old config, as the control docs describe, or you edited a file that is not included in the loaded config.
Fix: run sudo nginx -t to see any error, then check your error log (often /var/log/nginx/error.log) or sudo journalctl -u nginx for the reload attempt. Confirm the file you edited appears in the sudo nginx -T output.
The Server header still shows the old version
Symptom: nginx -v says 1.30.8, but curl -sI still shows an older version number.
Cause: the old nginx program is still running, because a reload does not replace the binary.
Fix: run sudo systemctl restart nginx in your quiet window and check again.
The server will not start after the update
Symptom: systemctl status nginx shows failed, and your sites are down.
Cause: usually a config that suits the old package layout, or a module that now ships as a separate package.
Fix: run sudo nginx -t and read the exact error line. If it mentions a missing module, install that module package from the same repo. If you are stuck, restore your config with the commands below and start nginx again.
This pair of commands moves the broken config aside and puts your dated backup back (change the date to match your backup folder).
sudo mv /etc/nginx /etc/nginx.broken
sudo cp -a /etc/nginx.bak-2026-11-27 /etc/nginxAfter this, sudo nginx -t should pass again and sudo systemctl start nginx should bring your sites back. Do not roll the package back to an old version, because that reopens the holes you just closed.
Pro tips and security notes
- Keep one test server or a snapshot, and update there first. Our guide to choosing a VPS plan for your workload can help you size a small test box.
- Only turn
ssl_early_dataon if your app is built to handle replayed requests. The docs suggest passing$ssl_early_datato the backend so the app can tell, and most small sites are better off leaving it at the default. - Patching nginx is one layer. If your SSH is still open to the whole internet with password logins, look at Fail2ban for SSH protection next.
The one message worth forwarding
If someone else runs your server, copy this and send it to your host or developer:
Hi, nginx released security updates on 18 Nov 2026 (1.30.7 / 1.31.9) and 23 Nov 2026 (1.30.8 / 1.31.10, CVE-2026-132779). Could you please tell me which nginx version and package source our server uses, confirm it is updated to 1.30.8 or 1.31.10 (or that the distro package includes these fixes), and confirm whether ssl_early_data is on anywhere in our config? A config backup before the change would be great. Thank you.The takeaway: run nginx -v, update to 1.30.8 or 1.31.10, test with nginx -t, and keep ssl_early_data off until you do.
Reader questions
What is the difference between nginx stable and mainline?
In this release cycle the 1.30 branch is stable and the 1.31 branch is mainline. Both got the November 2026 security fixes, so pick the patched build on the branch you already follow.
Is ssl_early_data turned on by default in nginx?
No. The official nginx documentation lists the default as off, so it is only enabled if someone added it to your configuration.
Do I need to restart nginx after updating the package?
A reload only rereads the configuration and does not swap the running program. If the Server header still shows the old version after the update, restart nginx in a quiet window.
My Ubuntu or Debian nginx still shows an old version number. Am I vulnerable?
Not necessarily. Debian backports security fixes into the version shipped with a release, so read the package changelog or your distribution's security tracker for the CVE numbers.
Will turning off ssl_early_data break my website?
It should not. Off is the documented default, and switching it off only stops TLS 1.3 early data, so visitors keep connecting over HTTPS as usual.
I am on shared or managed hosting. What should I do?
You usually cannot update nginx yourself. Ask your host which nginx version and package source your server uses and whether the November 2026 fixes are applied.
Does this nginx update affect Apache servers?
No. These advisories cover nginx only, though servers that run nginx in front of Apache as a proxy still need the nginx update.
Was this guide helpful?
Help us make the next update better.
Sources & further reading
Originally published . About our editorial updates.



