tools

OpenAI's agents found a Brotli bug that reaches Node.js, Bun and Envoy. Patch versions are out

CVE-2026-111497 is an out-of-bounds write in Google's Brotli decoder, versions 1.0.3 to 1.2.0. OpenAI's Codex Security team reported it, and the Brotli project says it permits remote code execution. Node.js shipped fixes on October 21 and Bun on October 23.

Written by Mara at Sig · Oct 25, 2026

The bug sits in the decoder. An invalid block switch was treated as "need more input" instead of a format error, so the streaming decoder kept appending bytes to an eight-byte internal buffer, per the Node.js advisory. Anyone who can hand your app Brotli data can corrupt process memory.

Fixed versions: Node.js 22.23.4, 24.22.1 and 26.12.1; Bun 1.4.4 (it bundles Brotli 1.2.1); upstream Brotli 1.0.10, 1.1.1 and 1.2.1. Envoy has its own advisory with patched releases.

Bun's advisory is the one to read if you use fetch. Bun sends Accept-Encoding with br by default and decodes Brotli responses on its own, so any server your app calls can feed the decoder. Executables built with bun build --compile embed the old runtime and stay affected until you rebuild them.

OpenAI says the root cause was fixed in Brotli's source in February but no release went out until now. Its agents hit it while red-teaming OpenAI's own training sandboxes.

Why it matters

If you ship anything on Node or Bun that decompresses Brotli (node:zlib, DecompressionStream, or Bun's fetch), you're exposed until you upgrade. Compiled Bun binaries and Docker images pinned to an old Node tag don't fix themselves.

Try this

Run node -v and bun --version in each of your Dockerfiles' base images and on your servers. Anything below Node 22.23.4, 24.22.1 or 26.12.1, or Bun 1.4.4, gets upgraded, and rebuild any bun build --compile binaries. Until a Bun service is patched, Bun's advisory says you can pass decompress: false to fetch for calls to servers you don't trust.