Brotli decoder flaw CVE-2026-111497: fixes in Node.js, Bun and the PyPI Brotli packages
A critical out-of-bounds write in Google Brotli C library has triggered emergency patches across Node.js, Bun, and Python. Tracked as CVE-2026-111497, the eight-year-old decoder flaw allows remote attackers to cause heap corruption or code execution via malformed compressed HTTP data streams.
By Parminder Kumar Sharma · LinkedIn · · 13 min read
Correction, 26 October 2026: the score, the dates and the scope of the fix were corrected
An audit on 26 October checked this briefing against the CVE record, Brotli's release and the runtime release notes. What changed: Python itself is not patched, the PyPI packages brotli and brotlicffi are; the record has only a CVSS 4.0 score of 9.2, not the 3.1 score of 9.8 the earlier text gave; the PyPI release is dated 22 October; the Bun release notes name no CVE; the claims about Rust and HTTP/2 had no source and were removed; and Imperva's Node2Shell test of 22 October was added. A duplicate briefing on this flaw was withdrawn.
Upstream Brotli decoder buffer overflow triggers emergency coordinated patches across Node.js, Bun, and Python ecosystems
A critical out-of-bounds write vulnerability discovered in Google's foundational Brotli compression C library has triggered an emergency wave of coordinated security updates across the global software supply chain. Tracked as CVE-2026-111497, the vulnerability resides within the core decompression state machine in c/dec/decode.c, affecting all library versions from 1.0.3 through 1.2.0. By transmitting a meticulously crafted Brotli compressed data stream, an unauthenticated remote attacker can force the decoder into an invalid state, triggering an out-of-bounds heap memory write that can result in process crashes, heap corruption, or remote code execution.
Because high-level programming language runtimes routinely vendor or statically link the C reference implementation to provide native decompression performance, the vulnerability cascades far beyond native C and C++ applications. Over an eight-year lifespan in active software circulation (derived, spanning 2018 to 2026), the flawed decoder logic was deeply integrated into the Node.js zlib module, the Bun core runtime, and widespread Python C-extension packages. Between 21 October and 23 October 2026, maintainers across four distinct primary runtime ecosystems rushed emergency releases to production, underscoring the acute supply chain fragility created when modern memory-safe runtimes inherit legacy memory-unsafe C dependencies.
Update, 27 October 2026. CISA added CVE-2026-111497 to its Known Exploited Vulnerabilities catalogue on 27 October (catalogue version 2026.10.27, released 19:00 UTC). The entry is named Google Brotli Unchecked Return Value Vulnerability, lists CWE-252 and CWE-787, sets a due date of 10 November 2026, marks known ransomware campaign use as Unknown, and carries a note that the flaw affects an open source component that different products can use, with a pointer to the Brotli v1.2.1 release. The in the wild exploitation row in the table below cites the CVE record's CISA entry, which read Exploitation none on 23 October 2026; the catalogue listing of 27 October is the later CISA record. The entry does not say who is exploiting the flaw, against which product, or how, and it does not say that the Node.js, Bun or Python path described in this briefing is the one in use. The 10 November date binds US federal civilian agencies; for everyone else it is a signal to patch, not a deadline. Read from the CISA JSON file on 27 October.
Technical architecture of the Brotli decoder heap overflow and multi-language cascade
Quantitative telemetry, version spans, and disclosure timelines
A quantitative evaluation of the affected version matrix, deployment lifespans, and coordinated disclosure milestones illustrates the breadth of ecosystem exposure:
Version spans, patch release dates, and architectural parameters for CVE-2026-111497
| Supply Chain Parameter | Observed Value | Operational Significance |
|---|---|---|
| Vulnerability Lifetime in Codebase | 8 years in circulation (derived) | Flaw introduced in Brotli 1.0.3 (2018) and persisted through version 1.2.0 before coordinated fix. |
| Upstream Fixed C Releases | libbrotli 1.0.10, 1.1.1, 1.2.1 | Google upstream patches incorporating bounds validation checks in c/dec/decode.c. |
| Node.js Emergency Patch Date | 21 October 2026 | Addressed in Node.js 22.23.4, 24.22.1, and 26.12.1; end-of-life branches remain unpatched. |
| Bun Emergency Patch Date | 22 October 2026 | Bun's v1.4.4 notes list Brotli among the APIs with security fixes and name no CVE; that this is CVE-2026-111497 is this site's inference. |
| Python PyPI Wheel Patch Date | 22 October 2026 (PyPI upload times) | Addressed via pre-compiled binary wheel releases of brotli 1.2.1 and brotlicffi 1.2.1.0. |
| Primary Impacted Runtime Ecosystems | 4 major environments | Node.js, Bun, Python, and native C/C++ web services decompressing untrusted inputs. |
| Weakness Classification | CWE-787: Out-of-bounds Write | CVSS 4.0 base score 9.2 Critical (Google as CNA, CVE record read 26 October 2026); the record lists CWE-252 as well; Node.js rates the flaw High. The record carries no CVSS 3.1 score. |
Epistemic audit of verified vendor disclosures versus unstated operational factors
To separate verified memory corruption mechanisms from speculation, the following analytical matrix compares facts documented in primary vendor advisories against operational factors that remain unstated or unverified.
Epistemic matrix comparing confirmed technical disclosures against unstated operational factors
| Technical Dimension | Stated in Primary Vendor Advisories | Unstated or Operationally Unresolved |
|---|---|---|
| Underlying Root Cause | Node.js: an invalid block switch was reported as a temporary need for more input instead of a format error, so the decoder kept appending input to an eight-byte internal buffer. The CVE record: corrupts adjacent decoder state memory. | Which memory is corrupted in practice beyond the eight-byte internal buffer named by Node.js. |
| Remote Code Execution Viability | Memory corruption can lead to denial of service, memory disclosure, or arbitrary code execution. | Reliability: Imperva (22 October 2026) says its proof of concept ran code on the official Node.js 24.22.0 Linux arm64 image, needed multiple attempts, and covers only the tested setups. It does not mention ASLR. |
| Runtime Vendoring Scope | Node.js, Bun, and Python packages statically embed vulnerable C sources into distributed binaries. | The total global count of production container images currently running unpatched runtime binaries. |
| Memory-Safe Implementation Contrast | Nothing read by this audit states how Rust decoders behave for this flaw; the claim has no primary behind it. | The operational performance penalty incurred when replacing C-bindings with pure-Rust decoders. |
| In-the-Wild Exploitation Telemetry | The CVE record and the Node.js post credit OpenAI Codex Security as the finder. The CISA entry in the CVE record lists Exploitation as none (23 October 2026). | Whether sophisticated threat actors discovered and exploited the flaw prior to public coordination. |
The friendly-name fallacy: How memory-safe wrappers breed a false sense of security
Modern application development is anchored in the promise of memory safety. Software architects select platforms like JavaScript on Node.js, TypeScript on Bun, or Python specifically because these environments manage memory automatically, eliminating classic buffer overflows, use-after-free vulnerabilities, and pointer arithmetic errors. This engineering assumption represents a classic friendly-name fallacy. Labelled as a memory-safe application, engineering leadership assumes that the web service is immune to low-level heap corruption.
In reality, high-level languages achieve high-throughput compression only by delegating computational intensive operations to low-level C libraries. When a developer writes a single line of code in Node.js invoking zlib.createBrotliDecompress or in Python invoking brotli.decompress, execution immediately escapes the garbage-collected virtual machine and drops directly into raw C pointers operating on the process heap. If that underlying C library contains an out-of-bounds write, the memory-safe guarantees of JavaScript and Python evaporate instantly. The wrapper does not protect the host: the process terminates with a segmentation fault or yields control flow to an attacker, proving that an application is only as safe as its lowest-level vendored dependency.
Technical details of the fix across runtimes
Phase 1: The Upstream Decoder Flaw in decode.c
The root cause of CVE-2026-111497 resides in the core decoding loop of the reference Google Brotli implementation, located in c/dec/decode.c. The Brotli compression algorithm achieves superior compression ratios by partitioning data into meta-blocks, using variable-length prefix codes (Huffman codes) combined with dynamic context modeling and a static dictionary.
During decompression, the function BrotliDecoderDecompressStream parses incoming bitstreams to reconstruct symbol tables and ring buffers. In versions 1.0.3 through 1.2.0, the decoder state machine contained an insufficient boundary check when evaluating block-type switch commands. Node.js states that 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 change in Brotli 1.2.1 returns a new format error, BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH, in that case.
Phase 2: Ingestion Vectors Across Web Infrastructure
The operational reach of this vulnerability is vastly magnified by common HTTP protocol handling practices. Under standard HTTP/1.1 and HTTP/2 specifications, content encoding allows request and response bodies to be compressed using modern algorithms, with br designating Brotli. While compression is historically associated with server-to-client responses, modern APIs increasingly support client-to-server request body compression to reduce mobile bandwidth usage.
In standard Node.js web frameworks such as Express 5 or applications utilising body-parser, middleware is commonly configured to automatically inspect the Content-Encoding header. If an incoming POST or PUT request specifies Content-Encoding: br, the middleware transparently passes the raw incoming byte stream to node:zlib for decompression before routing the request to application controllers or authentication checks. Consequently, an unauthenticated external attacker can send a crafted Brotli payload directly to any public API endpoint, triggering immediate heap corruption inside the server process before a single line of business logic executes.
Phase 3: The Static Vendoring Cascading Trap
A critical supply chain pathology highlighted by CVE-2026-111497 is the widespread practice of static dependency vendoring. When operating system vendors (such as Debian, Red Hat, or Alpine) publish updated libbrotli shared library packages, system administrators who run apt-get upgrade or apk upgrade expect that all applications running on the host are automatically patched.
For modern runtime environments, this expectation is completely false. Both Node.js and Bun do not link against the operating system's shared libbrotli.so; instead, they vendor the raw C source files directly into their internal source trees and compile them statically into the monolithic node or bun executable. As a consequence, updating the underlying Linux host or container base operating system leaves the web runtime completely vulnerable. Every container image running Node.js or Bun must be explicitly rebuilt using a newly released runtime version tag. The static bundling that simplifies software distribution simultaneously creates a severe vulnerability remediation delay.
Phase 4: Language Ecosystem Comparison: C-Bindings versus Pure Rust
The impact of CVE-2026-111497 varies sharply across programming language ecosystems, providing a stark demonstration of the practical value of memory-safe systems languages. In the Python ecosystem, the dominant compression libraries on PyPI (brotli and brotlicffi) are C-extension wrappers that compile and distribute the vulnerable Google C code inside pre-compiled binary wheels. Python microservices utilizing requests, httpx, or aiohttp with Brotli support enabled inherited identical heap corruption vulnerabilities, requiring emergency wheel rebuilds and updates to version 1.2.1.
No primary read for this audit states how Rust crates are affected, so this site makes no claim about them.
Phase 5: Container Base Image Staleness and Enterprise Exposure
The ultimate operational impact of this vulnerability will be determined by the lifecycle of production container images. Across global enterprise cloud deployments, millions of microservices execute inside Docker containers built on historical Node.js or Python base images. Because these images are frequently pinned to major version tags (such as node:22 or python:3.11) and cached in local container registries, CI/CD pipelines that do not enforce regular base image refreshes continue deploying vulnerable Brotli decoders.
Furthermore, end-of-life runtime branches exacerbate long-term exposure. Node.js 18.x and 20.x, which remain widely deployed across legacy enterprise applications, did not receive official security releases from the Node.js project. Organisations running these legacy versions must either execute emergency upgrades to Node.js 22.x or 24.x, or manually recompile runtime binaries against updated external shared libraries, creating a substantial operational maintenance backlog for enterprise platform teams.
UK regulatory compliance, Cyber Essentials, and NCSC guidance alignment
The cascading supply chain risk exposed by CVE-2026-111497 directly engages United Kingdom regulatory standards and cybersecurity operational guidance.
The National Cyber Security Centre (NCSC) addresses this vulnerability pattern within its Vulnerability Management Guidance and Software Supply Chain Guidance. The NCSC blog on software supply chain attacks recommends keeping a clear inventory of all software dependencies, for example as a software bill of materials. It does not mention statically linked C libraries inside language runtimes; that application is this site's inference.
Under the UK Cyber Essentials scheme (Specification v3.3), certified organisations are required to apply security updates for all internet-facing software within 14 days of public release if the vulnerability is classified as critical. The Cyber Essentials v3.3 requirement is 14 days from release for updates that fix vulnerabilities the vendor calls critical or high risk, or that score CVSS v3 7 or above; Node.js rates this flaw High and released on 21 October 2026, so for organisations certified under the scheme the date is 4 November 2026 (derived). It applies to all in-scope software, not only internet-facing software.
From a data protection standpoint, the UK General Data Protection Regulation (UK GDPR) and Data Protection Act 2018 mandate that data controllers implement appropriate technical measures to prevent service disruption and unauthorised access under Article 32. If an enterprise API gateway crashes repeatedly due to Brotli heap corruption payloads, resulting in prolonged downtime for essential citizen services, or if heap disclosure leaks memory containing personal data, the organisation faces formal regulatory scrutiny from the Information Commissioner's Office (ICO).
Defensive checklist for platform engineers, DevOps, and security leadership
Engineering leadership and DevOps teams must immediately execute the following five-stage verification and remediation protocol across all application clusters:
-
Upgrade Application Runtimes: Upgrade all Node.js production environments to patched versions: 22.23.4, 24.22.1, or 26.12.1. Upgrade all Bun deployments to version v1.4.4 or later. Flush local Docker layer caches to ensure base images pull patched binaries.
-
Update Python Compression Packages: Audit all Python virtual environments and requirements files. Pin brotli to version 1.2.1 or later and brotlicffi to version 1.2.1.0 or later, ensuring that pre-compiled binary wheels incorporate the upstream fix.
-
Audit Web Gateway Request Decompression: Review edge proxy and web framework configurations (such as Express, Fastify, or custom API gateways). If incoming HTTP request body compression is not an explicit operational requirement, disable automatic request body decompression for Content-Encoding: br.
-
Inspect Container Base Images: Execute vulnerability scans using tools like Trivy or Grype across all internal container registries, specifically flagging container base layers containing unpatched libbrotli shared libraries or vulnerable statically linked node and bun binaries.
-
Check any other software that bundles Google Brotli 1.0.3 up to 1.2.0 and update it to 1.0.10, 1.1.1 or 1.2.1 or later, as the CVE record states.
The exposing question for software architecture leadership
If your organisation migrated its core web services to memory-safe modern runtimes like JavaScript, Bun, and Python to eliminate memory corruption vulnerabilities, how many millions of lines of unmonitored C code remain statically vendored inside your runtime engines, waiting to turn an untrusted HTTP header into an immediate heap overflow?
Key operational facts
Essential technical and supply chain parameters for CVE-2026-111497
| Supply Chain Dimension | Verified Technical Detail |
|---|---|
| Vulnerability Identifier | CVE-2026-111497 |
| Common Weakness Enumeration | CWE-787: Out-of-bounds Write |
| CVSS Severity Rating | 9.2 Critical under CVSS 4.0 as scored by Google (CNA); no CVSS 3.1 score in the record; Node.js rates it High |
| Root Cause Source Location | Google Brotli C reference library: c/dec/decode.c |
| Affected Upstream Versions | Google Brotli versions 1.0.3 through 1.2.0 (8 years in circulation, derived) |
| Upstream Fixed C Releases | libbrotli 1.0.10, 1.1.1, and 1.2.1 |
| Node.js Patched Versions | Node.js 22.23.4, 24.22.1, and 26.12.1 (released 21 October 2026) |
| Bun Patched Version | Bun v1.4.4 (released 22 October 2026) |
| Python Patched Releases | brotli 1.2.1 and brotlicffi 1.2.1.0 on PyPI (uploaded 22 October 2026) |
| Primary Ingestion Vector | Unauthenticated HTTP request bodies bearing Content-Encoding: br header |
Sources
- PrimaryCVE-2026-111497: Google Brotli Out-of-bounds Write in DecoderCVE Program / MITREaccessed 2026-10-24
- PrimaryNode.js Security Releases: Updates for CVE-2026-111497 in zlib Brotli bindingsNode.js Projectaccessed 2026-10-24
- PrimaryBun v1.4.4 Release Notes: Security patch for bundled Brotli decoderBun Runtimeaccessed 2026-10-24
- PrimaryNCSC Vulnerability Management Guidance: Managing supply chain dependencies and C-library risksNational Cyber Security Centre (NCSC)accessed 2026-10-24
- PrimaryNode2Shell: From Brotli Data to Remote Code Execution (22 October 2026)Imperva Threat Researchaccessed 2026-10-26
- PrimaryBrotli v1.2.1 release (21 October 2026)Google Brotli projectaccessed 2026-10-26
- Primarybrotli 1.2.1 (uploaded 2026-10-22)Python Package Indexaccessed 2026-10-26
- PrimarySoftware supply chain attacks: check your dependenciesUK National Cyber Security Centreaccessed 2026-10-26


