Critical Severity CVE-2026-111497
Published: Oct 27, 2026

[GitHub] CVE-2026-111497

Rce
Type
N/A
CVSS Score
2
Views
Anonymous
Author

Description

PoC, Docker lab, and technical report for CVE-2026-111497 (Node2Shell) — Node.js Brotli decoder invalid block-switch OOB write; validated errno differential and weaponized remote DoS, RCE analysis included.

# CVE-2026-111497 — Node.js Brotli Decoder OOB Write → RCE

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Research status: validated DoS](https://img.shields.io/badge/research-validated%20DoS-success.svg)](reports/CVE-2026-111497-report.md)

## Tổng quan

CVE-2026-111497 là lỗ hổng out-of-bounds write trong Brotli decoder được bundle với Node.js. Khi một malformed Brotli stream khai báo chỉ một block type nhưng lại yêu cầu block switch, decoder tiếp tục xử lý với trạng thái không hợp lệ, dẫn đến ghi vượt quá ringbuffer.

**Severity**: HIGH (CVSS 4.0: 9.2)
**Ảnh hưởng**: Node.js < 22.23.4, < 24.22.1, < 26.12.1; Bun < 1.4.4
**Fix**: Upgrade Node.js lên 22.23.4 / 24.22.1 / 26.12.1 trở lên

## Root Cause

```
DecodeBlockTypeAndLength() trả về BROTLI_FALSE cho cả 2 trường hợp:
- "cần thêm input" (recoverable)
- "invalid stream" (max_block_type <= 1, block switch là illegal)

DecodeLiteralBlockSwitch() là void function — discard kết quả.
BROTLI_SAFE macro coi BROTLI_FALSE là recoverable.
→ Decoder tiếp tục với invalid state → OOB write
```

Fix commit: `0ed4268a` — thêm `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (-17) và thay đổi wrapper functions thành trả về error code.

## Attack Surfaces

1. **Direct zlib**: `zlib.brotliDecompress()`, `brotliDecompressSync()`, `createBrotliDecompress()`
2. **HTTP request body**: Express 5 / body-parser 2.x với `Content-Encoding: br`
3. **fetch() auto-decompression**: Node.js fetch tự động decode `Content-Encoding: br` responses
4. **axios**: gửi `Accept-Encoding: gzip, compress, deflate, br` và auto-decode

## Lab Setup

### Yêu cầu
- Docker với platform linux/amd64
- Node.js images: `node:24.22.0-bookworm-slim` (vulnerable), `node:24.22.1-bookworm-slim` (patched)

### Cấu trúc
```
lab/
├── docker-compose.yml # Vulnerable + Patched services
├── src/
│ ├── poc.js # Payload generator
│ ├── exploit.js # Main exploit (zlib/http/fetch)
│ ├── exploit-http.js # HTTP

Community Rating
0

Login to rate this exploit

Quick Actions