Crafted Brotli data can run code on Node.js, Bun and Envoy

Google’s Brotli project fixed the decoder bug behind CVE-2026-111497 on February 27 and tagged releases carrying that fix on October 21, 236 days later. By the time those releases came out, Envoy had already shipped the fix to its users in a dependency bump that never mentioned Brotli.
The disclosure page from Patch the Planet, last updated October 23, says crafted Brotli data can corrupt memory and allow remote code execution in Node.js, in Bun, and in Envoy or Istio proxies set up to decompress Brotli. The bug can also crash a process or leak its memory. The Node.js advisory credits Khai Tran and Sylvie Mayer of OpenAI Codex Security with the report, and mcollina and aduh95 with the fix. It is the second disclosure in a week under OpenAI’s Patch the Planet initiative, following the PHP flaw. OpenAI says it found the Brotli bug during a red-teaming exercise.
Eight bytes and a wrong error code
Node.js bundles Google’s Brotli library in its zlib module. That code runs whenever Node decompresses Brotli data, either directly through node:zlib or automatically when fetch() receives a response sent with Brotli compression. The flaw is an out-of-bounds write in the decoder, triggered by malformed input. A Brotli stream can split its data into blocks of different types and signal switches between them. The Node.js advisory explains what happens when that signal is invalid:
An invalid block switch was reported as a temporary need for more input instead of a permanent format error, so the streaming decoder kept appending input bytes to an eight-byte internal buffer.
The upstream commit is titled “Detect and report invalid stream earlier.” It makes the decoder stop on that input instead of writing past the buffer. In the diff, the branch that changes is the one that handles streams declaring a single block type.
OpenAI’s post explains what this means in practice. The attack needs no user account, and it works in both directions: “an unpatched server that accepts compressed input could be taken over by a malicious client, and an unpatched client that accepts compressed input (such as “curl --compressed”) could be taken over by a malicious server.”
Patch the Planet’s list of exposed paths goes beyond HTTP: compressed request bodies, responses fetched from untrusted servers, compressed files, font decoders and data-file readers. It also names curl/libcurl and the Python and Java bindings, and warns that bundled wheels and static binaries may need their own rebuild. Electron-based desktop apps can carry several Brotli copies, and “a fixed browser component does not establish that the embedded Node.js runtime is fixed.” An app that only uses Brotli to compress its own outgoing data is not decompressing untrusted input, and the page says that alone does not establish exposure.
A February fix nobody released
OpenAI says the root cause “was actually fixed in the Brotli source code in February, but it wasn’t known at the time that it gave rise to a security vulnerability and there was no more recent release of Brotli.” Because Brotli is built into other software, every project that bundles it has to ship the update, and then its users have to install it.
The bug itself is much older than February. We traced the vulnerable code to the “Large Window Brotli” commit of February 26, 2018. Its first release was Brotli v1.0.3, tagged on March 2, 2018, which is where the CVE’s affected range begins. So the bug was in released versions for about eight and a half years before a fixed release existed.
The new releases also bypass Brotli’s main branch. Versions 1.0.10, 1.1.1 and 1.2.1 were all tagged on October 21, and each one adds a single cherry-picked commit on top of the old release tag. None of them is cut from master. Google, as the CVE numbering authority, set the record’s public date to February 27, the day of the original commit, even though the record itself was published on October 22.
Who shipped the fix, and when
Envoy shipped first, on October 6, in versions 1.39.3, 1.38.6, 1.37.8 and 1.36.12, followed by 1.40.0 on October 13. In those releases, Envoy moved its Brotli pin from the 1.2.0 tag to master commit 42a2ed4, dated September 30, which already contains the February fix. The commit message reads ”[v1.39] Update brotli to 42a2ed4”. None of the five release-note bodies mentions Brotli or the CVE. Patch the Planet adds that 1.36 is unsupported even though 1.36.12 includes the fix.
Istio’s bulletin ISTIO-SECURITY-2026-007, dated October 15, names CVE-2026-111497 seven days before the CVE record went public. It says: “Users who enable Brotli decompression, for example with an EnvoyFilter, should upgrade.” Istio 1.29.9 and 1.30.6 came out the same day and 1.31.2 the day after. The bulletin also lists a 7.7 score, but that score belongs to a separate istiod crash bug and not to the Brotli flaw. October 15 was also the end-of-support date for Istio 1.29, so its last fixed build shipped on its final supported day.
Node.js released 22.23.4, 24.22.1 and 26.12.1 on October 21. These releases fixed ten vulnerabilities: four rated high, three medium and three low. Alongside the Brotli bug, the other high-rated issues were three TLS and DNS hostname-handling bugs. Node.js 20.x and earlier reached end of life on April 30 and will not get the fix. Bun 1.4.4 followed on October 22, moving its vendored Brotli to the v1.2.1 tag commit. On PyPI, Brotli 1.2.1 wheels were uploaded that afternoon and brotlicffi 1.2.1.0 a few hours later, so the Python bindings already have fixed releases.
Critical, high or medium?
The same bug has three different severity ratings. Google’s CVE record scores it 9.2 Critical under CVSS 4.0, with network attack, no privileges and no user interaction, and classes it as an out-of-bounds write plus an unchecked return value. The Node.js advisory rates it high, and Ubuntu gives it Medium priority. NVD lists the record as “Awaiting Analysis”.
Reports on actual exploitability are less dramatic than the label. The Hacker News reported that a public proof-of-concept appeared on October 22 and reached code execution only against a deliberately weakened test build. On a standard Node.js build, its author saw a crash and a limited read of process memory. The same report says no exploitation in the wild had been reported as of that day.
Our analysis
What we checked
On October 24 we traced the bug and the fix through Brotli’s git history, compared the Brotli sources bundled in Node.js and Envoy before and after the fixed tags, and read the CVE record, the Istio bulletin and the Debian and Ubuntu trackers. The Envoy, Istio, CVE-record and bug-age findings above come from that work.
The fixed releases match Patch the Planet’s list. But for Envoy and Istio users the fix arrived about two weeks earlier than the disclosure suggests, and on Node.js you cannot confirm the fix through the version number Node reports for Brotli. Debian has moved since the first reports. Ubuntu has not shipped a fix yet.
- Node.js applied the upstream commit to its bundled copy without changing the version numbers. The 22.x line still reports Brotli 1.1.0, and 24.x and 26.x still report 1.2.0, so
node -p process.versions.brotlireturns the same value on patched and unpatched builds. The fix appears indeps/brotli/c/dec/decode.cat 22.23.4, 24.22.1 and 26.12.1, and not in the release before each one. To confirm the fix, check the Node.js version itself. - Node.js installed from Debian links against the system libbrotli, which the package’s build rules confirm. On October 21, reports noted that the Debian tracker had no entry for this CVE. Now the fix is out for trixie (DSA-6582-1, October 23) and bookworm (DLA-4855-1). Forky and sid, on brotli 1.2.0-4, are still vulnerable.
- Ubuntu published its CVE page on October 23 and marks brotli and nodejs as “Needs evaluation” on every release, 22.04 LTS through 26.10.
Until the patch lands
Patch the Planet’s interim advice is to disable Brotli decoding of untrusted data and keep gzip and deflate on. Its warnings are specific. Removing br from Accept-Encoding does not stop a server from sending Brotli anyway. Turning off Brotli response compression on a CDN does not touch request or client-side decompression. And request-size limits and WAF rules do not cover every decoding path.
- Express: register a guard before every body parser that returns HTTP 415 for any
Content-Encodingother than identity, gzip or deflate. If you cannot place it before decoding, setinflate: falseon every body parser, which also rejects gzip and deflate. - Next.js: set
images.unoptimized: trueso the built-in optimizer stops fetching and decoding remote images. This does not cover other server-side fetches or custom loaders. - Envoy: set
enabledto false in both request and response directions of the Brotli decompressor, and remove anyruntime_key, since a runtime override can turn it back on. A direction you leave out defaults to enabled. - Istio: edit the EnvoyFilter that inserts the Brotli filter. Do not remove every
envoy.filters.http.decompressor, because gzip and zstd filters can share that name. A disabled filter passes the compressed bytes on to the next decoder. - Python: with urllib3, request with
preload_content=Falseanddecode_content=False, checkContent-Encoding, and only then read the body.
After updating, rebuild every container and executable that embeds the affected runtime. Restart every service, worker, scheduled job and replica still on the old build. Then check the running binary or image against the vendor’s fixed release.
Up next
Grok Bot gets its own Vault for logins and cards, Video
Per a Threads post, Grok Bot got its own Vault for logins, contacts and credit card info, while its earlier 1Password route kept secrets inside the password manager. Where do your saved logins live right now, in a password manager or the browser?
Related stories
- OpenAI ships a Codex skill that checks sites for php2shell
- Cloudflare checks AI-found code flaws against live traffic
- OpenAI models helped find critical flaws in PHP
- Unreleased Claude model built a one-click Chrome exploit
- libheif bugs reached OpenAI repos and GitHub Enterprise
- OpenAI agents tried a RubyGems bug found only in July
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

