Skip to content
Memory corruption Write-up Advanced

Node2Shell (CVE-2026-111497): Detecting the Node.js Brotli RCE

A malformed Brotli stream can trigger an out-of-bounds write in the Brotli decoder bundled with Node.js, because the decoder ignores an error when a stream declares one block type and then switches block types. An attacker who can get a Node.js service to decode attacker-controlled Brotli data could crash the process, and in a narrow configuration achieve code execution.

webflow.sysdig.com

Published on webflow.sysdig.com

Sysdig Threat Research Team

The author, on webflow.sysdig.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The Brotli decoder confuses incomplete input with invalid input and continues processing a malformed stream after a block-type switch error, causing an out-of-bounds write.

Impact

Public proof-of-concept authors report the process crashes on unpatched Node.js, and code execution was demonstrated on one image and architecture with repeated attempts; reliable remote code execution has been reproduced in only one setup to date.

What the attacker needed

Service decodes attacker-controlled Brotli; unpatched Node.js or Brotli library; attacker can send crafted compressed data

The fix

Node.js was fixed in versions 22.23.4, 24.22.1, and 26.12.1 by cherry-picking an upstream Brotli commit that makes the decoder fail immediately on a block switch when the stream declares only one block type.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Brotli is a compression format, like a zip file, that Node.js can decompress automatically. A bug in the decompression code means a specially crafted compressed file can make the program write data past the end of its memory buffer. This can crash the service, and in some setups an attacker could run their own code on the server.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.