# GHSA-663W-CV8G-JJ2P: Bundled brotli decoder has an out-of-bounds write (CVE-2026-111497)

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-10-23
- Modified: 2026-10-23

## Tracked as

- [CVE-2026-111497](https://cve.now/CVE-2026-111497.md): Google out-of-bounds write in decompression decoder

## Affected versions

- bun (npm): from 1.0.21, fixed in 1.4.4

## Description

### Summary

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 sends `Accept-Encoding: gzip, deflate, br, zstd` by default and decodes a response with `Content-Encoding: br` automatically. A server that an application connects to can therefore send data to the decoder.
- `node:zlib`, including `brotliDecompress`, `brotliDecompressSync` and `createBrotliDecompress`.
- `DecompressionStream`, with the `brotli` format.

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: false` to `fetch`. Bun then does not send `Accept-Encoding: br` and does not decode the response. This applies only to that request.
- Do not pass untrusted data to the brotli APIs in `node:zlib` or to `DecompressionStream` with the `brotli` format.

### References

- https://github.com/oven-sh/bun/pull/46392
- brotli 1.2.1: https://github.com/google/brotli/releases/tag/v1.2.1
- Node.js October 2026 security releases: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases

## References

- https://github.com/oven-sh/bun/security/advisories/GHSA-663w-cv8g-jj2p

Page: https://cve.now/GHSA-663W-CV8G-JJ2P
