
Python proof-of-concept for a mod_http2 request-header race condition in Apache HTTP Server, with check, exploit, probe, and mitigation modes plus a minimal HTTP/2 client.
CVE-2026-119618 — Apache HTTP Server mod_http2 PoC Research and lab use only. Run this proof of concept only against Apache HTTP Server instances that you own or are explicitly authorized to test. The exploit mode generates concurrent HTTP/2 traffic and may cause service instability or a crash.
Proof-of-concept tooling for investigating a race condition in Apache HTTP Server's mod_http2 request-header handling, in assign_headers(). Overview The issue described by this repository concerns a shared h2_request.headers table associated with an HTTP/2 stream. In the vulnerable code path, assign_headers() may add a synthesized Content-Length: 0 entry to that shared table instead of the request-private r->headers_in table.
Because the stream pool can be accessed by the connection thread and a worker thread, concurrent APR table allocation can race. The resulting behavior may include heap corruption.
The upstream change identified by the PoC is commit 824beab9b9424d6cfb29595248fdbf6c3dddeab1, included in Apache HTTP Server 2.4.71 according to the project notes.
Important: this PoC is designed to detect or reproduce memory-corruption symptoms. A successful corruption result is not, by itself, proof of reliable arbitrary code execution (RCE). Repository contents File Description poc.py Main PoC. Provides check, exploit, probe, and mitigation modes. h2.py Minimal HTTP/2 client and frame/HPACK helpers used by the PoC.
The implementation uses the Python standard library; no third-party Python packages are required. Requirements
For available request shapes and options: python3 poc.py exploit --help 3. Probe mode Exercises additional request shapes that reach related header-handling paths: python3 poc.py probe --target 127.0.0.1:8080 4. Mitigation mode Checks whether the target still accepts HTTP/2. If the HTTP/2 preface is refused, the script reports the mitigation as active. python3 poc.py mitigation --target 127.0.0.1:8080 Target and log configuration The target defaults to 127.0.0.1:8080. It can be supplied with --target or through the TARGET environment variable.
The log directory defaults to /lab-logs. It can be changed with --logs or through the LAB_LOGS environment variable.
For sanitizer-based results, make the target's sanitizer report files (asan., tsan., ubsan.*) and error.log available in that directory. The PoC does not build or instrument Apache httpd itself. Exit codes Code Meaning 0 Safe / not affected, or no corruption observed in the run. 1 Vulnerable behavior detected or corruption confirmed. 2 Target unreachable. 3 Target answered, but the exploit run did not deliver a valid test. 4 Mitigation detected: HTTP/2 is not offered.
Interpret results in context. In particular, “no corruption observed” does not prove that a target is not vulnerable; race conditions can be timing-dependent. Mitigation The workaround documented in the PoC is to disable HTTP/2 for the affected virtual host/server by removing h2 and h2c from the Apache Protocols directive, then validate the configuration and reload Apache according to the deployment's change procedure.
The preferred remediation is to upgrade to a vendor-supported Apache HTTP Server release that contains the upstream fix, and verify the package/version supplied by your operating-system vendor. Technical notes