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
brotli2crash — CVE-2026-111497 — Node.js Brotli Decoder OOB Write: Deep Analysis & Structural Unreachability Proof. MLEN_MAX = BLOCK_SIZE_CAP = 2^24 makes RCE structurally unreachable. | Kitploit
Tools/GitHubGitHub/ikow/brotli2crash
Vulnerability AnalysisExploitationWeb SecurityBinary AnalysisPapers & ResearchLearning & EducationLabs & Practice
GitHubikow/brotli2crash

brotli2crash

CVE-2026-111497 — Node.js Brotli Decoder OOB Write: Deep Analysis & Structural Unreachability Proof. MLEN_MAX = BLOCK_SIZE_CAP = 2^24 makes RCE structurally unreachable.

View Repository
651 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    959
  • 3

    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.

    458
  • 4

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

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

    362
  • 6

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    360

Explore all tools

Browse our collection of tools

View all tools →
Share

brotli2crash

brotli2crash

CVE-2026-111497 — Node.js Brotli Decoder OOB Write: Deep Analysis & Structural Unreachability Proof

Stars CVSS 9.2 disputed Affected Versions Fixed Versions RCE Status

Key Finding · Analysis · PoC Tools · Detection · Lab · Writeup


Independent security research into CVE-2026-111497, a High-severity OOB write in the Brotli decoder bundled with Node.js (deps/brotli). While the code bug is real — the BROTLI_SAFE macro silently drops the return value on the fast decoding path — we prove the vulnerable code path is structurally unreachable from any Brotli stream, valid or malformed.

The Brotli specification caps MLEN (metablock uncompressed length) at exactly 2^24 = 16,777,216, which is identical to BROTLI_BLOCK_SIZE_CAP, the initial block_length when NBLTYPES = 1. This means the block-switch trigger condition (block_length == 0 with NBLTYPES ≤ 1) can never fire during stream processing — the metablock ends before the counter is exhausted.

Practical impact: DoS (infinite CPU loop) via header corruption, not RCE.

Author: Qi Deng  |  Writeup: Substack  |  Date: 2026-10-22

CVE Details

FieldValue
CVECVE-2026-111497
CWECWE-787 (Out-of-bounds Write), CWE-252 (Unchecked Return Value)
CVSS 4.09.2 (Critical) — disputed: we argue High is more accurate
Vendor RatingHigh (Node.js), no CVSS vector published
Componentdeps/brotli/c/dec/decode.c (Google Brotli decoder)
Upstream Fixgoogle/brotli@0ed4268a
ReporterMatteo Collina
AffectedNode.js < 22.23.4, < 24.22.1, < 26.12.1; Brotli < 1.0.10, < 1.1.1, < 1.2.1

Key Finding

The vulnerability is real but structurally unreachable.

Max MLEN (RFC 7932, 6 nibbles)  =  2^24  =  16,777,216
BROTLI_BLOCK_SIZE_CAP (state.h)  =  1<<24 =  16,777,216
                                            ═══════════
                                             Exactly equal — by design

When NBLTYPES = 1:

  • block_length initializes to 16,777,216
  • Total literals in a metablock ≤ MLEN ≤ 16,777,216
  • The loop counter i and block_length reach 0 simultaneously
  • The block-switch check executes only after block_length is decremented, by which point i = 0 and the loop exits cleanly

This is not a coincidence — it's a deliberate design constraint in the Brotli specification that prevents the single-block-type fast path from ever needing a block switch.

See analysis/structural_proof.md for the full formal argument with source code traces.

The Bug (Source Level)

Root Cause: BROTLI_SAFE drops return value

// decode.c:1890 — the VULNERABLE macro
#define BROTLI_SAFE(METHOD)
  {
    if (safe) {
      if (!Safe##METHOD) {                          // safe path: CHECKS return
        result = BROTLI_DECODER_NEEDS_MORE_INPUT;
        goto saveStateAndReturn;
      }
    } else {
      METHOD;                                       // fast path: DROPS return
    }
  }

Three block-switch sites call through this macro:

  • BROTLI_SAFE(DecodeLiteralBlockSwitch(s)); — line 2243
  • BROTLI_SAFE(DecodeCommandBlockSwitch(s)); — line 1941
  • BROTLI_SAFE(DecodeDistanceBlockSwitch(s)); — line 2049

All three wrappers return void, making the return value unrecoverable:

static void BROTLI_NOINLINE DecodeLiteralBlockSwitch(BrotliDecoderState* s) {
  DecodeLiteralBlockSwitchInternal(0, s);  // BROTLI_BOOL return → void
}

The Trigger That Can't Fire

DecodeBlockTypeAndLength() returns BROTLI_FALSE when max_block_type ≤ 1:

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;    // ← format error, but fast path ignores this
  }
  // ... read new block type and length (never reached) ...
}

This function is called when block_length[tree_type] == 0. But with NBLTYPES = 1, block_length starts at BROTLI_BLOCK_SIZE_CAP (16M), and MLEN caps at the same value. The counter reaches 0 only at the exact end of the metablock, where the loop exits before re-checking.

The Fix

Upstream commit 0ed4268a ("Detect and report invalid stream earlier"):

  1. Changes DecodeBlockTypeAndLength return type from BROTLI_BOOL to BrotliDecoderErrorCode
  2. Returns BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH (-17) for the format error
  3. Adds BROTLI_SAFE_WITH_STATUS macro that checks the return on both paths:
#define BROTLI_SAFE_WITH_STATUS(METHOD)
  {
    BrotliDecoderErrorCode status;
    if (safe) { status = Safe##METHOD; }
    else      { status = METHOD;      }     // fast path: NOW CHECKS return
    if (status != BROTLI_DECODER_SUCCESS) {
      result = status;
      goto saveStateAndReturn;
    }
  }

Technical Analysis

Theoretical Exploitation Chain (If Reachable)

If an attacker could somehow trigger the block switch with NBLTYPES = 1:

block_length[i] == 0 with NBLTYPES ≤ 1
    ↓
DecodeBlockTypeAndLength returns BROTLI_FALSE (ignored)
    ↓
block_type_rb[] not updated → stale values
    ↓
Stale block_type_rb → OOB read on context_map
    ↓
Garbage htree pointer → corrupted Huffman decode
    ↓
Corrupted distance_code → wrong ring buffer offset
    ↓
memmove16(copy_dst, copy_src) at controlled offset
    ↓
16-byte OOB write on heap

Primitive characteristics:

PropertyValue
Write sizeFixed 16 bytes (memmove16)
Write offsetRing buffer base + pos, influenced by corrupted distance_code
Write content16 bytes from ring buffer at copy_src, partially attacker-influenced
Ring buffer slack542 bytes (kRingBufferWriteAheadSlack)

Why Public PoCs Fail

PoC RepositoryResultReason
CaterMaoZi/CVE-2026-111497-POC1200+ fuzz iterations, 0 crashesMLEN = BLOCK_SIZE_CAP prevents trigger
dimasma0305/CVE-2026-111497-POC"Not portable to ASLR-enabled Node.js"Used non-PIE harness with lowered BLOCK_SIZE_CAP
TheFool-TAROTDoS only; local RCE only without ASLRRequired --predictable flag + separate info leak (CVE-2024-21524)

Cross-Metablock Stale State: Also Blocked

Download Tool