Brotli decoder buffer overflow triggers emergency updates across Node.js, Bun, and Python
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 · · 11 min read
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.
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 | Addressed in Bun v1.4.4 updating statically vendored libbrotli decompressor sources. |
| Python PyPI Wheel Patch Date | 23 October 2026 | 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 v3.1 base score 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). |
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 | Out-of-bounds heap write in decode.c resulting from invalid block-type transition states. | The complete mathematical proof of state space transitions within the Huffman decoding table. |
| Remote Code Execution Viability | Memory corruption can lead to denial of service, memory disclosure, or arbitrary code execution. | Publicly weaponised, reliable remote code execution exploit primitives operating against modern 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 | Pure Rust implementations handle malformed stream bounds safely without memory corruption. | The operational performance penalty incurred when replacing C-bindings with pure-Rust decoders. |
| In-the-Wild Exploitation Telemetry | Disclosed as a proactive security finding following intense research scrutiny into HTTP/2 pipelines. | 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 forensic autopsy across five operational supply chain phases
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. A remote attacker can construct a malformed compressed stream containing contradictory block-length headers and out-of-sequence block-type symbols. This contradictory metadata causes internal index pointers to advance beyond the allocated ring buffer boundaries. When the decoder subsequently writes decoded literals to memory, it writes bytes past the end of the destination heap buffer, corrupting adjacent heap chunks and metadata.
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.
In contrast, the Rust ecosystem exhibited a bifurcated security posture. Rust crates that function as direct C-bindings (such as brotli-sys) were vulnerable to heap corruption whenever compiled against unpatched C sources. However, services utilizing pure-Rust decompression implementations (such as brotli-decompressor) were completely immune to out-of-bounds writes. In pure-Rust decoders, malformed stream state transitions violated internal invariants that triggered safe error handling or controlled panics, entirely preventing heap memory corruption and eliminating the risk of arbitrary code execution.
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 highlights that third-party open-source components embedded within proprietary codebases represent one of the most frequent entry points for enterprise intrusions. The NCSC explicitly advises organisations to maintain accurate Software Bills of Materials (SBOM) that catalogue statically linked C libraries embedded within high-level language runtimes. Organisations that monitor only top-level direct dependencies fail to detect critical vulnerabilities vendored inside runtime engines.
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. Because CVE-2026-111497 carries a CVSS score of 9.8 and enables pre-authentication denial of service or remote execution on public web gateways, UK organisations must upgrade all internet-facing Node.js, Bun, and Python container instances by 4 November 2026 to maintain compliance.
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.
-
Migrate to Memory-Safe Implementations: For Rust services and high-throughput network proxies, evaluate migrating from C-wrapper crates to pure-Rust decompression implementations (such as brotli-decompressor) to permanently eliminate memory corruption risks from untrusted input streams.
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 v3.1 Severity Rating | 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| 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 (released 23 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


