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
CVE-2026-128014 — Proof-of-concept and differential lab for CVE-2026-128014: a two-chunk Brotli stream pins FrankenPHP 1.13.1 request workers in a non-terminating decode loop (DoS). | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-128014
Dynamic Analysis (Sandboxing)Vulnerability AnalysisExploitationSecurity VirtualizationWeb SecurityFuzzing
GitHubgooglesky/cve-2026-128014

CVE-2026-128014

Proof-of-concept and differential lab for CVE-2026-128014: a two-chunk Brotli stream pins FrankenPHP 1.13.1 request workers in a non-terminating decode loop (DoS).

View Repository
6 days agoNot yet reviewed
Share

CVE-2026-128014 — FrankenPHP Bundled Brotli Decoder Invalid-Block-Switch DoS

License: MIT Research status: validated DoS

CVECVE-2026-128014
ComponentFrankenPHP static binary — bundled PHP brotli extension (ext-brotli 0.21.0) statically linked against the Brotli decoder
AffectedFrankenPHP 1.13.1 (Brotli 1.2.0); all builds shipping Brotli < 1.2.1
Fixed inFrankenPHP 1.13.2 (Brotli 1.2.1, upstream fix 0ed4268a)
CWECWE-835 (Loop with Unreachable Exit Condition), CWE-754 (Improper Check for Unusual or Exceptional Conditions)
ImpactDenial of service — an unauthenticated request pins a request worker in a non-terminating decode loop that consumes CPU indefinitely
VectorHTTP POST whose request body is fed to one incremental brotli_uncompress_add() decoder in two chunks
Trigger22-byte malformed stream + spray, chunk boundary at offset 17
CreditUpstream advisory GHSA-p746-jj3f-94p8 (FrankenPHP security release)

A single unauthenticated HTTP request whose body reaches brotli_uncompress_add() in two chunks drives the Brotli 1.2.0 decoder bundled in FrankenPHP 1.13.1 into a decode loop that never terminates: the request never returns, the worker thread spins on a full CPU core, and enough concurrent requests exhaust the worker pool. FrankenPHP 1.13.2 — identical base image, config, app and entrypoint, only the bundled Brotli bumped 1.2.0 → 1.2.1 — rejects the same bytes in ~60 ms with brotli_uncompress_add(): failed to uncompress and keeps serving. The differential was validated against the official upstream binaries and against AddressSanitizer source builds of both Brotli versions across a 36-configuration matrix.

1. Root cause

Brotli encodes per-block-type counts (NBLTYPESL/C/D) in the metablock header. A block switch command is only legal when the corresponding NBLTYPES is ≥ 2. When the literal block-length counter reaches zero mid-metablock, ProcessCommandsInternal must perform a literal block switch, and 1.2.0 reports the illegal switch the same way it reports "need more input":

c/dec/decode.c, Brotli 1.2.0, line 1189:

static BROTLI_INLINE BROTLI_BOOL DecodeBlockTypeAndLength(
    int safe, BrotliDecoderState* s, int tree_type) {
  brotli_reg_t max_block_type = s->num_block_types[tree_type];
  ...
  if (max_block_type <= 1) {
    return BROTLI_FALSE;      /* illegal switch — but FALSE means "no input" */
  }

The fast path of the command loop discards that return value outright — c/dec/decode.c, lines 1943–1953 and 2332–2334:

#define BROTLI_SAFE(METHOD)                       \
  {                                               \
    if (safe) {                                   \
      if (!Safe##METHOD) {                        \
        result = BROTLI_DECODER_NEEDS_MORE_INPUT; \
        goto saveStateAndReturn;                  \
      }                                           \
    } else {                                      \
      METHOD;                     /* return value dropped */  \
    }                                             \
  }
...
NextLiteralBlock:
  BROTLI_SAFE(DecodeLiteralBlockSwitch(s));     /* safe == 0 here */
  goto CommandInner;                            /* block_length[0] still 0 */

The arithmetic that breaks: with NBLTYPESL == 1, max_block_type == 1, so every trip through CommandInner sees block_length[0] == 0, jumps to NextLiteralBlock, executes the switch, gets BROTLI_FALSE, drops it, and returns to CommandInner. Nothing advances — no input is consumed, no output is produced, no state changes. The loop is unbounded by construction:

CommandInner ──(block_length[0] == 0)──▶ NextLiteralBlock
     ▲                                        │
     └── DecodeLiteralBlockSwitch → FALSE ◀───┘   (result discarded, safe == 0)

Each pass burns CPU; the decoder never parks, so the incremental add() call never returns and the request worker is pinned for the lifetime of the process. This is the same discarded-return defect class upstream fixed in 0ed4268a for CVE-2026-111497; on this x86-64 static build the discarded value manifests as the non-terminating loop rather than the out-of-bounds write, because the loop is reached with input still pending and never hands control back to the caller.

Fix commit 0ed4268a (shipped in Brotli 1.2.1 / FrankenPHP 1.13.2):

static BROTLI_INLINE BrotliDecoderErrorCode DecodeBlockTypeAndLength(
    int safe, BrotliDecoderState* s, int tree_type) {
  ...
  if (max_block_type <= 1) {
    return BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH;   /* -17, a real error */
  }
...
#define BROTLI_SAFE_WITH_STATUS(METHOD)         \
  {                                             \
    BrotliDecoderErrorCode status;              \
    if (safe) { status = Safe##METHOD; }        \
    else      { status = METHOD; }              \
    if (status != BROTLI_DECODER_SUCCESS) {     \
      result = status;                          \
      goto saveStateAndReturn;                  \
    }                                           \
  }

BROTLI_SAFE_WITH_STATUS propagates -17 BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH out of the decode loop in both the fast and the safe path, so the impossible switch terminates the stream instead of feeding the loop.

2. Reproduction environment

The lab is a differential environment: one target image, two builds, identical in every respect except the bundled FrankenPHP release.

  • vuln — official FrankenPHP 1.13.1 Linux x86-64 static binary, Brotli 1.2.0, port 8081.

  • fixed — official FrankenPHP 1.13.2 Linux x86-64 static binary, Brotli 1.2.1, port 8082.

  • Both run the same PHP 8.5.12 runtime, the same ext-brotli 0.21.0 extension, the same Caddyfile and the same lab/app/index.php, which exposes the real attack surface:

    • POST /decompress?split=N — splits the raw request body into two chunks at byte N and feeds them to one incremental decoder: brotli_uncompress_init(), brotli_uncompress_add($ctx, $chunk1, BROTLI_FLUSH), brotli_uncompress_add($ctx, $chunk2, BROTLI_FINISH). This is exactly the shape the upstream advisory names.
    • POST /decompress-guarded?split=N — the same vulnerable binary behind the published workaround: untrusted requests are rejected with 403 before brotli is touched.
    • GET / — build fingerprint: FrankenPHP version, PHP version, ext-brotli version and the linked Brotli library version (BROTLI_VERSION_TEXT, 1.2.0 vs 1.2.1), the per-build differential observable.

Each target runs under lab/supervisor.sh, which records the process exit status to /tmp/exit-status and the full log to /tmp/frankenphp.log, so a worker death is a durable observable as well.

A companion source-level differential harness (AddressSanitizer builds of pristine Brotli 1.2.0 and 1.2.1) replicates the extension's exact call pattern — 512 KiB output buffer, loop on NEEDS_MORE_OUTPUT — and is used to classify the decoder without the HTTP layer.

3. Running the environment

./run-lab.sh build     # fetch the two official binaries, build both images
./run-lab.sh up        # start vuln (8081) + fixed (8082) on network cve128014lab
./run-lab.sh sweep     # run the full differential PoC from inside the poc container
./run-lab.sh down      # tear down

run-lab.sh drives podman compose; the compose file pins --cpus 2 --memory 4g per container and the dedicated cve128014lab network. Every PoC mode can also be run standalone from a container on that network:

podman run --rm --network=cve128014lab -v "$PWD/poc/poc.py:/opt/poc/poc.py:Z" \
  python:3.12-alpine python /opt/poc/poc.py exploit \
  --vuln http://vuln:8080 --fixed http://fixed:8080 --timeout 8

4. The PoC

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.

    962
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    558
  • 3

    redforge

    cybersecurity91/redforge

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

    348
  • 4

    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.

    344
  • 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.

    324
  • 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.

    297

Explore all tools

Browse our collection of tools

View all tools →