NGINX fixes `ngx_http_rewrite_module` heap overflow with possible RCE
Patch & Detection Intelligence · 4 sources · Updated 5mo ago · First seen Dec 25, 2025

NGINX released versions 1.31.1 and 1.30.2 to fix CVE-2026-9256, a heap buffer overflow in ngx_http_rewrite_module that can be triggered by unauthenticated attackers with specially crafted HTTP requests. The flaw affects NGINX Open Source and NGINX Plus when rewrite directives use overlapping or nested PCRE capture groups and replacement strings that reference multiple captures in redirect or arguments contexts, creating memory corruption in the worker process. Successful exploitation can force worker restarts and denial of service, and may lead to arbitrary code execution if protections such as ASLR are absent or bypassed; NGINX described the issue as a data plane exposure with no control plane impact.


