Krytyczna podatność w module ngx_http_rewrite_module produktów NGINX Plus i NGINX Open Source umożliwia przepełnienie bufora sterty (heap buffer overflow) w procesie roboczym NGINX. W określonych warunkach, w szczególności gdy ASLR jest wyłączony lub możliwy do ominięcia, atakujący może wykonać dowolny kod na serwerze.
▸ Pokaż oryginał (EN)
NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when a rewrite directive uses a regex pattern with distinct, overlapping Perl-Compatible Regular Expression (PCRE) captures (for example, ^/((.*))$) and a replacement string that references multiple such captures (for example, $1$2) in a redirect or arguments context. An unauthenticated attacker along with conditions beyond their control can exploit this vulnerability by sending crafted HTTP requests. This may cause a heap buffer overflow in the NGINX worker process leading to a restart. Additionally, attackers can execute code on systems with Address Space Layout Randomization (ASLR) disabled or when the attacker can bypass ASLR. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.
Podatność jest wyzwalana, gdy dyrektywa rewrite korzysta ze wzorca regex zawierającego nakładające się grupy przechwytujące PCRE (np. ^/((.*))$), a ciąg zastępowania odwołuje się do wielu takich grup jednocześnie (np. $1$2) w kontekście przekierowania lub argumentów. Nieuwierzytelniony atakujący, przy spełnieniu warunków niezależnych od niego (np. odpowiednia konfiguracja serwera), może wysłać spreparowane żądanie HTTP, które wywołuje heap buffer overflow w procesie roboczym NGINX. Skutkuje to restartem procesu roboczego, a przy braku lub ominięciu ASLR — możliwością zdalnego wykonania kodu (RCE).
Atakujący może doprowadzić do restartu procesu roboczego NGINX (efekt DoS), a w przypadku systemów z wyłączonym ASLR lub możliwością jego ominięcia — do zdalnego wykonania kodu (RCE) na podatnym serwerze.
Należy zastosować patche dostępne u producenta zgodnie z referencjami (https://my.f5.com/manage/s/article/K000161377). Dodatkowo, do czasu wdrożenia poprawki, należy upewnić się, że ASLR jest włączony na systemach hostujących NGINX, oraz dokonać przeglądu konfiguracji dyrektyw rewrite pod kątem stosowania nakładających się grup PCRE z wielokrotnymi odwołaniami w ciągach zastępowania.
F5 NGINX Plus oraz F5 NGINX Open Source — wersje wskazane w referencjach producenta (wersje objęte End of Technical Support nie są oceniane).
Podatność dotyczy wyłącznie konfiguracji NGINX zawierających dyrektywę rewrite z nakładającymi się grupami przechwytującymi PCRE oraz wielokrotnymi odwołaniami do nich w kontekście przekierowania lub argumentów — nie wszystkie instancje NGINX są podatne. Data publikacji: 2026-05-22.
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XF5 nginx Open Source
APPF51.31.00.1.17 – 0.9.71.0.0 – 1.30.1F5 nginx Plus
APPF537.0.0 – 37.0.1.1 (bez)r32 – r36
Powiązane podatności
NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_proxy_v2_module and ngx_http_grpc_module...
NGINX Open Source has a vulnerability in the ngx_http_v3_module module. When NGINX Open Source is configured t...
NGINX heap buffer overflow w module ngx_http_rewrite_module (RCE/restart)
A vulnerability exists in the ngx_http_scgi_module and ngx_http_uwsgi_module modules that may result in excess...
NGINX Open Source and NGINX Plus have a vulnerability in the ngx_http_dav_module module that might allow an at...