Skip to main content

CVE-2026-123633: NGINX HTTP/2 Use-After-Free DoS & RCE

5 min read Runtime Rebel Intel
Primary source: unit42.paloaltonetworks.com

This article was written by a language model from the source above and was not reviewed by a human before publication. Verify anything operational against the original. Editorial policy

Key points
  • Immediate impact: Unauthenticated attackers can cause denial of service; remote code execution is possible under specific conditions.
  • Affected systems: NGINX versions 1.19.7-1.30.6, 1.31.0-1.31.8, and NGINX Plus with HTTP/2 enabled.
  • Remediation: Upgrade NGINX to versions 1.30.7 or 1.31.9, or apply vendor patches containing the fix.

Advertisement

A significant vulnerability, tracked as CVE-2026-123633, has been identified in NGINX servers when configured to accept HTTP/2 client connections. This use-after-free flaw can lead to a denial of service (DoS) for unauthenticated attackers and, under specific circumstances, potentially remote code execution (RCE). Security professionals must prioritize understanding this vulnerability and implementing the necessary mitigations to protect their infrastructure.

Technical Analysis of NGINX HTTP/2 Use-After-Free CVE-2026-123633

The vulnerability stems from a logical flaw within NGINX’s HTTP/2 connection handling, specifically when free worker connections are scarce. According to research by Palo Alto Networks Unit 42, a fragmented HTTP/2 request can leave an active connection mistakenly marked as reusable. When the NGINX server is under connection pressure and requires additional worker slots, it may prematurely reclaim and free the memory associated with this connection, even though an active request (such as a DNS resolver operation) is still utilizing that memory. This premature memory deallocation creates a use-after-free condition.

The Use-After-Free Mechanism

The core of the issue lies in the ngx_http_v2_create_stream() function failing to clear a connection’s reusable mark after a stream is created. Normally, this mark should be cleared once a request begins. However, when a client sends only a partial HTTP/2 HEADERS frame header, ngx_http_v2_handle_connection() marks the connection reusable and returns early. If the client then sends the remaining header bytes, ngx_http_v2_create_stream() proceeds to build a live stream, but crucially, it leaves the reusable mark set. This leaves NGINX with an active request on a connection that its cleanup logic still considers reusable.

In scenarios where NGINX experiences a drain on connections—for instance, when a request-time DNS lookup requires opening a new UDP socket and free connection slots fall to a critical low (one sixteenth of worker_connections or below)—the ngx_drain_connections() function activates. This function then selects entries from the reusable queue, including the erroneously marked active connection, sets its close flag, and calls its read handler. If the client has already reset its socket, NGINX attempts a write (e.g., sending GOAWAY), which fails due to a “Connection reset by peer” error. This failure leads NGINX to finalize the connection and request, causing ngx_resolve_name_done() to free resolver state memory while the original lookup still holds a pointer to it, resulting in the use-after-free.

Impact and Attacker Capabilities

For an unauthenticated attacker, the most direct consequence of CVE-2026-123633 is a denial of service. By triggering the use-after-free condition, an attacker can crash the NGINX worker process, making the server unavailable. While NGINX typically restarts quickly, sustained attacks could severely degrade service availability. The severity rating in F5’s CVE record for this vulnerability is 9.2 Critical under CVSS 4.0 and 8.1 High under CVSS 3.1, though the NGINX security advisories page labels it Medium. This discrepancy highlights the variable assessment of its impact depending on context and potential for exploitation.

More concerning is the potential for remote code execution. The discovering researcher confirmed they achieved pre-authentication remote code execution on a target VM as the non-root NGINX worker. However, this RCE required a non-default NGINX configuration and chaining with an additional memory disclosure vulnerability (not assigned a CVE at the time of writing). Furthermore, the researcher noted that some attempts did not open a shell, indicating that while RCE is possible, it relies on specific conditions and may not be consistently reliable in all non-default configurations. Organizations should not underestimate the potential for motivated attackers to develop reliable exploitation chains, especially given the widespread deployment of NGINX.

Affected Versions and Remediation for patch NGINX 1.30.6 RCE vulnerability

The vulnerability affects a wide range of NGINX releases. Specifically, NGINX versions 1.19.7 through 1.30.6 and 1.31.0 through 1.31.8 are vulnerable. Additionally, various NGINX Plus releases are also impacted. This broad scope underscores the importance of prompt action for administrators.

How to detect CVE-2026-123633 exploitation

Detecting exploitation of CVE-2026-123633 primarily involves monitoring NGINX server logs for crashes or unexpected restarts of worker processes. Look for error messages related to memory access violations, segmentation faults, or abnormal process terminations. System-level monitoring tools can help identify sudden increases in process restarts or periods of service unavailability coinciding with suspicious network activity. Network traffic analysis for fragmented HTTP/2 requests under high connection pressure might also offer indicators, though this can be complex.

Patching and Mitigation Strategies

The most effective mitigation is to upgrade NGINX to a fixed version. NGINX 1.30.7 on the stable branch and 1.31.9 on the mainline branch contain the fix. Administrators should immediately review their NGINX deployments, especially those exposed to HTTP/2 client connections, and plan for an upgrade. For those using vendor-supplied NGINX packages, ensure that the package incorporates the patch for CVE-2026-123633.

Beyond patching, administrators should:

  • Review HTTP/2 Exposure: Assess whether HTTP/2 is strictly necessary for all NGINX deployments, especially those acting as reverse proxies. Limiting HTTP/2 exposure to trusted networks or disabling it where not critical can reduce the attack surface.
  • Monitor NGINX Logs: Implement continuous monitoring for NGINX error logs and system event logs for any signs of crashes or unusual behavior indicative of a denial-of-service attempt.
  • Isolate NGINX: Ensure NGINX instances are running with the principle of least privilege in mind, and consider isolating them within their network segments to limit potential lateral movement in the event of a successful RCE.

Related: Android Nov 2026 Updates Patch Critical RCE CVE-2026-58868, CVE-2026-104935: Ivanti Connect Secure RCE via Auth Bypass

Advertisement

Advertisement