🚀Publish FREEJoin WriterDock's early community of writers.Start Writing — It's Free

Nginx RCE: Patch CVE-2026-123007 & Protect Servers

Suraj Kumar

Suraj Kumar

Founding Writer #1Contributor

November 19, 2026•10 min read•7 views

Illustration for "Nginx RCE: Patch CVE-2026-123007 & Protect Servers"

A critical Nginx RCE vulnerability has been disclosed, allowing unauthenticated attackers to execute code on affected web servers. If you run Nginx, understanding and addressing this Nginx RCE is an immediate priority. Multiple independent research teams, including Wiz Research and Xint, have identified flaws that let attackers bypass authentication entirely.

The risks are severe. Attackers can steal sensitive data, tamper with websites, or disrupt services. In some cases, as demonstrated by Xint's research team, attackers can escalate privileges to root on the host system. This article explains the specific vulnerabilities, how to check if your server is exposed, and exactly how to patch or mitigate the risk immediately.

Understanding the Nginx RCE Vulnerabilities

The core issue involves a set of critical remote code execution (RCE) flaws in Nginx, the world's most widely used open-source web server. According to Wiz Research, two primary CVEs are driving the current concern: CVE-2026-123633 and CVE-2026-123007. Both are rated Critical with a CVSS 4.0 score of 9.2.

The Most Impactful Threat: CVE-2026-123007

Among the disclosed issues, CVE-2026-123007 is particularly impactful. This is an integer underflow bug that has been present in the Nginx codebase since version 1.9.5, released in 2015. It affects all official releases through 1.31.8.

The flaw requires HTTP/2 to be enabled on the affected Nginx server. If HTTP/2 is active, an unauthenticated attacker can send a specially crafted request that triggers the underflow, leading to remote code execution. The commands run with the privileges of the Nginx worker process.

Wiz Research demonstrated that this vulnerability works even on servers serving ordinary static files, without a backend application or third-party modules. This means that if you are using Nginx as a simple file server with HTTP/2 enabled, you are vulnerable.

The Second Critical Flaw: CVE-2026-123633

The second major vulnerability, CVE-2026-123633, is a use-after-free error. Like CVE-2026-123007, it requires HTTP/2 to be enabled. However, it specifically affects requests forwarded to an upstream (backend) server.

This bug has been in the code for nearly six years, introduced in Nginx 1.19.7. If your Nginx instance acts as a reverse proxy and forwards HTTP/2 requests to a backend application, you are exposed to this specific RCE vector.

Additional Vulnerabilities in the nginx2root Group

While the two CVEs above are the most widely reported, Xint’s research team identified five distinct RCE vulnerabilities in total. They grouped these findings, along with a Linux kernel flaw, under the name "nginx2root."

Here is a summary of the affected configurations according to Xint:

CVE IDAffected ConfigurationFirst Affected ReleaseBlocked by Disabling HTTP/2?
CVE-2026-123007HTTP/2 enabled1.9.5Yes
CVE-2026-123634Resolver, proxy_pass, mirror1.13.4No
CVE-2026-123633HTTP/2 with upstream forwarding1.19.7Yes
CVE-2026-121810HTTP/3 with upstream forwarding1.25.0No
CVE-2026-113425Mail proxy with auth_http0.5.15No

It's important to note that disabling HTTP/2 only blocks CVE-2026-123007 and CVE-2026-123633. It does not protect against the other three vulnerabilities. You must check your specific configuration against this table to understand your full exposure.

Check Your Nginx Exposure

Before patching, you need to confirm whether your server is vulnerable. This involves checking your Nginx version and your configuration.

Step 1: Check Your Nginx Version

Open your terminal and run the following command to check your installed Nginx version:

bash
1nginx -v

If the output shows a version between 1.9.5 and 1.31.8 (inclusive), you are potentially vulnerable to CVE-2026-123007. If you are running 1.19.7 or later within this range, you are also potentially vulnerable to CVE-2026-123633.

Step 2: Check for HTTP/2 Configuration

The primary mitigations depend on whether HTTP/2 is enabled. Look for the http2 directive in your Nginx configuration files. Typically, you will find this in /etc/nginx/nginx.conf or in files within /etc/nginx/conf.d/.

Search for http2 in your configuration:

bash
1grep -r "http2" /etc/nginx/

If you see a line like listen 443 ssl http2; or listen [::]:443 ssl http2;, HTTP/2 is enabled on that port.

Step 3: Identify Other Risk Factors

If you are using Nginx as a reverse proxy, check for the following directives:

  • proxy_pass: If requests are forwarded to a backend, you are exposed to CVE-2026-123633 if HTTP/2 is on, and potentially CVE-2026-121810 if HTTP/3 is on.
  • mirror: If you use the mirror directive, you may be exposed to CVE-2026-123634, which is not blocked by disabling HTTP/2.
  • auth_http: If you run a mail proxy using this directive, you are exposed to CVE-2026-113425.

Immediate Mitigation Steps

If you cannot patch immediately, you must apply temporary mitigations. The effectiveness of these steps depends on your specific configuration.

Disable HTTP/2 (Partial Mitigation)

Disabling HTTP/2 will block CVE-2026-123007 and CVE-2026-123633. This is the most common and easiest mitigation, but it does not protect against the other three vulnerabilities listed in the table above.

To disable HTTP/2, edit your Nginx configuration file. Remove the http2 parameter from your listen directives.

Before:

nginx
1server {
2    listen 443 ssl http2;
3    server_name example.com;
4    # ... other config
5}

After:

nginx
1server {
2    listen 443 ssl;
3    server_name example.com;
4    # ... other config
5}

Save the file and test the configuration:

bash
1sudo nginx -t

If the test passes, reload Nginx:

bash
1sudo systemctl reload nginx

Warning: Disabling HTTP/2 may impact performance for your users, as HTTP/2 offers multiplexing and header compression. Treat this as a temporary measure until you can patch.

Disable Specific Directives (For Other CVEs)

If you are using mirror, auth_http, or HTTP/3, disabling HTTP/2 is not enough.

  • For CVE-2026-123634 (Mirror/Proxy): You will need to remove or disable the mirror directive and any proxy_pass configurations that use request-derived destinations. This may require significant architectural changes.
  • For CVE-2026-121810 (HTTP/3): Disable HTTP/3 by removing http3 from your listen directives.
  • For CVE-2026-113425 (Mail Proxy): Disable the auth_http directive in your mail proxy configuration.

These changes are more complex and may break functionality. They should be done carefully and tested in a staging environment first if possible.

How to Patch Nginx

The only complete fix is to update Nginx to version 1.31.9 or later. F5, the company behind Nginx, released a security update on November 18, 2026, which includes fixes for these vulnerabilities.

Step 1: Check for Updates

Depending on your operating system and how you installed Nginx, the update process will vary.

For Ubuntu/Debian systems:

bash
1sudo apt update
2sudo apt upgrade nginx

For RHEL/CentOS/Rocky Linux systems:

bash
1sudo yum update nginx

For Alpine Linux systems:

bash
1sudo apk update
2sudo apk upgrade nginx

After running the update command, verify the new version:

bash
1nginx -v

Ensure the version is 1.31.9 or higher.

Step 2: Restart Nginx

After updating, restart the Nginx service to ensure the new binary is loaded:

bash
1sudo systemctl restart nginx

Step 3: Verify the Patch

To confirm the patch is applied, you can check the Nginx status page or use a tool like curl to inspect the server headers. However, the most reliable method is to verify the version and ensure no known vulnerable configurations remain active.

If you are using a containerized environment (Docker, Kubernetes), you must update the base image or the Nginx container image to a version that includes the 1.31.9 fix. Check your Dockerfile or Helm chart for the Nginx version tag.

Investigating Potential Compromise

If you were running an affected version with HTTP/2 enabled, you should assume you have been compromised. RCE vulnerabilities are often exploited quickly after disclosure.

Check for Suspicious Processes

Look for unusual processes running on your server. An attacker might have installed a cryptominer, a botnet client, or a backdoor.

bash
1ps aux

Look for processes with high CPU usage or unfamiliar names.

Review Nginx Logs

Examine your Nginx access and error logs for suspicious activity. Look for:

  • Requests with unusual user agents.
  • Requests to non-existent paths that return 200 or 500 errors.
  • Sudden spikes in traffic or errors around the time of the disclosure.
bash
1tail -n 100 /var/log/nginx/access.log
2tail -n 100 /var/log/nginx/error.log

Check for New Files

Attackers may drop web shells or other malicious files. Check directories like /tmp, /var/tmp, and /home for recently modified files.

bash
1find / -mtime -1 -type f 2>/dev/null

This command lists files modified in the last day. Review the output for anything suspicious.

Rotate Secrets

If you have evidence of compromise, rotate all secrets stored on the server, including API keys, database credentials, and SSH keys. Assume that any data accessible to the Nginx worker process has been read.

Best Practices for Future Security

This incident highlights the importance of proactive security measures.

  1. Monitor for Updates: Subscribe to Nginx security announcements. Use a package manager that notifies you of security updates.
  2. Minimize Attack Surface: Disable features you do not use. If you do not need HTTP/2, disable it. If you do not use mirror or auth_http, remove those directives.
  3. Run as Non-Root: Ensure Nginx worker processes run as a non-root user. This limits the impact of an RCE exploit.
  4. Use Firewalls: Restrict access to your Nginx server to only the IPs that need it. Use a Web Application Firewall (WAF) to filter malicious requests.
  5. Regular Audits: Periodically review your Nginx configuration for security best practices.

Key Takeaways

  • Critical RCE: Nginx versions 1.9.5 through 1.31.8 are vulnerable to unauthenticated remote code execution, primarily via HTTP/2.
  • Immediate Action: Disable HTTP/2 if you cannot patch immediately. This blocks the two most severe CVEs (CVE-2026-123007 and CVE-2026-123633).
  • Complete Fix: Update to Nginx 1.31.9 or later as soon as possible.
  • Investigate: If you were exposed, assume compromise and check for signs of intrusion.
  • Prevent: Minimize your attack surface by disabling unused features and monitoring for updates.

FAQ

Can I fix this without restarting Nginx?

No. To apply the patch, you must update the Nginx binary and restart the service. Disabling HTTP/2 via configuration can be applied with a reload, but it is only a partial mitigation.

Does this affect Nginx Plus?

Yes. Nginx Plus is also affected by these vulnerabilities. Check F5’s security advisories for specific Nginx Plus version fixes.

What if I am using a managed hosting service?

Contact your hosting provider immediately. They are responsible for patching the underlying server. Request confirmation that they have applied the Nginx 1.31.9 update.

How can I verify if HTTP/2 is still enabled?

Use a browser’s developer tools or a command-line tool like curl with the --http2 flag. If the connection negotiates HTTP/2, it is enabled.

bash
1curl -I --http2 https://example.com

If the response includes HTTP/2 200, HTTP/2 is active.

About the Author

Suraj Kumar

Suraj Kumar

@surajkumar

Founding Writer #1Contributor

Suraj Kumar is a writer, entrepreneur, and the CEO and founder of this website, sharing simple and practical insights on business, creativity, and personal growth. With experience building digital projects, they enjoy helping others learn, grow, and succeed online.

Read Next

More articles you might enjoy

View all articles
7