CRITICAL🇬🇧 English

CVE-2026-42945

NGINX heap buffer overflow w module ngx_http_rewrite_module (RCE/restart)

CVSS 9.2v4.0pub. 2026-05-13upd. 2026-06-27

Podatność typu heap buffer overflow w module ngx_http_rewrite_module produktów NGINX Plus i NGINX Open Source może prowadzić do restartu procesu roboczego lub wykonania kodu przez nieuwierzytelnionego atakującego. Szczególne zagrożenie stanowi możliwość RCE na systemach z wyłączonym mechanizmem ASLR lub gdy atakujący jest w stanie go obejść.

Pokaż oryginał (EN)

NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when the rewrite directive is followed by a rewrite, if, or set directive and an unnamed Perl-Compatible Regular Expression (PCRE) capture (for example, $1, $2) with a replacement string that includes a question mark (?). An unauthenticated attacker along with conditions beyond its 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.

🤖 Analiza AI
Jak działa

Podatność ujawnia się, gdy dyrektywa rewrite jest poprzedzona inną dyrektywą rewrite, if lub set, a wyrażenie regularne PCRE zawiera nienazwane przechwycenie (np. $1, $2) w kombinacji z ciągiem zastępczym zawierającym znak zapytania (?). Nieuwierzytelniony atakujący może wysłać spreparowane żądania HTTP, które wyzwalają przepełnienie bufora sterty (heap buffer overflow) w procesie roboczym NGINX. Pomyślne wykorzystanie podatności wymaga spełnienia warunków częściowo niezależnych od atakującego, co odzwierciedla wysoki poziom złożoności ataku (AC:H w wektorze CVSS).

Skutki

W typowym scenariuszu atakujący może spowodować restart procesu roboczego NGINX, co przekłada się na chwilową niedostępność usługi. Na systemach z wyłączonym ASLR lub po jego obejściu możliwe jest zdalne wykonanie kodu (RCE) w kontekście procesu roboczego NGINX.

Mitygacja

Należy zastosować patche dostępne u producenta zgodnie z referencjami (artykuł F5 K000161019: https://my.f5.com/manage/s/article/K000161019). Jako dodatkowy środek zaradczy zaleca się upewnienie się, że mechanizm ASLR jest włączony na serwerach hostujących NGINX, co znacząco utrudnia skuteczne wykonanie kodu przez atakującego.

Kogo dotyczy

NGINX Plus oraz NGINX Open Source — konkretne wersje wskazane w referencjach producenta (artykuł F5 K000161019). Wersje, które osiągnęły koniec wsparcia technicznego (EoTS), nie są objęte oceną.

Uwagi

Podatność posiada publiczne zasoby badawcze opublikowane pod nazwą 'Nginx-Rift' przez DepthFirst Disclosures (https://depthfirst.com/nginx-rift, https://github.com/DepthFirstDisclosures/Nginx-Rift), co może ułatwić opracowanie działającego exploita.

CVSS Vector
CVSS:4.0/AV:N/AC:H/AT:N/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:X
  • F5 Dos

    APP
    F5
    4.8.04.3.0 – 4.7.0
  • F5 nginx Gateway Fabric

    APP
    F5
    1.3.0 – 1.6.22.0.0 – 2.5.1
  • F5 nginx Ingress Controller

    APP
    F5
    5.0.0 – 5.4.13.5.0 – 3.7.24.0.0 – 4.0.1
  • F5 nginx Instance Manager

    APP
    F5
    2.16.0 – 2.21.1
  • F5 nginx Open Source

    APP
    F5
    0.6.27 – 1.30.0
  • F5 nginx Plus

    APP
    F5
    r32 – r36
  • F5 Waf

    APP
    F5
    4.9.0 – 4.16.05.1.0 – 5.8.05.9.0 – 5.12.1
🔵
ZWERYFIKUJ U PRODUCENTA
Brak jednoznacznych danych o patchu. Sprawdź referencje od producenta.
Tagi
Auth BypassMemory
CWE
Referencje

Powiązane podatności

CVE-2026-42055CRITICAL9.2ten sam produkt

NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_proxy_v2_module and ngx_http_grpc_module...

CVE-2026-42530CRITICAL9.2ten sam produkt

NGINX Open Source has a vulnerability in the ngx_http_v3_module module. When NGINX Open Source is configured t...

CVE-2026-9256CRITICAL9.2PL ✓ten sam produkt

Heap buffer overflow w NGINX w module ngx_http_rewrite_module (RCE)

CVE-2026-11311HIGH8.6ten sam produkt

When NGINX Plus is configured as the data plane for NGINX Gateway Fabric, an injection vulnerability exists in...

CVE-2026-32682HIGH7.1ten sam produkt

When NGINX Gateway Fabric is configured using GRPCRoutes, an authenticated, remote attacker with permission to...