- Malformed Brotli input could cause a crash, memory disclosure or remote code execution.
- Node.js fixed the flaw in versions 22.23.4, 24.22.1 and 26.12.1.
- Node.js released security updates on October 21 for its three supported release lines, 22.x, 24.x and 26.x, fixing 10 flaws.
Node.js released security updates on October 21 for its three supported release lines, fixing a Brotli decoder flaw affecting 22.x, 24.x and 26.x.
An attacker who can supply malformed Brotli data to an application using node:zlib could corrupt process memory. Node.js said that could lead to a crash, disclosure of process memory or remote code execution, allowing code of the attacker’s choosing to run on the affected system.
Node.js credited Khai Tran and Sylvie Mayer of OpenAI Codex Security with reporting the vulnerability. The Hacker News said no exploitation of the flaw in the wild has been reported.
On this page
Malformed Brotli input can write past the decoder buffer
The Hacker News said the flaw is an out-of-bounds write triggered by malformed compressed input. An application is exposed when it decompresses Brotli data controlled by an attacker, including a request body or a response fetched from another server.
Imperva demonstrated code execution on the official Node.js 24.22.0 Linux arm64 image without a debugger or custom build. Its test did not succeed on every attempt and took several tries in that Linux arm64 setup.
Imperva reproduced code execution through both request-body and response paths while testing Express 5.0.0 to 5.3.0 and body-parser 2.0.0 to 2.3.0 at pinned versions.
Node.js imported an upstream Brotli validation fix
The Hacker News said Node.js fixed the issue by importing an upstream Brotli patch that rejects invalid input earlier, stopping the decoder before it writes past the buffer. On Node.js 24.22.1, Imperva said the same data was rejected and no code ran.
Node.js released updates for its three supported lines and fixed 10 flaws in the Oct 21 release. The project said the fixed versions are 22.23.4 and 24.22.1 on the long-term support lines, and 26.12.1 on the current line.
Brotli fixes extend beyond Node.js
Google said it is fixing the vulnerability in Brotli versions 1.0.10, 1.1.1 and 1.2.1. Heise online said the decoder issue affects Brotli versions 1.0.3 through 1.2.0 across all platforms.
The Hacker News said the flaw was first disclosed on Oct 21, when Node.js and Google shipped fixes. The change had been added to Brotli’s source code on Feb 27, but no new Brotli release carried it until Oct 21.
Node.js said Node.js 20.x and earlier have reached end of life and will not receive the fix. Those versions should be moved to a supported release line.
The issue also reaches software that uses Google’s Brotli decoder. The Hacker News said affected products include Bun, Microsoft .NET, Python Brotli packages and Envoy proxies configured to decompress Brotli.
What to do now
- Upgrade Node.js 20.x and earlier to a supported release line.
FAQ
What is the Node.js Brotli vulnerability?
Node.js says malformed Brotli input can corrupt process memory, leading to a crash, disclosure of process memory or remote code execution. The flaw affects Node.js 22.x, 24.x and 26.x.
Has the Node.js Brotli flaw been exploited?
The Hacker News said no exploitation of the flaw in the wild has been reported. Imperva demonstrated code execution in testing on the official Node.js 24.22.0 Linux arm64 image.
How does the Node.js Brotli flaw work?
The Hacker News said an application is exposed when it decompresses attacker-controlled Brotli data, such as a request body or a fetched response. It said malformed compressed input triggers an out-of-bounds write in the decoder.
Who reported the Node.js Brotli vulnerability?
Node.js credited Khai Tran and Sylvie Mayer of OpenAI Codex Security with reporting it.
Sources
- Node.js, Wednesday, October 21, 2026 Security Releases, Node.jsPrimary
- Node.js Brotli Decoder Bug Could Allow Remote Code Execution in All Supported Versions, The Hacker News
- Researchers Demonstrate Node2Shell RCE Exploit on Node.js Build Using Crafted Brotli Data, The Hacker News
- Brotli Decoder Flaw Behind Node.js RCE Also Affects Bun, Python and Other Widely Used Software, The Hacker News
- PHP Issues Second Windows Security Update in Five Days to Fix Brotli Code Execution Flaw, The Hacker News
- Node2Shell: Brotli Flaw Triggers Patching Across Microsoft, Node.js, Python Packages, SecurityWeek
- Brotli decoder flaw affects Bun, Python and more, not just Node.js, heise online
How we checked this story
| Claim | Source | Status |
|---|---|---|
| Node.js released security updates on October 21 for its three supported release lines, 22.x, 24.x and 26.x, fixing 10 flaws. | Node.js, via The Hacker News | Attributed |
| Node.js said the Brotli decoder flaw can allow remote code execution, meaning an attacker could run code of their choosing on the affected system. | Node.js, via The Hacker News | Attributed |
| The fixed Node.js versions are 22.23.4, 24.22.1 and 26.12.1. | Node.js, via The Hacker News | Attributed |
| The Hacker News said the flaw is reached when an application decompresses attacker-controlled Brotli data, including request bodies or fetched responses. | The Hacker News | Attributed |
| The Hacker News said the flaw is an out-of-bounds write triggered by malformed compressed input. | The Hacker News | Attributed |
| The Hacker News said node.js fixed the flaw by importing an upstream Brotli patch that rejects invalid input earlier. | The Hacker News | Attributed |
| Imperva demonstrated code execution on the official Node.js 24.22.0 Linux arm64 image without a debugger or custom build. | Imperva, via The Hacker News | Attributed |
| Imperva said on the fixed Node.js 24.22.1 release, the same data was rejected and no code ran. | Imperva, via The Hacker News | Attributed |
| Imperva reproduced code execution through both request-body and response paths using specified Express and body-parser versions. | Imperva, via The Hacker News | Attributed |
| heise online said the flaw affects Brotli versions 1.0.3 through 1.2.0 across all platforms. | heise online | Attributed |
| Google said brotli fixes are available in versions 1.0.10, 1.1.1 and 1.2.1. | Google, via heise online | Attributed |
| The Hacker News said the flaw also affects Bun, Microsoft .NET, Python Brotli packages and Envoy proxies configured to decompress Brotli. | The Hacker News | Attributed |
| The Hacker News said the flaw was first disclosed on October 21, when Node.js and Google shipped fixes. | The Hacker News | Attributed |
| The Hacker News said the fix was added to Brotli’s source code on February 27 but was not included in a new Brotli release until October 21. | The Hacker News | Attributed |
| The Hacker News said no exploitation of the flaw in the wild has been reported. | The Hacker News | Attributed |
| The rebuilt PHP package numbers are 8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1. | PHP, via The Hacker News | Attributed |
| The vulnerability affects Node.js 26.x, 24.x and 22.x. | Node.js | Confirmed |
| Node.js advises upgrading because malformed Brotli input can corrupt process memory, causing a crash, memory disclosure or remote code execution. | Node.js | Confirmed |
| Node.js credited Khai Tran and Sylvie Mayer of OpenAI Codex Security with reporting the vulnerability. | Node.js | Confirmed |
| SecurityWeek said applications should update fixed runtimes, restart services and rebuild container images because running processes retain the vulnerable decoder. | SecurityWeek | Attributed |
| The Hacker News said openAI Codex Security reported the vulnerability, and Node.js maintainers fixed it. | The Hacker News | Attributed |
Could not verify
- Whether the demonstrated exploit works on Node.js 22.x or 26.x is not established.
- Whether the flaw has been exploited in the wild is not established.
- How many applications or systems are affected is not established.
- Whether all software bundling Brotli has released fixes is not established.



