Type
Analysis
Published
Updated
Reading time
4 min read
Author
Lire en français
Lire en français →

NGINX HTTP/2: the conditions behind a demonstrated RCE

Rapid7 demonstrates HTTP/2 RCE on NGINX 1.31.8. Examine window accounting, the 128 GB transfer and the PoC’s practical limits.

Analysis of public sources

Read the article

Fixes released on 18 November 2026. NGINX 1.30.7 and 1.31.9 fix several vulnerabilities, including CVE-2026-123007, memory corruption in HTTP/2 flow control. Rapid7 demonstrates remote code execution against a Linux amd64 image running NGINX 1.31.8 with HTTPS and HTTP/2 enabled. That demonstration establishes an exploit chain for the tested configuration. It does not measure success across deployed servers or every build variant.

When the counter stops representing credit

HTTP/2 multiplexes streams on a connection. For response data, the server tracks both per-stream and connection-wide flow-control credit. These counters limit how many DATA bytes may still be sent; they are separate from the TCP receive window. A client can increase credit using WINDOW_UPDATE and change streams’ initial window using SETTINGS_INITIAL_WINDOW_SIZE.

Rapid7’s analysis follows a specific sequence. The client reads responses slowly, leaving selected DATA frames queued. NGINX has already reserved credit for those frames. The client then raises the connection credit to the HTTP/2 maximum, 2^31 - 1. A change to SETTINGS_INITIAL_WINDOW_SIZE pushes selected streams over their limit. NGINX closes those streams while keeping the connection alive. During request cleanup, it returns credit reserved for cancelled frames without checking the connection’s maximum.

The first invalid state is not yet an overflow of the machine integer. The counter simply exceeds the maximum allowed by HTTP/2. A later unsigned subtraction in the WINDOW_UPDATE check underflows. Rapid7 shows how repeated operations move the counter into the upper half of a 64-bit value. A response filter then interprets that value as a signed length and constructs an inconsistent buffer. On the tested build, the TLS copy receives an enormous length, producing out-of-bounds memory access.

HTTP/2 credit > 2^31−1
  → WINDOW_UPDATE check: unsigned subtraction wraps
  → connection credit ≥ 2^63
  → size_t → off_t conversion: negative length
  → output buffer: last placed before pos
  → TLS copy: negative length converted to huge size_t

This diagram summarizes the conversions and buffer path documented by Rapid7. The buffer does not actually contain 2^64 bytes: its pos and last metadata become inconsistent. The memcpy implementation selected on the tested build can then read and write out of bounds before returning. Another C library or memory layout may simply crash the worker. That distinction separates the root cause from the observed RCE outcome.

Several boundaries separate this accounting error from code execution. An excessive HTTP/2 window alone does not prove RCE. The attacker must also obtain a usable memory layout, recover addresses and redirect execution. The researcher’s published PoC demonstrates these steps in its test environment. Rapid7 states that code runs with the NGINX worker’s permissions; execution as the master process or root has not been established.

Why 128 GB matters

The published strategy transfers approximately 128 GB of HTTP/2 data. Rapid7 estimates roughly two minutes over 10 Gbit/s and seventeen minutes over 1 Gbit/s; its demonstration takes two and a half minutes. Available bandwidth, timeouts, network intermediaries and the stability of the connection become material conditions. The PoC also relies on an optimized memcpy implementation selected on certain x86-64 CPUs with the AVX-512 features specified by Rapid7. Its author warns that the RCE script may fail after a worker has handled many clients and no longer has the expected heap layout.

These limits apply to the published RCE strategy. They do not establish that a vulnerable server with less bandwidth is safe, or that another exploit strategy cannot be developed. They prevent a public GitHub script from being mistaken for evidence that every NGINX instance is easily compromised. The PoC repository also contains a minimal trigger for the root cause. A counter anomaly or crash produced by that trigger would not itself prove code execution.

Qualifying a deployment without running the exploit

Start with the binary actually serving traffic, its provenance and the distributor’s fixed build. The numbers 1.30.7 and 1.31.9 are upstream NGINX releases; a distribution may backport the fix without adopting those numbers. Then examine each entry point: HTTP/2 negotiation, TLS termination, reverse proxies and any intermediary that changes HTTP/2 frames. Seeing h2 at the edge does not identify the version of a backend behind several layers.

Question Useful evidence What it does not establish
Does the service speak HTTP/2? Entry-point configuration and observed negotiation That every backend runs the same NGINX build
Is the binary fixed? Version and advisory for the deployed package That no other vulnerable service remains
Was an attempt made? Correlated long HTTP/2 sessions, volumes and anomalies Successful RCE without evidence of host effects
Was the host compromised? Worker processes, files, outbound connections and timeline The initial cause without matching network evidence

Volume and duration are investigation leads, not universal signatures. Another exploit could have a different profile; a large legitimate transfer could look similar. Preserve logs from the HTTP/2 termination point and the host to distinguish a protocol anomaly, a crash and a system-level effect.

The immediate action is to install a fixed build and verify every affected HTTP/2 termination point. The lasting lesson is to document separately the root cause, the effect demonstrated in one laboratory and the conditions needed to reproduce it.

Primary sources: NGINX release announcement, Rapid7 technical analysis, PoC repository and stated limits.

Follow future rootzero publications

#rootzero

A question about your exposure?

Write to us. Someone from the technical team will answer, with sources.