CRITICAL SEVERITY CVSS 9.8 / 10.0 CVE-2026-42945

NGINX Rift: Celah 18 Tahun di NGINX yang
Berujung Remote Code Execution

Kerentanan heap buffer overflow kritis pada ngx_http_rewrite_module mengancam lebih dari 1,4 juta server NGINX di Indonesia dan jutaan deployment globally. Analisis mendalam dari KRES.ID Threat Intelligence Team.

Tanggal Publikasi
14 Mei 2026
Disclosure
1 Mei 2026
Researcher
DepthFirst Security
Patch Available
Yes - v1.30.1
NGINX Heap Overflow RCE Rewrite Module Edge Infrastructure Kubernetes
1

Ringkasan Eksekutif

Peringatan Kritis untuk Tim Infra & DevOps

CVE-2026-42945, yang dijuluki "NGINX Rift", merupakan kerentanan heap buffer overflow yang bersembunyi di codebase NGINX selama 18 tahun. Kerentanan ini terdapat pada ngx_http_rewrite_module — modul yang sangat umum digunakan untuk URL rewriting, redirections, dan routing logic.

Dalam kondisi tertentu, exploitation dapat menyebabkan worker process crash, denial of service, hingga remote code execution (RCE).

9.8
CVSS Score
18
Tahun Tersembunyi
1.4M+
Server Indonesia
v1.30.1
Fixed Version

Timeline Vulnerability Disclosure

1 Mei 2026
DepthFirst Security menemukan dan melaporkan kerentanan ke NGINX Security Team
13 Mei 2026
⚠️ Exploit publicly available — patch immediately!
15 Mei 2026
NGINX release patch versi 1.30.1 dan 1.31.0

NGINX telah menjadi standar de facto untuk web server, reverse proxy, dan load balancer di seluruh dunia. Popularitasnya yang tinggi menjadikan setiap kerentanan pada NGINX sebagai perhatian serius bagi komunitas keamanan siber global.

NGINX Rift menunjukkan bahwa bahkan komponen infrastruktur yang sudah mature dan digunakan secara luas tetap dapat memiliki bug kritis yang tidak terdeteksi selama bertahun-tahun. Hal ini menjadi pengingat penting bahwa security is not a one-time effort, melainkan proses berkelanjutan yang membutuhkan vigilance, monitoring, dan patching discipline.

Bagi organisasi di Indonesia yang memiliki eksposur terhadap NGINX — baik sebagai web server, Kubernetes ingress controller, API gateway, maupun reverse proxy — urgensi untuk melakukan patching dan audit konfigurasi tidak dapat ditunda.

2

Analisis Teknis CVE-2026-42945

Apa Itu NGINX Rift?

NGINX Rift adalah nama yang diberikan oleh peneliti keamanan DepthFirst Security untuk kerentanan CVE-2026-42945 — sebuah heap buffer overflow yang ditemukan pada ngx_http_rewrite_module.

Kerentanan ini terjadi ketika NGINX memproses kombinasi directive rewrite dan set yang menggunakan:

  • Regex capture groups seperti $1, $2
  • Query string manipulation menggunakan karakter ?
  • URL escaping dalam hasil rewrite

Catatan Penting: Meskipun bug telah ada selama 18 tahun, exploitation memerlukan kondisi spesifik tertentu. Namun, given the severity dan potensi RCE, sangat direkomendasikan untuk segera melakukan patching.

Technical Deep Dive: Mekanisme Kerentanan

Kerentanan NGINX Rift berakar pada cara NGINX memproses hasil rewrite dalam dua tahap yang berbeda — tahap kalkulasi buffer dan tahap penulisan buffer.

1

Tahap Kalkulasi Buffer

NGINX menghitung estimasi ukuran string yang akan ditulis ke buffer berdasarkan hasil rewrite.

buffer_size = calculate_rewrite_length(rewrite_result); allocated_buffer = malloc(buffer_size);
2

Tahap Penulisan Buffer

NGINX menulis hasil rewrite aktual ke buffer yang sudah dialokasikan.

actual_size = write_to_buffer(allocated_buffer, rewrite_result); // Overflow jika actual_size > buffer_size

Mengapa Overflow Terjadi?

Masalah muncul karena flag internal is_args diproses berbeda pada kedua tahap:

  • Pada tahap kalkulasi, is_args tidak diperhitungkan dengan benar
  • Pada tahap penulisan, is_args mempengaruhi jumlah karakter yang ditulis
  • Akibatnya: buffer dialokasikan terlalu kecil, tapi data yang ditulis lebih besar
  • Hasil: heap overflow yang dapat menyebabkan memory corruption

Konteks Memory Safety

NGINX ditulis dalam C — bahasa yang tidak memiliki built-in memory safety protections seperti garbage collection atau bounds checking otomatis. Hal ini membuat kerentanan memory corruption seperti heap buffer overflow menjadi mungkin.

Mitigation yang Sudah Ada

  • • ASLR (Address Space Layout Randomization)
  • • PIE (Position Independent Executable)
  • • RELRO (Relocation Read-Only)
  • • NX/DEP (No-Execute/Data Execution Prevention)

Kenapa Tetap Rentan?

  • • Heap layouts dapat diprediksi
  • • Race conditions dapat di-exploit
  • • Environment-specific exploitation mungkin
  • • Combined dengan info leak bisa bypass ASLR
4

Attack Surface Analysis

Kenapa NGINX Menjadi High-Value Target?

NGINX biasanya beroperasi di layer paling depan dari infrastruktur — sebagai edge gateway yang menerima semua request sebelum diteruskan ke backend. Posisi strategis ini menjadikan NGINX sebagai "front door" yang sangat berharga bagi attacker.

Reverse Proxy Semua traffic melewati NGINX
Load Balancer Entry point ke seluruh cluster
CDN Origin Serving static & dynamic content
WAF Layer Security gateway yang sudah dikompromi
Ingress Controller Kubernetes routing layer
API Gateway Pengelolaan API request

Skenario Serangan Jika NGINX Compromised

Traffic Interception

Attacker dapat membaca seluruh traffic yang melewati NGINX, termasuk credentials, tokens, dan data sensitif.

Request Smuggling

Manipulasi routing untuk mengrim request ke backend yang salah, bypassing security controls.

Session Hijacking

Mencuri session tokens dan cookies untuk impersonate legitimate users.

Lateral Movement

Menggunakan compromised NGINX sebagai pivot point untuk menyerang internal services.

Komponen Risiko Severity Likelihood
Reverse Proxy Traffic interception, credential theft CRITICAL HIGH
Kubernetes Ingress Cluster compromise, lateral movement CRITICAL HIGH
API Gateway API abuse, data exfiltration HIGH HIGH
WAF Layer Security bypass, backend exploitation CRITICAL MEDIUM
Load Balancer Traffic manipulation, DoS HIGH MEDIUM
5

Potensi Remote Code Execution

NGINX Rift bukan hanya DoS — Potensi RCE

Official NGINX Assessment
Medium Severity

NGINX mengkategorikan bug ini sebagai kerentanan medium karena exploitability dianggap kompleks.

DepthFirst Security Assessment
Critical - RCE Possible

Peneliti berhasil mendemonstrasikan potential untuk remote code execution pada kondisi tertentu.

RCE Exploitation Chain

1

Heap Overflow Trigger

Craft malicious request yang memicu buffer overflow pada rewrite module

2

Heap Corruption

Overflow mencorrupt heap metadata, mengubah control flow

3

Memory Write Primitive

Attacker mendapatkan primitive untuk menulis ke arbitrary memory locations

4

Code Execution

Overwrite function pointers atau hijack execution flow ke shellcode

5

Remote Code Execution

Attacker mendapatkan shell dengan privileges user nginx (biasanya www-data)

Faktor yang Menyulitkan Exploitation

  • • Memory corruption exploitation memerlukan environment-specific knowledge
  • • ASLR mengacak alamat memory setiap boot
  • • Heap layout berbeda antar sistem operasi dan konfigurasi
  • • Race conditions antar worker threads
  • • Reliability issues dalam exploitation

Mitigation yang Membantu

  • • ASLR membuat address leak diperlukan untuk reliable exploit
  • • Worker isolation membatasi dampak per process
  • • SELinux/AppArmor membatasi dampak dari compromised process
  • • seccomp membatasi system calls yang tersedia
  • • Modern kernel protections
6

Kubernetes & Cloud-Native Risk

NGINX di Ecosistem Kubernetes

NGINX Ingress Controller adalah salah satu ingress controller paling populer di Kubernetes. Penggunaannya yang luas menjadikan CVE-2026-42945 sebagai kritikal concern bagi tim keamanan Kubernetes globally.

40%+
Kubernetes clusters menggunakan NGINX Ingress
1000+
Pods per cluster menggunakan ingress
ALL
External traffic melewati ingress

Skenario Serangan di Kubernetes

1
Ingress Controller Compromised

Attacker yang berhasil exploit NGINX Ingress dapat memanipulasi routing, mencuri credentials dari traffic, atau melakukan lateral movement ke pod lain.

2
Service Account Token Theft

Ingress controller memiliki akses ke service account tokens. Compromised ingress dapat mencuri tokens untuk privilege escalation.

3
Cross-Namespace Access

Dengan compromised ingress, attacker dapat membuat request bypass service mesh policies untuk mengakses services di namespace lain.

Cloud-Native Dependency Chain

NGINX bukan hanya web server — ia adalah critical component dalam supply chain cloud-native modern. Berikut bagaimana kerentanan ini mempengaruhi architectural layers:

Platform Layer

  • • Kubernetes Ingress Controllers (NGINX, GKE Ingress)
  • • Service Mesh sidecars ( Envoy-based)
  • • API Gateway platforms

Application Layer

  • • Microservices reverse proxy
  • • Static asset servers
  • • Load balancers for distributed systems

Infrastructure Layer

  • • Cloud provider managed services
  • • CDN origin servers
  • • Container networking proxies

CI/CD Pipeline

  • • Build environment proxies
  • • Deployment tooling proxies
  • • Artifact registry frontends
7

Potensi Dampak bagi Infrastruktur Digital Indonesia

1.435.789
Server NGINX di Indonesia

Angka ini bukan sekadar statistik — ini merepresentasikan attack surface nasional yang massive. Dari startup fintech hingga enterprise banking, dari e-commerce regional hingga government critical infrastructure, NGINX telah menjadi tulang punggung digital Indonesia.

Sektor yang Terdampak

  • Fintech & Perbankan

    Digital banking, payment gateways, dan mobile apps

  • E-Commerce

    Marketplace, online retail, dan logistics platforms

  • Startup Ecosystem

    Tech startups menggunakan NGINX sebagai default stack

  • Government

    Portal layanan publik dan sistem informasi pemerintah

Risiko Spesifik Indonesia

  • Technical Debt

    Banyak server masih menggunakan NGINX versi lama tanpa patching rutin

  • Visibility Gap

    Asset inventory tidak selalu ter-maintain dengan baik

  • Container Image Obsolete

    Docker images dengan NGINX lawas masih digunakan di production

  • Unmanaged Ingress

    Kubernetes clusters tanpa ingress visibility yang memadai

Insight: Cloud-Native Adoption di Indonesia

Semakin besar adopsi cloud-native dan Kubernetes di Indonesia, semakin besar pula ketergantungan terhadap komponen edge seperti NGINX. Namun, banyak organisasi yang:

  • Tidak memiliki visibility penuh terhadap deployment NGINX mereka
  • Menggunakan default configurations tanpa custom hardening
  • Mempercayai bahwa "default secure" — padahal banyak yang perlu di-optimize
  • Tidak melakukan audit konfigurasi secara berkala

Reality Check: Banyak organisasi di Indonesia memiliki "shadow infrastructure" — NGINX deployments yang dibuat engineer individu tanpa dokumentasi formal, tidak terpatch, dan tidak ter-monitor. Ini adalah attack surface yang sering diabaikan.

Risiko Mass Exploitation

Begitu proof-of-concept exploit dipublikasikan — yang biasanya terjadi dalam hitungan minggu setelah CVE disclosure — attacker dapat melakukan mass scanning terhadap seluruh IP range Indonesia.

Phase 1
Reconnaissance
Shodan, Censys, mass scanning
Phase 2
Vulnerability Check
Automated CVE probing
Phase 3
Exploitation
Mass RCE or DoS campaigns
8

Produk & Versi Terdampak

Produk Versi Terdampak Fixed Version Status
NGINX Open Source 0.6.27 - 1.30.0 1.30.1, 1.31.0+ PATCHED
NGINX Plus R30 - R31 R31 P1+ PATCHED
NGINX Instance Manager 2.16.0 - 2.21.1 2.22.0+ UPDATE REQUIRED
NGINX Ingress Controller 3.5.0 - 3.7.2, 4.0.0 - 4.0.1, 5.0.0 - 5.4.1 3.8.0+, 4.1.0+, 5.5.0+ CRITICAL
NGINX Gateway Fabric 1.3.0 - 1.6.2, 2.0.0 - 2.5.1 1.7.0+, 2.6.0+ UPDATE REQUIRED
NGINX App Protect WAF 4.9.0 - 4.16.0, 5.1.0 - 5.8.0 4.17.0+, 5.9.0+ UPDATE REQUIRED
F5 WAF for NGINX 5.9.0 - 5.12.1 5.13.0+ UPDATE REQUIRED
F5 DoS for NGINX 4.8.0 4.9.0+ UPDATE REQUIRED
NGINX App Protect DoS 4.3.0 - 4.7.0 4.8.0+ UPDATE REQUIRED

Produk yang TIDAK Terdampak

F5 Distributed Cloud F5 Silverline NGINX One Console BIG-IP BIG-IQ F5OS Traffix SDC F5 AI Gateway

Cara Mengecek Versi NGINX

# Check NGINX version
nginx -v
# Detailed version info
nginx -V
# Check installed package version
apt list --installed 2>/dev/null | grep nginx
9

Contoh Konfigurasi Rentan

Peringatan: Konfigurasi Berikut Rentan!

Kombinasi directive rewrite dengan set yang menggunakan regex capture seperti $1 bersama dengan karakter ? dapat memicu kondisi rentan. Review konfigurasi Anda!

1 Pattern Rentan Klasik

# VULNERABLE CONFIGURATION
server {
listen 80;
server_name example.com;
# Pattern berbahaya: rewrite + set + $1 + ?
rewrite ^/(.*)$ /index.php?q=$1? last;
set $test $1;
location / {
proxy_pass http://backend;
}
}
Kenapa Rentan? Kombinasi $1 dari regex capture dan karakter ? dalam query string dapat memicu inkonsistensi buffer calculation.

2 Multiple Rewrite dengan Capture

# POTENTIALLY VULNERABLE
server {
listen 80;
# Multiple captures in same location
rewrite ^/api/v1/(.*)/(.*)$ /api/v2/$1?id=$2? redirect;
rewrite ^/legacy/(.*)$ /new?id=$1? permanent;
set $original_uri $1;
set $processed $2;
location / {
try_files $uri $uri/ =404;
}
}

3 Rewrite dengan Conditional Logic

# CAUTION - COMPLEX CONDITIONAL
map $request_uri $redirect_target {
~^/old/(.*)$ /new/$1?src=legacy;
~^/deprecated/(.*)$ /archive?id=$1;
default false;
}
server {
listen 80;
if ($redirect_target) {
rewrite ^ $redirect_target redirect;
}
# Using captured group
set $source $1;
}
}

Alternatif Aman: Named Capture

Daripada menggunakan positional capture seperti $1, gunakan named capture yang lebih aman dan readable:

# SAFER CONFIGURATION - Using named capture
server {
listen 80;
# Named capture (safer alternative)
rewrite ^/(?<path>.*)$ /index.php?q=$path? last;
location / {
proxy_pass http://backend;
}
}
10

Detection Engineering & SOC Monitoring

Log-Based Detection

Monitor log NGINX untuk indikator compromise atau exploitation attempt:

ERROR LOG PATTERN
worker process X exited on signal 11
SEGMENTATION FAULT
segmentation fault in ngx_http_rewrite_module
MALLOC CORRUPTION
malloc(): memory corruption

Metrics-Based Detection

Monitor metrik untuk anomali yang mengindikasikan exploitation:

WORKER RESTART RATE
nginx.worker.restarts > threshold
CPU ANOMALY
nginx.worker.cpu > 80% sustained
MEMORY SPIKE
nginx.worker.memory > baseline + 50%

SIEM Detection Rules (Sigma Format)

title: NGINX Worker Crash Detection
logsource: product: nginx
detection:
condition: selection and not filter
selection:
- "signal 11"
- "worker process exited"
- "segmentation fault"
filter:
- "graceful shutdown" (whitelisted)
level: high

Quick Audit Commands

# Find vulnerable rewrite patterns
grep -rn "rewrite" /etc/nginx/ | grep '\$1'
# Check for set directive with capture
grep -rn "set.*\$[0-9]" /etc/nginx/
# List all NGINX config files
find /etc/nginx -name "*.conf" -exec grep -l "rewrite" {} \;
# Test configuration syntax
nginx -t
11

Mitigasi & Remediasi

Prioritas Utama: Patch Sekarang!

NGINX Open Source
apt update && apt upgrade nginx
Minimal version: 1.30.1
NGINX Ingress Controller
helm upgrade ingress-nginx ingress-nginx --version 3.4.1
Minimal version: 3.4.1

Langkah Mitigasi Berurutan

1

Patch NGINX ke Versi Terkini

Upgrade ke NGINX 1.30.1 atau lebih tinggi. Untuk NGINX Ingress Controller, upgrade ke 3.4.1+ atau 4.x+.

# Check current version first
nginx -v
2

Audit Konfigurasi Rewrite

Review semua directive rewrite, set, dan penggunaan regex capture. Ganti positional capture dengan named capture.

# Audit command
grep -rn "rewrite.*\$1" /etc/nginx/
3

Harden Worker Process Environment

Aktifkan security features seperti worker isolation, privilege separation, dan resource limits.

# Add to nginx.conf
worker_processes auto; worker_rlimit_nofile 65535;
4

Implementasi Monitoring

Set up alerting untuk worker crashes, memory anomalies, dan exploitation indicators.

# Enable error logging
error_log /var/log/nginx/error.log warn;

DevSecOps Mitigation Workflow

1
Scan
Container image scan
2
Patch
Update base images
3
Test
Config validation
4
Deploy
Canary rollout
12

Incident Response Checklist

Jika NGINX Terindikasi Compromised

Immediate Actions (0-15 menit)

  • Isolate affected server dari network
  • Preserve evidence (logs, memory dump, disk image)
  • Jangan matikan server — untuk forensic preservation
  • Rotate semua credentials yang melewati NGINX
  • Notify security team dan escalation procedures

Forensic Collection (15-60 menit)

  • Capture full memory dump
  • Collect all NGINX logs
  • Screenshot network connections
  • Document timeline dari awal incident
  • Identify scope of compromise

Investigation Priorities

1
Determine Attack Vector

Apakah exploitation berhasil? Apa metode yang digunakan?

2
Assess Impact Scope

Service apa saja yang berpotensi compromised? Data apa yang mungkin accessed?

3
Identify Lateral Movement

Apakah attacker menggunakan compromised NGINX untuk pivot ke sistem lain?

4
Credential Audit

Rotate semua credentials, tokens, API keys yang mungkin terekspos

Eradication

  • • Wipe dan rebuild compromised servers
  • • Update semua secrets dan credentials
  • • Review dan harden firewall rules
  • • Update intrusion detection signatures
  • • Patch semua sistem yang berinteraksi dengan NGINX

Recovery

  • • Restore dari clean backup
  • • Verifikasi integrity semua systems
  • • Implementasi enhanced monitoring
  • • Conduct penetration testing post-recovery
  • • Document lessons learned dan update procedures
15

Frequently Asked Questions (FAQ)

Layanan Profesional

Lindungi Infrastruktur NGINX Anda
Sebelum Serangan Menemukan Anda

Tim expert KRES.ID siap membantu organisasi Anda melakukan vulnerability assessment, hardening, dan security review untuk memastikan infrastruktur NGINX terlindungi dari NGINX Rift dan ancaman lainnya.

Vulnerability Assessment

Identifikasi konfigurasi rentan dan exposure points

NGINX Hardening

Implementasi security best practices untuk NGINX

Kubernetes Security

Audit NGINX Ingress Controller dan cluster security

14

Risk Prioritization Matrix

Prioritas Skenario Dampak Timeline
CRITICAL NGINX ingress exposed to internet tanpa patching RCE, full cluster compromise SEKARANG
HIGH Reverse proxy dengan vulnerable rewrite config DoS, traffic interception <24 jam
MEDIUM API gateway dengan rewrite rules tapi sudah hardened Limited DoS risk 1-7 hari
LOW NGINX tanpa rewrite module atau sudah upgraded Minimal risk 1-2 minggu

NGINX Security Hardening Checklist

Configuration

  • Upgrade ke NGINX 1.30.1+
  • Ganti positional capture dengan named capture
  • Disable server_tokens
  • Remove unused modules

System Security

  • Aktifkan ASLR di OS level
  • Implement worker isolation
  • Configure seccomp filtering
  • Enable audit logging
16

Kesimpulan & Rekomendasi

Key Takeaways

Bug Lama Bisa Tersembunyi Lama

18 tahun bug NGINX Rift bersembunyi sebelum ditemukan. Ini menunjukkan bahwa even mature software memerlukan continuous security scrutiny.

Edge Infrastructure = High Value Target

Reverse proxy, ingress controller, dan load balancer adalah layer paling kritis — compromise di sini berarti compromise seluruh stack.

Memory Safety Tetap Prioritas

Heap buffer overflow tetap menjadi vector paling berbahaya untuk RCE. Organizations perlu mempertimbangkan memory-safe alternatives.

Indonesia Exposure Signifikan

Dengan 1,435,789 server NGINX di Indonesia, attack surface nasional sangat besar. Patch management harus jadi prioritas.

Immediate Action Items

IMMEDIATE
Patch NGINX ke 1.30.1+
THIS WEEK
Audit rewrite configurations
ONGOING
Implement monitoring & alerting
1.435.789
Server NGINX di Indonesia Terdampak

Angka ini merepresentasikan attack surface yang massive. Dengan semakin besarnya adopsi cloud-native dan Kubernetes di Indonesia, ketergantungan terhadap komponen edge seperti NGINX semakin tinggi. Jangan tunggu sampai exploited — patch sekarang.

Tindakan Sekarang

Lindungi Infrastruktur Anda dari
NGINX Rift & Ancaman Similar

Apakah sistem NGINX Anda berpotensi terdampak? Audit sekarang atau hubungi tim keamanan kami untuk professional assessment.

Vulnerability Assessment

Comprehensive scan untukidentifikasi exposure

Expert Consultation

Dapatkan bantuan dari tim incident response kami

Security Audit

Deep dive untuk NGINX & Kubernetes security

Laporan ini diperbarui terakhir: 14 Mei 2026, 08:00 UTC

Informasi dalam laporan ini bersifat fact-based analysis untuk tujuan educational dan security awareness.

Social Media Caption

🚨 CRITICAL: CVE-2026-42945 "NGINX Rift" - kerentanan heap buffer overflow yang telah bersembunyi di codebase NGINX selama 18 TAHUN. Dengan skor CVSS 9.8 dan potensi RCE, lebih dari 1,4 juta server NGINX di Indonesia kini exposed. Patch sekarang ke versi 1.30.1+ sebelum attacker menemukan Anda. #NGINXRift #CVE202642945 #Cybersecurity #Indonesia

Hashtag Recommendations

#NGINXRift #CVE202642945 #Cybersecurity #NGINXSecurity #KubernetesSecurity #CloudNative #ZeroDay #RCE #IndonesiaCyber #VulnerabilityAlert #DevSecOps #PatchNow