NGINX2Shell: Steps to Update and Limit Risk in NGINX

NGINX2Shell: Steps to Update and Limit Risk in NGINX

NGINX released versions 1.30.7 and 1.31.9 to fix ten vulnerabilities, five of them critical and dubbed NGINX2Shell. Two HTTP/2 flaws could allow unauthenticated remote code execution; administrators should check which edition and branch they are running, apply the relevant fix, and restart the service.

Which installations should be reviewed

The risk affects installations of NGINX Open Source and NGINX Plus running vulnerable versions. In Open Source, CVE-2026-123007 affects versions starting with 1.9.5, and CVE-2026-123633 affects versions starting with 1.19.7. NGINX's reference marks the stable and mainline branches as fixed starting with 1.30.7 and 1.31.9, respectively.

The specific conditions vary. CVE-2026-123007 requires HTTP/2; Wiz demonstrated the flaw even when serving static files over HTTPS, with no backend application or third-party module. CVE-2026-123633 also requires HTTP/2 and is associated with the reverse proxy when workers have few free connections. Do not assume a server is safe just because it does not act as a proxy.

The five critical vulnerabilities also include flaws in the DNS resolver, HTTP/3, and the mail proxy; exposure depends on the components and, in some cases, the configuration. The other five fixed vulnerabilities include an infinite loop when reading request bodies with TLS 1.3, as well as flaws related to PROXY protocol, alias and try_files, client certificate validation, and the stream module.

Steps to check and fix the server

  1. Identify the edition, version, and package source. Check whether the server is NGINX Open Source or NGINX Plus, and whether it follows the stable or mainline branch. Do not rely solely on a control panel: check the binary version and find out whether the operating system manages NGINX through its own packages. The report warns that distributions may release fixed packages; an apparently older displayed version does not, by itself, prove that the system is still exposed.

  2. Compare against the branch threshold. For Open Source, the fix is in 1.30.7 for stable and 1.31.9 for mainline. If you use NGINX Plus, do not apply those version numbers: each CVE has a different fixed version. Information on the two HTTP/2 vulnerabilities lists 37.0.7.1 for CVE-2026-123633 and 37.0.8.1 for CVE-2026-123007; check both if you need to address both.

  3. Install the update from the correct channel. If your installation comes from a distribution's repositories, apply its security update and confirm that the installed package contains the fix. If you manage NGINX directly, update to the fixed version for your branch or edition. Do not leave an installation vulnerable just because HTTP/2 is disabled: the patches also cover other flaws.

  4. Restart NGINX after updating. Previdian recommends installing the fixed version and restarting the service. Reloading the configuration is not enough to replace the binary: the old master process may remain running. Check that the active process corresponds to the new package before considering the intervention complete.

  5. If you cannot update yet, temporarily disable HTTP/2. This measure mitigates CVE-2026-123007 and CVE-2026-123633, but not the other vulnerabilities. For NGINX 1.25.1 or later, Previdian advises setting http2 off; in the affected server blocks. For earlier versions, it recommends removing http2 from the listen directive. Verify the syntax and scope against the actual configuration before applying the change.

  6. Re-enable HTTP/2 after patching. Disabling it is a temporary mitigation, not a substitute for updating. Once the fix is installed, restore HTTP/2 where needed and confirm that the fixed version is still active.

  7. Assess the SCTP kernel risk separately. Xint reported chaining CVE-2026-123007 with a separate Linux kernel flaw in SCTP to gain root privileges on the host. The NGINX update does not fix this kernel issue; LWN notes that there was still no patch for it. If the SCTP module is not needed, Xint recommends blocking it on hosts until a kernel fix is available. Do not confuse this measure with the NGINX fix.

What disabling HTTP/2 covers—and what it does not

The most severe flaw, CVE-2026-123007, is an HTTP/2 memory flaw. CyberScoop reports that Rapid7 developed a proof of concept and that the demonstrated exploitation requires a high volume of HTTP/2 traffic and specific technical conditions. Those obstacles do not remove the need to update: F5 classified the flaw as critical, and Previdian reports that Wiz confirmed unauthenticated remote code execution.

The other HTTP/2 flaw, CVE-2026-123633, is a use-after-free. Its described scenario involves HTTP/2, a proxy to an application, and few free connection slots for workers. For both vulnerabilities, the conditions for exploitation do not justify leaving the server unpatched: disabling HTTP/2 is only a mitigation while the update is being prepared.

Disabling HTTP/2 does not fix the other eight flaws. These include vulnerabilities in HTTP/3, the resolver, and the mail proxy, as well as issues in TLS 1.3, PROXY protocol, alias and try_files, client certificates, and stream. Therefore, the temporary measure should have an operational removal date: install the fixed package and then restore HTTP/2 if the service needs it.

Mistakes to avoid

Do not confuse reloading with restarting. If you only reload the configuration, the previous master process—and with it, the vulnerable binary—may continue running. Follow the restart procedure appropriate to how you manage the service.

Do not use a single version number for NGINX Plus. The fixes for CVE-2026-123633 and CVE-2026-123007 have different version numbers. Check that the update covers both, rather than assuming the risk is resolved after installing a version intended to fix only one.

Do not treat disabled HTTP/2 as a complete solution. It reduces exposure to two vulnerabilities, but does not fix the others. Nor should you attribute the SCTP flaw fix to NGINX: it is a separate kernel issue and requires separate attention. Once finished, the practical questions are whether the active process is running the fixed package and whether the host needs an additional SCTP mitigation.

Sources: Linuxiac, CyberScoop, LWN.net, NGINX, Previdian