NGINX Use-After-Free via SSI/Mirror Subrequest with Variable Proxy Server Name
Critical use-after-free in NGINX proxy configurations with variable server names and SSI/mirror subrequests can lead to worker crash or RCE. Fixed in nginx 1.30.7 and 1.31.9.
According to the NVD entry and F5 advisory (K000163925), this issue affects NGINX Plus and NGINX Open Source when configured as a proxy, the proxied server name includes variables, and a Server Side Includes (SSI) or mirror directive sends a subrequest to a location that resolves the same server name. Under these conditions, a specially crafted HTTP request may cause a use-after-free condition in a worker process. An attacker may also be able to execute code if Address Space Layout Randomization (ASLR) is disabled or can be bypassed.
Impact: An attacker could leverage this vulnerability to crash the NGINX worker process, corrupt its memory, or perform remote code execution (RCE).
Fixed versions
According to the official nginx security advisories, this is fixed in nginx 1.31.9 (mainline) and nginx 1.30.7 (stable), released on 18 November 2026. Vulnerable: nginx 0.6.18 to 1.31.8. NGINX Plus users should follow F5 advisory K000163925 for their fixed release.
What to do 1. Review the NVD entry and the F5 advisory (K000163925) for affected versions and patch availability. 2. Upgrade nginx to 1.30.7 (stable) or 1.31.9 (mainline) or later as soon as possible. 3. If patching is not immediately possible, mitigate by avoiding the use of variables in proxied server names when SSI or mirror subrequests are enabled, or by disabling SSI/mirror where not required. 4. Monitor worker process crashes and investigate any suspicious HTTP requests targeting proxy configurations with variable server names. 5. After restarting nginx, run nginx -v to confirm the new version is running.