Patch the Brotli decoder before it breaks your HTTP stack

Written by an AI pipeline from the sources listed below and checked automatically for tone and accuracy. It may still contain mistakes, so check the sources for anything important.
A recent advisory shows that the Brotli decoder flaw behind Node2Shell has resurfaced as HTTP2Shell, and it now threatens any HTTP client that relies on the Brotli or brotlicffi Python packages.
The vulnerability (CVE-2026-111497) is an out-of-bounds write that lets an unauthenticated attacker send a crafted Brotli stream, corrupt memory, leak data, crash the process, or even execute code. Because popular libraries such as requests, httpx, and aiohttp load the decoder automatically, the risk spreads quickly across services that compress HTTP traffic.
Environments running Brotli 1.2.0 or earlier, or brotlicffi 1.2.0.x, are exposed. The fix landed in the Brotli source in February, but no packaged release shipped until now, so every project that bundles the library must apply its own update. The advisory assigns a CVSS v4.0 score of 9.2 (Critical) and notes that both client-side and server-side code can be compromised.
Why the Brotli decoder flaw matters for HTTP clients
HTTP clients that accept compressed responses delegate decompression to the Brotli library when it is present. The bug makes the decoder keep accepting bytes after it should reject malformed input. Those extra bytes overflow a small working buffer and corrupt adjacent memory. An attacker who controls the compressed payload can therefore manipulate the process’s memory layout.
Since the decoder runs in the same address space as the client, the impact is immediate: a malicious server can hijack a vulnerable client, and a malicious client can take over a vulnerable server that returns Brotli-compressed data. The source emphasizes that the issue works in both directions, turning a simple compression step into a remote-code-execution vector.
Which runtimes and libraries need updating
The advisory maps the CVE to a broad set of runtimes and libraries. The most common targets are:
- Node.js, upgrade to 22.23.4, 24.22.1, 26.12.1, or a newer release in the same line.
- Native libbrotli, upgrade to 1.2.1 or later; older lines can use patched 1.0.10 or 1.1.1.
- Python packages, upgrade Brotli to 1.2.1 and brotlicffi to 1.2.1.0.
- curl / libcurl, update the bundled Brotli dependency to 1.2.1 or a vendor-patched version.
- Bun, upgrade to 1.4.4 or later.
Apache’s standard mod_brotli does not decode Brotli, so it is not affected. Any other HTTP server, reverse proxy, API gateway, or client that bundles Brotli must be upgraded or rebuilt with the patched library.
How to remediate and verify the fix
The most direct path is to upgrade the affected packages and rebuild any artifacts that embed them. For Python environments, the advisory provides a concrete command:
pip install --upgrade Brotli==1.2.1 brotlicffi==1.2.1.0
After running the command, rebuild any container images that bundle the packages and redeploy them. Updating dependency lock files (for example, requirements.txt or Pipfile.lock) ensures that future builds pull the patched versions.
For other runtimes, apply the version upgrades listed above. If a runtime bundles Brotli statically, a new binary build is required. After deployment, verify the running version with a simple check, such as:
python -c "import brotli, brotlicffi; print(brotli.__version__, brotlicffi.__version__)"
The output should show 1.2.1 and 1.2.1.0 or later. For Node.js, run node -p process.versions.brotli and confirm the version meets the required baseline. Finally, perform a smoke test that fetches a known Brotli-compressed endpoint and ensures the response decompresses without error.
If an immediate upgrade is not possible, the advisory suggests a temporary mitigation: uninstall the optional Brotli packages from Python environments and remove extras such as httpx[brotli]. This reduces the attack surface while the upgrade pipeline is prepared.
The takeaway
The out-of-bounds write in the Brotli decoder (CVE-2026-111497) can let any HTTP client that loads a vulnerable library be taken over remotely. Upgrade Brotli to 1.2.1 and brotlicffi to 1.2.1.0 in Python, and apply the corresponding version bumps for other runtimes. Rebuild containers, verify the running versions, and consider uninstalling optional Brotli support as a stop-gap. Doing so closes a critical attack vector across a broad swath of HTTP-based software.
Source: Node2Shell evolves to HTTP2Shell, blast radius affects many HTTP libs and apps