On the day of this writing, Rapid7 and F5 jointly disclosed CVE-2026-123007, a critical integer underflow vulnerability (CWE-191) in NGINX's HTTP/2 implementation carrying a CVSS v4 score of 9.2 (Critical). Under specific conditions, a remote, unauthenticated client can trigger memory corruption inside an NGINX worker process and achieve code execution in that worker's context.
This is about as bad as it gets for edge infrastructure. NGINX fronts an enormous share of the internet — as a web server, reverse proxy, API gateway, load balancer, and ingress component. The attack surface here is the exact interface you expose to the entire world: the HTTP/2 listener. No credentials, no session, no insider access required. If you run NGINX with HTTP/2 enabled and you have not patched, assume your perimeter is soft until proven otherwise.
Defenders need to do three things immediately: identify every NGINX instance with HTTP/2 enabled, apply the fixed build from F5/NGINX, and hunt for signs of pre-patch exploitation. This post walks through the technical mechanics, detection engineering, and remediation in that order.
Technical Analysis
Affected Component
The flaw lives in NGINX's HTTP/2 flow-control accounting. Per the joint disclosure, NGINX can miscalculate how much response data an HTTP/2 client has permitted it to send. The vulnerability is classified as CWE-191 (Integer Underflow).
| Field | Detail |
|---|---|
| CVE | CVE-2026-123007 |
| CWE | CWE-191 — Integer Underflow (Wrap or Wraparound) |
| CVSS v4 | 9.2 (Critical) |
| Component | NGINX HTTP/2 module (ngx_http_v2_module) flow-control handling |
| Impact | Memory corruption → information disclosure → worker-context remote code execution |
| Authentication | None required |
How the Attack Works (Defender's View)
The exploitation sequence, as described in the disclosure, breaks down as follows:
- Session establishment. The attacker opens an HTTP/2 connection to the target server. HTTP/2 multiplexes streams over a single TCP connection, which matters for detection — all of the malicious behavior lives inside one connection.
- Flow-control manipulation. The attacker queues response data and then cancels it — in HTTP/2 terms, this maps to issuing
RST_STREAMframes against streams with pending outbound data. This cancellation path corrupts NGINX's internal accounting of the connection-level or stream-level send window. - Integer underflow. Because of the flawed accounting, a subtraction wraps below zero. NGINX now believes it is authorized to send an enormous amount of data — the send window has effectively underflowed to a massive unsigned value.
- Invalid length in a subsequent copy. When NGINX processes a later response on that connection, it uses this invalid length in a memory copy operation. The result is heap memory corruption inside the worker process.
- Impact. Depending on heap layout and exploit sophistication, the corruption yields information disclosure (leaking adjacent worker memory — think session tokens, TLS key material in process memory, other tenants' request data) or, under the right conditions, arbitrary code execution in the security context of the NGINX worker (typically the
nginx/www-datauser).
Two defensive nuances worth internalizing:
- Worker context is not root — but it is far from harmless. The worker can read NGINX's TLS private keys, see all decrypted traffic, connect to upstream application backends, and serve as a foothold for privilege escalation. Treat worker-context RCE as a full perimeter breach.
- The trigger is stream cancellation. Abnormal volumes of
RST_STREAMframes, especially client-initiated resets against streams with pending large responses, are the behavioral signature. This is your detection pivot.
Exploitation Status
At the time of disclosure, the vulnerability is being released as fixed — coordinated disclosure between Rapid7 (researcher) and F5 (vendor). There is no confirmed in-the-wild exploitation reported in the initial advisory, and no public weaponized PoC at disclosure time. Do not let that lower your urgency. NGINX HTTP/2 vulnerabilities historically attract rapid researcher attention, exploit write-ups follow quickly, and internet-wide scanning for unpatched instances typically begins within days of a critical edge RCE disclosure. The window between "fixed and published" and "mass scanning" is measured in hours-to-days, not weeks. Check CISA's Known Exploited Vulnerabilities (KEV) catalog daily; if this CVE lands there, federal remediation deadlines will follow and the threat picture changes materially.
Detection & Response
This is a server-side memory corruption bug triggered over the wire, which means detection is layered: network behavior (RST_STREAM anomalies), host behavior (worker crashes and respawns), and post-exploitation behavior (workers doing things workers never do). The highest-fidelity signal is the last one — a legitimate NGINX worker process spawning a shell or making unexpected outbound connections is an alarm bell in any environment.
SIGMA Rules
The following rules target post-exploitation and crash-loop behavior on Linux hosts running NGINX. Deploy them via your Sysmon-for-Linux, auditd, or EDR pipeline.
---
title: NGINX Worker Process Spawning Shell or Command Interpreter
id: 1b7c4f2a-9e3d-4a1b-8c6f-2d5e7a9b0c1d
status: experimental
description: Detects an NGINX worker process spawning a shell, interpreter, or download utility — consistent with post-exploitation activity following CVE-2026-123007 HTTP/2 worker-context code execution.
references:
- https://www.rapid7.com/blog/post/ve-cve-2026-123007-critical-nginx-http-2-integer-underflow-leads-to-rce-fixed
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.execution
- attack.t1059
- attack.t1190
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/nginx'
ParentCommandLine|contains:
- 'worker process'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/python'
- '/python3'
- '/perl'
- '/curl'
- '/wget'
- '/nc'
- '/ncat'
- '/socat'
condition: selection_parent and selection_child
falsepositives:
- Extremely rare; some legacy health-check or CGI-style wrapper scripts may invoke shells from worker context — investigate all hits
level: critical
---
title: NGINX Worker Crash or Rapid Respawn Loop (Potential Memory Corruption Exploit Attempt)
id: 2c8d5e3b-0f4a-5b2c-9d7e-3a6f8b0c1d2e
status: experimental
description: Detects repeated NGINX worker process termination (segfault/abort) messages in short succession, which may indicate exploit attempts against CVE-2026-123007 causing heap corruption and worker crashes.
references:
- https://www.rapid7.com/blog/post/ve-cve-2026-123007-critical-nginx-http-2-integer-underflow-leads-to-rce-fixed
author: Security Arsenal
date: 2026/04/06
tags:
- attack.initial_access
- attack.t1190
logsource:
product: linux
service: syslog
detection:
selection:
- Message|contains:
- 'segfault at'
- 'general protection fault'
Image|endswith: '/nginx'
- Message|contains:
- 'worker process'
- 'exited on signal 11'
- 'exited on signal 6'
condition: selection
falsepositives:
- Buggy third-party NGINX modules can crash workers under load; correlate crash bursts with HTTP/2 traffic anomalies before dismissing
level: high
---
title: NGINX Worker Initiating Outbound Network Connection to Uncommon Destination
id: 3d9e6f4c-1a5b-6c3d-0e8f-4b7a9c1d2e3f
status: experimental
description: Detects the NGINX worker process establishing outbound connections to non-upstream destinations, a potential indicator of reverse shell or C2 activity after CVE-2026-123007 exploitation.
references:
- https://www.rapid7.com/blog/post/ve-cve-2026-123007-critical-nginx-http-2-integer-underflow-leads-to-rce-fixed
- https://attack.mitre.org/techniques/T1071/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.command_and_control
- attack.t1071
logsource:
category: network_connection
product: linux
detection:
selection:
Image|endswith: '/nginx'
Initiated: 'true'
filter_upstreams:
DestinationPort:
- 80
- 443
- 8080
- 8443
- 3000
- 5000
condition: selection and not filter_upstreams
falsepositives:
- NGINX acting as a forward proxy or connecting to non-standard upstream ports — baseline your upstream architecture and tune the port list
level: high
A note on tuning: the outbound connection rule is only as good as your knowledge of your own upstream topology. Before deploying, inventory every destination port your NGINX instances legitimately connect to (application servers, auth services, caching tiers) and bake them into the filter. A rule that fires on every proxied request gets disabled in a week.
KQL — Microsoft Sentinel / Defender
If you ingest NGINX host telemetry via Syslog/CEF, or run Defender for Endpoint on your Linux edge servers, these hunts apply. The first targets crash artifacts (pre- or failed exploitation), the second targets post-exploitation process lineage.
// Hunt 1: NGINX worker segfaults/crashes — possible CVE-2026-123007 exploit attempts
// Source: Syslog ingestion from NGINX hosts
Syslog
| where TimeGenerated > ago(7d)
| where ProcessName =~ "nginx" or SyslogMessage has "nginx"
| where SyslogMessage has_any ("segfault", "exited on signal 11", "exited on signal 6", "general protection fault", "worker process")
| summarize CrashCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by Computer, SyslogMessage
| where CrashCount >= 3
| order by CrashCount desc
// Hunt 2: Shell or tooling spawned under nginx worker — post-exploitation indicator
// Requires MDE for Linux (DeviceProcessEvents) or equivalent process telemetry
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName =~ "nginx"
| where FileName in~ ("sh", "bash", "dash", "zsh", "python", "python3", "perl", "curl", "wget", "nc", "ncat", "socat")
| project TimeGenerated, DeviceName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, AccountName
| order by TimeGenerated desc
// Hunt 3: HTTP/2 client reset anomaly — surges in client-cancelled requests per source IP
// Requires NGINX access logs ingested into a custom table (replace NginxAccessLogs_CL with your table)
// Flags sources with abnormally high 499 (client closed request) ratios, consistent with RST_STREAM abuse patterns
NginxAccessLogs_CL
| where TimeGenerated > ago(24h)
| summarize TotalRequests = count(), ClientCancels = countif(StatusCode == 499) by RemoteIP
| extend CancelRatio = todouble(ClientCancels) / todouble(TotalRequests)
| where ClientCancels > 100 and CancelRatio > 0.5
| order by ClientCancels desc
The third hunt deserves explanation: NGINX logs status 499 when a client closes the connection before the response completes. The CVE-2026-123007 trigger is client-initiated cancellation of queued response data. A source IP generating high volumes of rapid cancellations against large responses is behaving exactly like someone probing or exploiting the flow-control accounting bug. Tune the thresholds to your baseline — a busy API edge will look different from a static content server.
Velociraptor VQL
For DFIR teams validating whether an NGINX host shows signs of compromise, this artifact pulls the process tree and network state of running NGINX workers and flags anomalies.
-- CVE-2026-123007 NGINX Worker Anomaly Hunt
-- Identifies nginx worker processes with suspicious children or unexpected outbound connections
LET workers = SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Name =~ 'nginx' OR Exe =~ 'nginx'
LET suspicious_children = SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Ppid IN (SELECT Pid FROM workers)
AND Name =~ '(sh|bash|dash|zsh|python|perl|curl|wget|nc|ncat|socat)'
LET worker_conns = SELECT Pid, Name, Status, Laddr, Lport, Raddr, Rport
FROM netstat()
WHERE Name =~ 'nginx' AND Status =~ 'ESTABLISHED'
AND NOT Rport IN (80, 443, 8080, 8443)
SELECT * FROM workers
UNION ALL
SELECT * FROM suspicious_children
Run this as a hunt across your NGINX fleet. Any hit in suspicious_children is a stop-everything finding. Entries in worker_conns to unfamiliar remote addresses warrant immediate review against your upstream inventory.
Remediation
1. Patch — This Is the Only Complete Fix
Upgrade NGINX to the fixed release published by F5/NGINX in coordination with this disclosure. Consult the official advisories for the exact fixed version for your branch (mainline vs. stable, NGINX Open Source vs. NGINX Plus):
- Rapid7 disclosure: https://www.rapid7.com/blog/post/ve-cve-2026-123007-critical-nginx-http-2-integer-underflow-leads-to-rce-fixed
- F5/NGINX security advisories: https://my.f5.com/manage/s/article/K000139696 (verify against the current F5 advisory index at https://my.f5.com/manage/s/article/K000139696 and nginx.org security announcements)
If you consume NGINX through a distribution package (Ubuntu/Debian nginx, RHEL/EPEL, Alpine), patch via your package manager the moment your distro publishes the fixed build — and verify the changelog explicitly references CVE-2026-123007, not just a version bump.
2. Inventory — You Cannot Patch What You Have Not Found
NGINX hides in places: container base images, Kubernetes ingress controllers, sidecar proxies, embedded in third-party appliances. Sweep for it now:
#!/bin/bash
# CVE-2026-123007 NGINX exposure audit and mitigation verification script
# Run on each host; for fleet-wide runs, wrap with Ansible/Salt/pdsh.
echo "=== [1] NGINX presence and version ==="
if command -v nginx >/dev/null 2>&1; then
nginx -v 2>&1
echo "-- Compile-time modules (confirm http_v2_module presence):"
nginx -V 2>&1 | tr ' ' '\n' | grep -i 'http_v2' || echo "http_v2_module not detected in build flags"
else
echo "nginx binary not found on this host."
fi
echo ""
echo "=== [2] HTTP/2 enabled in configuration? ==="
NGINX_CONF_ROOT="/etc/nginx"
if [ -d "$NGINX_CONF_ROOT" ]; then
grep -rniE 'listen\s+.*(http2|ssl.*http2)' "$NGINX_CONF_ROOT" 2>/dev/null | grep -v '^\s*#'
grep -rniE '^\s*http2\s+on' "$NGINX_CONF_ROOT" 2>/dev/null
if [ $? -ne 0 ]; then echo "No explicit HTTP/2 listeners found in $NGINX_CONF_ROOT."; fi
fi
echo ""
echo "=== [3] Listening sockets (confirm exposure) ==="
ss -tlnp 2>/dev/null | grep -i nginx || netstat -tlnp 2>/dev/null | grep -i nginx
echo ""
echo "=== [4] Recent worker crash evidence (segfault / signal 11) ==="
(journalctl --since "14 days ago" 2>/dev/null | grep -iE 'nginx.*(segfault|signal 11|signal 6)') \
|| (grep -iE 'nginx.*(segfault|signal 11)' /var/log/kern.log /var/log/syslog /var/log/messages 2>/dev/null) \
|| echo "No crash evidence found in available logs."
echo ""
echo "=== [5] Package version check (Debian/Ubuntu and RHEL families) ==="
if command -v dpkg >/dev/null 2>&1; then
dpkg -l | grep -E '^ii\s+nginx'
echo "-- Pending security updates:"
apt list --upgradable 2>/dev/null | grep -i nginx || echo "No nginx updates pending (verify fixed build availability against CVE-2026-123007)."
elif command -v rpm >/dev/null 2>&1; then
rpm -qa | grep -i nginx
fi
echo ""
echo "=== [6] TEMPORARY WORKAROUND CHECK: HTTP/2 disabled? ==="
echo "If patching is not immediately possible, disable HTTP/2 on all listeners:"
echo " - Remove 'http2' from listen directives, OR set 'http2 off;'"
echo " - Then reload: nginx -t && systemctl reload nginx"
grep -rniE 'http2' "$NGINX_CONF_ROOT" 2>/dev/null | grep -viE '^\s*#' | head -20
echo ""
echo "Audit complete. Remediate any HTTP/2-enabled, unpatched instance immediately."
3. Workaround (If You Cannot Patch Today)
The vulnerability is in the HTTP/2 code path. Disabling HTTP/2 removes the attack surface entirely. Remove http2 from listen directives (or set http2 off; on builds using the newer directive), run nginx -t, and reload. You will take a performance hit on multiplexed clients — that is an acceptable trade against a CVSS 9.2 unauthenticated RCE. Note that HTTP/2 is frequently enabled by default in modern reverse-proxy and ingress configurations, so verify rather than assume.
Additionally: place unpatched instances behind a WAF or L7 proxy that terminates HTTP/2 upstream of NGINX, and rate-limit client-initiated stream resets where your edge tooling allows it. This is a mitigating control, not a fix — it can reduce exploit reliability but does not close the flaw.
4. Post-Patch Actions
- Hunt retroactively. Run the crash and process-lineage detections above across at least the last 30 days. A patched server with a prior worker-context compromise is still compromised — the patch closes the door, it does not evict anyone already inside.
- Rotate exposed secrets on any host showing suspicious worker behavior: TLS private keys, upstream credentials, API tokens readable by the worker process.
- Monitor CISA KEV. If CVE-2026-123007 is added, escalate to emergency change management and treat all unpatched historical exposure as an incident until scoped otherwise.
- Update golden images and Helm charts. Patching running instances while your container images and ingress-controller templates still ship vulnerable NGINX builds guarantees re-exposure on the next deploy.
5. Hardening for the Long Term
- Run workers under a dedicated unprivileged user (standard practice, but verify — containers running NGINX as root are common and turn worker RCE into root RCE).
- Deploy NGINX inside SELinux/AppArmor confinement; a confined worker sharply constrains post-exploitation options.
- Centralize NGINX error and access logs off-host. Exploit attempts against memory corruption bugs are noisy at the crash layer, and attackers with worker context can scrub local logs.
- Subscribe to the F5/NGINX security announcement channels and Rapid7's disclosure feed so the next one doesn't reach you via a scan on your perimeter.
Closing
CVE-2026-123007 is a textbook worst-case edge vulnerability: unauthenticated, remotely triggerable, in the code path that terminates your inbound traffic, with impact ranging from memory disclosure to code execution. The fix exists. The detection content above gives you coverage for both the exploitation window and the post-compromise phase. What remains is execution speed. Inventory today, patch today, hunt this week.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.