Naar de inhoud

Details

NGINX2Root: protect nginx on your server (CVE-2026-123007 and related flaws)

On 18 November 2026 nginx fixed several serious vulnerabilities, together called NGINX2Root. Which versions and settings are affected, how to check your server, what to turn off until your distribution has a fix, and how to update.

Dit artikel is alleen beschikbaar in het Engels.

On 18 November 2026 the nginx project released nginx 1.30.7 (stable) and 1.31.9 (mainline). They fix a group of vulnerabilities that researchers call NGINX2Root. The two HTTP/2 flaws among them are also described as nginx2shell. The most serious one, CVE-2026-123007, is memory corruption in HTTP/2 that can let someone on the internet run code on your server. Researchers also describe a separate flaw in the Linux kernel that can then turn that access into full root access.

On 19 November 2026 Ubuntu and Debian did not have fixed nginx packages yet. Until they do, the steps below reduce the risk. When the fix arrives, update and undo the temporary changes.

What the vulnerabilities are#

The nginx security advisories list these as fixed in 1.30.7 and 1.31.9. Whether you are affected depends on which features your configuration uses.

CVE What it is You are affected when
CVE-2026-123007 Memory corruption in HTTP/2 flow control HTTP/2 is on for at least one listener. This is the most serious one.
CVE-2026-123633 Use-after-free in HTTP/2 HTTP/2 is on and nginx passes requests to a backend.
CVE-2026-123634 Use-after-free in the DNS resolver proxy_pass contains a variable, so nginx looks up the name per request, together with mirror.
CVE-2026-121810 Use-after-free in HTTP/3 You have a listen ... quic listener (nginx 1.25.0 and later).
CVE-2026-113425 Use-after-free in the mail proxy nginx runs as a mail proxy for IMAP, POP3 or SMTP.

The same releases also fix CVE-2026-118899, an infinite loop when nginx reads a request body over TLS 1.3. It cannot be used to run code, but it can make nginx stop answering.

Affected versions: nginx from 1.9.5 up to and including 1.31.8 for the HTTP/2 flaw, and similar ranges for the others. In practice: every nginx that is older than 1.30.7 or 1.31.9 and has not been patched by your distribution.

The official list with the exact version ranges per flaw is on the nginx security advisories page.

Who is affected#

  • Websites and web apps behind nginx with HTTP/2 on. Many HTTPS setups have it on, so check yours.
  • The Pterodactyl Panel: its official nginx configuration uses listen 443 ssl http2;, so a panel set up that way is affected. The official Docker image of the panel also runs nginx. Wings is not nginx.
  • nginx inside Docker containers and as a reverse proxy in front of other services.
  • A CDN or proxy in front of your server does not protect you if your server can also be reached directly.

The kernel part (SCTP)#

According to the researchers, the attack can be combined with a flaw in the kernel's SCTP code. SCTP is a network protocol that almost no web or game server uses. With it, an attacker who got code running through nginx can become root, even from inside a container. On 19 November 2026 this flaw had no CVE number and no kernel fix. Blocking SCTP, as described below, takes that step away.

Check whether your nginx is affected#

Run these as a user with sudo.

  1. Check the version:

    sudo nginx -v
    
  2. On Ubuntu or Debian, check the package and whether its changelog names the fix. An empty result means your package does not have it yet. You can also follow the status per release on the Ubuntu CVE page or the Debian security tracker:

    apt-cache policy nginx
    apt changelog nginx | grep -E 'CVE-2026-(123007|123633|123634|121810|113425)'
    
  3. Look for HTTP/2, HTTP/3 and the mail proxy in the configuration nginx actually uses:

    sudo nginx -T 2>/dev/null | grep -E '^# configuration file|listen.*(http2|quic)|http2 +on|http3 +on|^ *mail *\{'
    
  4. Test from another computer whether your server still offers HTTP/2. Replace example.com with your domain:

    openssl s_client -connect example.com:443 -servername example.com -alpn h2 </dev/null 2>/dev/null | grep ALPN
    

    ALPN protocol: h2 means HTTP/2 is on.

Turn off HTTP/2 until the fix#

Browsers fall back to HTTP/1.1 by themselves, so your site keeps working. Services that need HTTP/2, such as gRPC, stop working while it is off.

  1. Make a copy of your configuration:

    sudo tar czf ~/nginx-etc-$(date +%F).tgz /etc/nginx
    
  2. Find the files with HTTP/2:

    sudo grep -RlE 'listen[^;]*http2|http2 +on' /etc/nginx
    
  3. In each file, change the setting:

    • On nginx 1.24 and older (Ubuntu 24.04, Ubuntu 22.04, Debian 12), remove http2 from the listen line. For example listen 443 ssl http2; becomes listen 443 ssl;.
    • On nginx 1.25.1 and newer (for example Debian 13), remove http2 from the listen line and change http2 on; to http2 off;, or add http2 off; to every server block.
  4. Test the configuration and reload nginx:

    sudo nginx -t && sudo systemctl reload nginx
    
  5. Old worker processes can stay alive for a while to finish open HTTP/2 connections. If this still shows workers that are shutting down after a few minutes, restart nginx with sudo systemctl restart nginx:

    pgrep -af 'worker process is shutting down'
    
  6. Run the openssl test from the previous section again. It should no longer show h2.

Turn off HTTP/3, the mail proxy and per-request lookups#

Only needed if the check above found them.

  • HTTP/3: remove quic from the listen lines, set http3 off; and remove any Alt-Svc header you added for HTTP/3. Then test and reload as above.
  • Mail proxy: if you use nginx's mail block, make it listen only on 127.0.0.1 or block its ports in your firewall until you update. See set up a firewall with ufw.
  • Resolver with mirror: use a fixed upstream address in proxy_pass instead of a variable, and remove mirror if you do not need it.

Block SCTP#

This removes the kernel step of the attack. Skip it only if your server really uses SCTP, for example for telephony signalling.

  1. Check whether SCTP is loaded or in use:

    sudo lsmod | grep sctp
    cat /proc/net/sctp/eps /proc/net/sctp/assocs 2>/dev/null
    

    The second command only prints something when SCTP is loaded. Do not use ss -S for this check: it can load the SCTP module by itself.

  2. Stop the kernel from loading it:

    echo 'install sctp /bin/false' | sudo tee /etc/modprobe.d/disable-sctp.conf
    
  3. If lsmod showed sctp and the cat command printed only its header lines, unload it:

    sudo modprobe -r sctp
    

    If that fails because the module is in use, it is gone after the next reboot.

  4. Check that the rule works. The last line should be install /bin/false:

    sudo modprobe -n -v sctp
    

Update nginx when the fix is available#

  • Ubuntu or Debian packages: update as soon as the changelog check above finds the CVE numbers. See automatic security updates on Ubuntu and Debian to get such fixes without waiting for you.

    sudo apt update && sudo apt upgrade
    
  • nginx.org packages: the nginx project has its own repository for Ubuntu and Debian with 1.30.7 and 1.31.9. Switching to it can change where the configuration lives, so read the installation page on nginx.org first and keep your copy of /etc/nginx.

  • Docker: use an image with nginx 1.30.7, 1.31.9 or newer, recreate the container and check the version with docker exec <container> nginx -v.

  • Pterodactyl Panel in Docker: on 18 November 2026 the Pterodactyl project rebuilt its panel images ghcr.io/pterodactyl/panel:latest and ghcr.io/pterodactyl/panel:v2.0.0-beta.3 with nginx 1.30.7 (release notes of v2.0.0-beta.3). In the folder with your panel's docker-compose.yml, run:

    docker compose pull && docker compose up -d
    

    A panel installed without Docker uses the nginx of your operating system: follow the package steps above.

After the update, restart nginx so the new program is used. A reload is not enough:

sudo systemctl restart nginx
sudo nginx -v

Then turn HTTP/2 back on by undoing your changes, and test and reload again.

After updating, check for a break-in#

If your server ran an affected nginx with HTTP/2 on the internet, check whether someone got in before you fixed it. See check your server for a break-in. For a Pterodactyl Panel, also go through secure your Pterodactyl Panel.

Een stap die niet werkte, een verkeerde naam of een verkeerd getal, iets wat ontbreekt. Laat het e-mailadres van je account achter als je bij een melding die helpt bedankt wilt worden met tegoed.

Bedankt. We lezen elke melding.

Nog een vraag?

Vraag het onze assistent: die antwoordt meteen, dag en nacht. Liever een mens? Open een ticket, dan helpt ons team je verder.