RC RANDOM CHAOS

Node.js Brotli Decoder Flaw Enables Remote Code Execution

· via The Hacker News

Original source

Researchers Demonstrate Node2Shell RCE Exploit on Node.js Build Using Crafted Brotli Data

The Hacker News →

Imperva researchers successfully demonstrated a remote code execution exploit against Node.js 24.22.0 by crafting malicious Brotli data. The vulnerability, tracked as CVE-2026-111497, resides in Node.js’s bundled Brotli decoder and was patched on October 21. This proof of concept (Node2Shell) significantly surpasses earlier attempts, which succeeded only on deliberately weakened builds. As of October 22, no active exploitation in the wild has been documented.

The flaw emerges from how the Brotli decoder handles a malformed stream condition. When decoding encounters a block-type transition that the stream’s structure prohibits, the vulnerable decoder continues processing in an invalid state rather than halting with an error. This corrupted state triggers an out-of-bounds buffer write, enabling code execution. The fix applies an upstream Brotli patch that properly rejects such malformed structures with a format error.

The vulnerability affects Node.js on the 22.x, 24.x, and 26.x release lines, particularly installations using Express 5’s body parsers or explicit Brotli decoding. Attackers can target either inbound request bodies or outbound responses fetched via Node.js’s fetch() function. Organizations must upgrade to patched releases immediately; versions 20.x and earlier receive no fixes. Until updates are deployed, network-level filtering of suspicious Brotli traffic provides limited interim protection, though only a full upgrade fully mitigates the risk.

Read the full article

Continue reading at The Hacker News →

This is an AI-generated summary. Read the original for the full story.