Understanding the November 2026 nginx Vulnerabilities
Critical vs High-Severity Issues
The 10 CVEs break into three critical and seven high-severity issues. The critical set comprises CVE-2026-123007 (HTTP/2 memory corruption during header processing), CVE-2026-121810 (HTTP/3 use-after-free in QUIC stream handling), and CVE-2026-125283 (buffer overflow when alias and try_files directives interact). All three allow remote code execution without authentication if the vulnerable module is compiled in and the directive pattern is present. The high-severity group includes CVE-2026-123634 (resolver use-after-free during concurrent queries), CVE-2026-123633 (HTTP/2 use-after-free in push promise handling), CVE-2026-118899 (TLS 1.3 infinite loop on malformed session tickets), CVE-2026-113425 (mail proxy use-after-free), CVE-2026-120993 (PROXY protocol NULL pointer dereference), CVE-2026-120967 (stream module SNI hostname validation bypass), and CVE-2026-123640 (ssl_preread directive validation error). These require specific configurations or protocol features to trigger but still pose significant risk on affected servers.
Module-Specific Attack Vectors
Check which modules your nginx binary includes with nginx -V and look for the relevant compile flags:
nginx -V 2>&1 | grep -o -- '--with-[^ ]*'
CVE-2026-123007 and CVE-2026-123633 require --with-http_v2_module. CVE-2026-121810 requires --with-http_v3_module (mainline only; stable 1.30.x does not support HTTP/3). CVE-2026-118899 affects any server with ssl_session_tickets on; when compiled against OpenSSL 1.1.1 or 3.x. CVE-2026-125283 requires both an alias directive and try_files in the same location block. CVE-2026-113425 affects --with-mail or --with-mail_ssl_module. CVE-2026-120993 affects servers using set_real_ip_from with the PROXY protocol. CVE-2026-120967 and CVE-2026-123640 require --with-stream and --with-stream_ssl_preread_module. If a module is not compiled in, the associated CVE does not apply to your installation.
Version Ranges Affected
| CVE | Module | Exploitability | Fixed in Stable | Fixed in Mainline |
|---|---|---|---|---|
| CVE-2026-123634 | resolver | Remote, requires resolver directive | 1.30.7 | 1.31.9 |
| CVE-2026-123007 | HTTP/2 | Remote, default on port 443 | 1.30.7 | 1.31.9 |
| CVE-2026-121810 | HTTP/3 | Remote, mainline only | N/A | 1.31.9 |
| CVE-2026-123633 | HTTP/2 | Remote, requires push | 1.30.7 | 1.31.9 |
| CVE-2026-118899 | TLS 1.3 | Remote DoS | 1.30.7 | 1.31.9 |
| CVE-2026-113425 | Remote, mail proxy only | 1.30.7 | 1.31.9 | |
| CVE-2026-120993 | PROXY protocol | Remote, requires proxy_protocol | 1.30.7 | 1.31.9 |
| CVE-2026-125283 | alias + try_files | Remote, specific config pattern | 1.30.7 | 1.31.9 |
| CVE-2026-120967 | stream SNI | Remote, stream + SSL | 1.30.7 | 1.31.9 |
| CVE-2026-123640 | ssl_preread | Remote, stream + ssl_preread | 1.30.7 | 1.31.9 |
All versions of nginx 1.30.0 through 1.30.6 and 1.31.0 through 1.31.8 are affected by at least one CVE depending on compiled modules. Check the official nginx security advisories for the complete timeline and vendor acknowledgments.
Pre-Upgrade Assessment and Backup
Identifying Your nginx Build and Modules
Start with nginx -v to see the version string, then nginx -V to list all compile-time options. Grep for specific modules if the output is long:
nginx -V 2>&1 | grep -- --with-http_v2_module
nginx -V 2>&1 | grep -- --with-stream
For dynamically loaded modules, check the load_module directives in your config and verify the .so files exist. Run ldd $(which nginx) to see linked libraries, particularly OpenSSL version, since CVE-2026-118899 depends on OpenSSL 1.1.1 or later. If you see libssl.so.1.1 or libssl.so.3, TLS 1.3 is available and the infinite loop vulnerability applies.
Configuration Syntax Check and Backup
Dump the entire running configuration including all included files:
nginx -T > /root/nginx-config-backup-$(date +%Y%m%d).conf
Run nginx -t to verify the current configuration has no syntax errors. If you see warnings about deprecated directives or TLS versions, note them for review after the upgrade. Third-party modules like ModSecurity, njs, or Lua require version compatibility checks. For njs, confirm the new nginx version supports your njs release on the nginx documentation site. For commercial modules, check the vendor's compatibility matrix before upgrading.
Testing in Staging
Deploy the same nginx version to a staging server or container with an identical configuration. Run your application's integration tests and load tests against the staging instance. Pay attention to any third-party module behavior changes, especially around request parsing or SSL handshake logic. If you lack a staging environment, consider spinning up a Docker container with your production config and testing basic request flows. Our Docker Security & Production Hardening guide covers isolated test setups. Only proceed to production after confirming the new version handles your traffic patterns without errors in the error log.
Upgrading Package-Based Installations
Debian and Ubuntu APT Upgrade
If you installed nginx from the official nginx.org repository, update the package index and check the available version:
apt-get update
apt-cache policy nginx
The output should show Candidate: 1.30.7-1~bookworm or 1.31.9-1~bookworm depending on your configured repository. Install only the nginx package upgrade:
apt-get install --only-upgrade nginx
After installation completes, restart the service to load the new binary. A reload only reloads configuration; the old binary keeps running until you restart:
systemctl restart nginx
Verify the new version with nginx -v and check the process start time with systemctl status nginx. The "Active: active (running) since" line should show a timestamp matching your upgrade time.
RHEL, CentOS, Rocky and AlmaLinux DNF/YUM Upgrade
For systems using the nginx.org repository on RHEL-based distributions, check for updates:
dnf check-update nginx
If nginx-1.30.7 or nginx-1.31.9 appears, upgrade it:
dnf upgrade nginx
On CentOS 7 or older RHEL systems still using yum, substitute yum for dnf. After the package installs, restart nginx to replace the running binary:
systemctl restart nginx
Check the version and service status as above. If you need help setting up nginx on AlmaLinux with PHP-FPM, see our AlmaLinux 9 + NGINX + PHP-FPM guide for a complete stack deployment.
Post-Install Version Verification
Run nginx -v and confirm the output shows nginx/1.30.7 or nginx/1.31.9. If the version still shows the old release, the service may have been reloaded instead of restarted. Check running processes:
ps aux | grep nginx | grep -v grep
The master process should have a start time matching your restart command. If the PID and start time are old, run systemctl restart nginx explicitly and verify again. Some distributions' post-install scripts trigger a reload by default, which does not replace the binary. After confirming the new version is running, tail the error log for a few minutes to catch any startup issues:
tail -f /var/log/nginx/error.log
Upgrading Source-Compiled nginx
Download and Verify New Tarball
Download the 1.30.7 or 1.31.9 tarball and its PGP signature from nginx.org:
cd /usr/local/src
wget https://nginx.org/download/nginx-1.30.7.tar.gz
wget https://nginx.org/download/nginx-1.30.7.tar.gz.asc
Import the nginx signing key if you have not already done so. The key fingerprint is available on the nginx download page. Verify the signature:
gpg --verify nginx-1.30.7.tar.gz.asc nginx-1.30.7.tar.gz
You should see "Good signature from" and the signer's name. If gpg complains about an untrusted key, verify the fingerprint matches the official one published on nginx.org. A bad signature means the tarball was tampered with or corrupted during download; do not proceed. Extract the tarball only after signature verification passes:
tar -xzf nginx-1.30.7.tar.gz
cd nginx-1.30.7
Recompile with Existing Configure Flags
Retrieve the exact configure arguments from your running nginx binary:
nginx -V 2>&1 | grep 'configure arguments:'
Copy the entire line after "configure arguments:" and paste it into your shell preceded by ./configure. For example, if the output shows --prefix=/etc/nginx --with-http_ssl_module --with-http_v2_module, run:
./configure --prefix=/etc/nginx --with-http_ssl_module --with-http_v2_module
Ensure all dependencies like PCRE, zlib and OpenSSL development headers are installed. The configure script will fail with clear error messages if anything is missing. After configure completes, compile the new binary:
make
Do not run make install yet. Test the new binary first with objs/nginx -t -c /etc/nginx/nginx.conf to verify it can parse your production configuration. If the syntax check passes, back up the current binary and install the new one:
cp /usr/sbin/nginx /usr/sbin/nginx.old
make install
Binary Upgrade Without Downtime
nginx supports on-the-fly binary replacement using signals. Send USR2 to the old master process, which starts a new master with the new binary while old workers continue serving requests:
kill -USR2 $(cat /var/run/nginx.pid)
Check that both old and new masters are running:
ps aux | grep nginx | grep master
You should see two master processes. The new master writes its PID to /var/run/nginx.pid.oldbin. Once you confirm the new master started, send WINCH to the old master PID (not the PID file, which now points to the new master) to gracefully shut down old workers:
kill -WINCH <old_master_pid>
Old workers finish their active connections and exit. Monitor active connections with ss -tan | grep :80 | grep ESTABLISHED | wc -l until the count drops to zero or stabilizes at long-lived connections. After verifying the new workers handle traffic correctly, send QUIT to the old master to terminate it:
kill -QUIT <old_master_pid>
If issues arise during the upgrade, you can revert by sending HUP to the old master (before you QUIT it) to respawn old workers and then QUIT the new master. Full details on signal-based control are in the nginx control documentation.
Zero-Downtime Deployment in Load-Balanced Environments
Rolling Update Behind HAProxy or AWS ALB
If nginx sits behind a load balancer, upgrade one backend server at a time. For HAProxy, set the backend server to drain mode so new connections go to other servers while existing connections finish:
echo 'set server backend1/server1 state drain' | socat stdio /var/run/haproxy.sock
Check the HAProxy stats page or run echo 'show stat' | socat stdio /var/run/haproxy.sock | grep server1 to confirm active sessions drop to zero. Once drained, upgrade nginx on that server using the package or source method above, then set the server back to ready:
echo 'set server backend1/server1 state ready' | socat stdio /var/run/haproxy.sock
For AWS Application Load Balancer, enable connection draining on the target group (default 300 seconds). Deregister the target, wait for the draining timeout or until active connections reach zero in the ALB console, upgrade nginx, re-register the target, and wait for health checks to pass. Monitor active connections on the nginx server itself with:
ss -tan | grep :80 | grep ESTABLISHED | wc -l
Repeat the process for each backend server. Keep at least half your fleet running the old version until you confirm the new version handles production traffic without errors.
Health Check Validation Between Nodes
After upgrading each server, verify the load balancer's health checks pass before moving to the next node. For HAProxy, confirm the server shows UP in the stats interface. For AWS ALB, check the target health status in the EC2 console or with the AWS CLI:
aws elbv2 describe-target-health --target-group-arn arn:aws:elasticloadbalancing:...
The TargetHealth State should be "healthy". If a health check fails, investigate the nginx error log on that server immediately. Common issues include misconfigured health check endpoints, SSL certificate problems after recompilation, or third-party module incompatibilities. Do not proceed to the next server until the upgraded server passes health checks and handles real traffic for at least 5-10 minutes without errors.
Rollback Procedure
If the new version causes issues, roll back immediately. For package installations, install the previous version explicitly:
apt-get install nginx=1.30.6-1~bookworm
Or on RHEL-based systems:
dnf downgrade nginx-1.30.6
Then restart nginx. For source-compiled installs, restore the backed-up binary:
cp /usr/sbin/nginx.old /usr/sbin/nginx
systemctl restart nginx
In a load-balanced setup, roll back one server at a time using the same drain, upgrade, ready sequence. If you detect the issue early, you can leave upgraded servers drained and only roll back the active fleet, then drain and roll back the upgraded servers during a maintenance window. Always keep the old binary or package available until you confirm the new version is stable across your entire infrastructure for at least 48 hours.
Post-Upgrade Verification and Testing
Version and Process Validation
Confirm the running version matches the expected release:
nginx -v
The output should show nginx version: nginx/1.30.7 or nginx/1.31.9. Verify the master and worker processes are running with the correct user:
ps aux | grep nginx | grep -v grep
The master should run as root and workers as the configured user (usually nginx or www-data). Check that the process start time matches your upgrade. Test a basic HTTP request to confirm the server responds:
curl -I https://yoursite.example.com/
You should see a 200 status and standard response headers. If the request hangs or returns an error, check the error log immediately.
Module and Feature Testing
For HTTP/2, verify the protocol is active:
curl -I --http2 https://yoursite.example.com/
The response should include HTTP/2 200 in the status line. If you see HTTP/1.1, check that http2 is set on the listen directive (nginx 1.25.1 and later) or listen 443 ssl http2; for older versions. For HTTP/3 on mainline 1.31.9, test with curl built with HTTP/3 support:
curl --http3 https://yoursite.example.com/
If using the stream module for TCP or UDP proxying, send test traffic through the configured ports and verify connections reach the upstream. For PROXY protocol configurations, test through your load balancer to confirm client IP addresses are correctly extracted. Check the access log to see the real client IP rather than the load balancer's IP.
Reviewing Error Logs for Anomalies
Tail the error log for at least 10 minutes after the upgrade:
tail -f /var/log/nginx/error.log
Look for lines containing "alert", "emerg", or "crit". Warnings about deprecated directives are informational but should be addressed in your next configuration review. If you see module load failures or shared library errors, verify all dynamic modules are compatible with the new nginx version. For production monitoring, integrate nginx error logs into your observability stack. Track error rates, response times, and upstream health in Prometheus, Grafana, or your existing monitoring system. Set alerts for error rate spikes or increased 5xx responses. Monitor these metrics for 24-48 hours to catch any latent issues that only appear under specific traffic patterns or during peak load.
Auditing Configuration for Vulnerable Patterns
Checking for alias with try_files (CVE-2026-125283)
CVE-2026-125283 triggers when an alias directive appears in the same location block as try_files. Search your entire configuration tree for this pattern:
grep -r 'alias' /etc/nginx/ | grep -v '#' > /tmp/alias_lines.txt
grep -r 'try_files' /etc/nginx/ | grep -v '#' > /tmp/try_files_lines.txt
Review both files to see if any location blocks contain both directives. A vulnerable configuration looks like:
location /static/ {
alias /var/www/files/;
try_files $uri $uri/ =404;
}
Replace alias with root wherever possible. The root directive appends the location path to the filesystem path, so root /var/www; with location /static/ looks in /var/www/static/. If you must use alias, remove try_files and handle missing files through error_page directives or upstream logic. Test extensively after making changes, since alias and root behave differently with trailing slashes.
Reviewing PROXY Protocol and Stream SSL Settings
CVE-2026-120993 affects servers using the PROXY protocol to receive client IP addresses from load balancers. Audit all listen directives with proxy_protocol:
grep -r 'proxy_protocol' /etc/nginx/
Ensure you restrict which sources can send PROXY headers using set_real_ip_from. If your load balancer's IP is 10.0.1.5, add:
set_real_ip_from 10.0.1.5;
real_ip_header proxy_protocol;
Without set_real_ip_from, any client can forge PROXY headers and trigger the NULL pointer dereference. For CVE-2026-123640, review stream blocks with ssl_preread on. This directive reads the SNI hostname from the TLS ClientHello before proxying. If you do not need SNI-based routing in stream contexts, remove ssl_preread on; to eliminate the attack surface.
Disabling Unused Modules
If you do not use mail proxy, HTTP/3, or certain stream features, recompile nginx without those modules. Check your current build:
nginx -V 2>&1 | grep -o -- '--with-[^ ]*'
To rebuild without mail proxy (CVE-2026-113425), omit --with-mail and --with-mail_ssl_module from your configure line. To remove HTTP/3 support (CVE-2026-121810 on mainline), omit --with-http_v3_module. Reducing compiled modules shrinks the attack surface and binary size. After recompiling, verify with nginx -V that the unwanted modules no longer appear. This approach works only for source-compiled installations; package-based installs include a fixed set of modules. Our Nginx Configuration Cheat Sheet covers module selection and compile-time options for custom builds.
Monitoring and Long-Term Mitigation
Subscribing to Security Advisories
Subscribe to the nginx-announce mailing list at nginx.org security advisories to receive immediate notification of future CVEs. The list is low-traffic and covers only stable and mainline releases. Add an email alias that forwards to your operations team so multiple engineers see the alerts. For compliance frameworks like PCI-DSS or SOC 2, document your subscription and log each security advisory in your change management system with the date received and date patched. This audit trail proves you respond to vulnerabilities within your defined SLA.
Automating Security Updates
Configure automated package updates for security patches on Debian-based systems using unattended-upgrades:
apt-get install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
Edit /etc/apt/apt.conf.d/50unattended-upgrades to include the nginx repository origin. On RHEL-based systems, use yum-cron or dnf-automatic:
dnf install dnf-automatic
systemctl enable --now dnf-automatic.timer
Configure /etc/dnf/automatic.conf to apply security updates only. Always test automated updates in staging first; set up a canary server that receives updates 24 hours before production. Use configuration management tools like Ansible, Puppet or Salt to ensure all nginx servers upgrade consistently and to audit which servers run which versions. Our Ansible Automation: From Zero to Production guide covers rolling update playbooks and version tracking across fleets.
Additional Defense Layers
Monitor the nginx upstream changelog for new stable and mainline releases beyond security patches. Stable releases receive only critical fixes, while mainline includes new features and less critical bug fixes. Consider deploying a Web Application Firewall like ModSecurity or a cloud WAF (Cloudflare, AWS WAF) as an additional layer, though WAFs cannot mitigate memory corruption vulnerabilities like the use-after-free issues in this update. Document your upgrade process in a runbook: list pre-checks, upgrade commands, rollback steps, and post-upgrade verification. Include contact information for third-party module vendors and escalation procedures for failed upgrades. Review and update the runbook after each security patch cycle to capture lessons learned.
Post-Deployment Checklist
After completing the upgrade and verification steps, confirm the following items:
- All nginx servers show version 1.30.7 or 1.31.9 in
nginx -voutput - Process start times match the upgrade window in
systemctl status nginx - Load balancer health checks pass for all backend servers
- HTTP/2, HTTP/3 and TLS 1.3 connections complete successfully (if enabled)
- Error logs show no critical or alert messages for at least 24 hours post-upgrade
- Access logs confirm real client IPs appear correctly (not load balancer IPs) for PROXY protocol setups
- Configuration audit found no
alias+try_filespatterns or they have been remediated - Unused modules (mail, HTTP/3) removed from source builds if not required
- Automated update tools (unattended-upgrades, dnf-automatic) configured and tested in staging
- Upgrade documented in change management system with date, version, and affected servers
- Runbook updated with any new issues or workarounds discovered during this deployment
For ongoing vulnerability tracking across your entire infrastructure, see our Vulnerability Tracking Guide for processes that scale beyond nginx to the full stack. Schedule a post-mortem with your team to review the upgrade process, particularly any delays or issues that slowed deployment. Use those findings to improve automation, testing and rollback procedures for the next security update cycle.
Frequently Asked Questions
Should I upgrade to nginx 1.30.7 stable or 1.31.9 mainline?
Use the same branch you are currently on. If you run 1.30.x stable, upgrade to 1.30.7. If you run 1.31.x mainline, upgrade to 1.31.9. Stable receives only critical bug and security fixes, while mainline includes new features and less critical fixes. Switching branches during a security patch introduces unnecessary risk. Mainline is production-ready but changes more frequently; stable is better for conservative environments.
Can I skip this update if I don't use HTTP/2 or HTTP/3?
No. The November 2026 update fixes 10 CVEs spanning resolver, TLS 1.3, mail proxy, stream modules, and the alias directive. CVE-2026-125283 (alias + try_files buffer overflow) and CVE-2026-118899 (TLS 1.3 infinite loop) affect servers without HTTP/2 or HTTP/3. Run nginx -V to check compiled modules, but assume you need the update unless you have verified every CVE does not apply to your configuration.
How do I test if my server is vulnerable to CVE-2026-125283?
Search for configurations combining alias and try_files in the same location block: grep -r 'alias' /etc/nginx/ > /tmp/a.txt and grep -r 'try_files' /etc/nginx/ > /tmp/t.txt, then compare files to find overlap. A vulnerable block has both directives. Testing exploitation requires crafting specific URIs that trigger the buffer overflow, which risks crashing your server. Instead, audit the configuration and upgrade immediately if the pattern exists.
Will upgrading nginx require a full service restart?
Yes, for package-based installs. A reload only reloads configuration; the old binary keeps running until you restart with systemctl restart nginx. Source-compiled installs support zero-downtime binary replacement using the USR2 signal to start a new master while old workers finish requests, then WINCH to gracefully shut down old workers. This requires manual signal handling and is not automatic with package managers.
What's the rollback procedure if the new version breaks my config?
For package installs, downgrade explicitly: apt-get install nginx=1.30.6-1~bookworm or dnf downgrade nginx-1.30.6, then restart. For source builds, restore the backed-up binary: cp /usr/sbin/nginx.old /usr/sbin/nginx and restart. In load-balanced setups, drain the upgraded server, roll back, and re-enable it before proceeding to the next server. Always test the new version in staging before production deployment to catch configuration incompatibilities early.