Bundled brotli decoder has an out-of-bounds write (CVE-2026-111497)
Description
Bun bundles Google's brotli library. CVE-2026-111497 is an out-of-bounds write in the brotli decoder. The brotli project states that it permits remote code execution. Bun 1.4.3 and earlier bundle an affected version of brotli, and they decode brotli data from untrusted sources.
Bun 1.4.4 updates brotli to 1.2.1, which contains the fix.
This is a bug in the brotli library, not in Bun's own code. Other projects that bundle brotli are affected in the same way. Node.js published fixes on October 21, 2026.
Details
The bug is in the brotli decoder. Affected versions of brotli are 1.0.3 to 1.2.0, except the fixed releases 1.0.10 and 1.1.1. Bun 1.4.3 bundles brotli 1.2.0.
These Bun APIs pass data to the decoder:
fetch. It sendsAccept-Encoding: gzip, deflate, br, zstdby default and decodes a response withContent-Encoding: brautomatically. A server that an application connects to can therefore send data to the decoder.node:zlib, includingbrotliDecompress,brotliDecompressSyncandcreateBrotliDecompress.DecompressionStream, with thebrotliformat.
Executables built with bun build --compile embed the Bun runtime. An executable built with an affected version stays affected until it is rebuilt.
Impact
An attacker who can supply brotli data to an affected API can cause an out-of-bounds write in the Bun process. For fetch, this includes a malicious server, and an attacker in the network path of an unencrypted connection.
The brotli project states that the bug permits remote code execution. We have not tested an attack against Bun, so we do not know how the impact in Bun compares with the impact in other software. Treat this as a remote code execution risk.
Patches
Upgrade to Bun 1.4.4, and rebuild any bun build --compile executables with it.
Bun 1.4.4 updates brotli from 1.2.0 to 1.2.1 (#46392). Invalid data now fails with the new decoder error BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH.
Workarounds
There is no process-wide workaround for affected versions.
- Pass
decompress: falsetofetch. Bun then does not sendAccept-Encoding: brand does not decode the response. This applies only to that request. - Do not pass untrusted data to the brotli APIs in
node:zlibor toDecompressionStreamwith thebrotliformat.
References
- github.com/
oven-sh/ bun/ pull/ 46392 - brotli 1.2.1: github.com/
google/ brotli/ releases/ tag/ v1.2.1 - Node.js October 2026 security releases: nodejs.org/
en/ blog/ vulnerability/ october-2026-security-releases