Security

HTTP2Shell Checker

Check if your Node.js, Bun, Python Brotli or system Brotli library is patched against HTTP2Shell, also called Node2Shell (CVE-2026-111497), and copy the commands to check, update and block it.

How to get it
node --version
docker run --rm <image> node --version
npm ls express body-parser
grep -rnE "createBrotliDecompress|brotliDecompress|express\.json|bodyParser" src/
Paste a version

Choose what to check, then paste its version or the output of the command shown below.

Update
nvm install 24 && nvm alias default 24
# Docker: rebuild on a patched base image, e.g. FROM node:24.22.1
Fixed versions (as of October 24, 2026)
Node.js 22.x22.23.4
Node.js 24.x24.22.1
Node.js 26.x26.12.1
Node.js 25, 23, 20, 18No fix: end of life, upgrade
Bun1.4.4
Python Brotli (PyPI)1.2.1
Python brotlicffi (PyPI)1.2.1.0
Google Brotli (libbrotli)1.0.10 / 1.1.1 / 1.2.1
Debian 12 bookworm1.0.9-2+deb12u1
Debian 13 trixie1.1.0-2+deb13u1
UbuntuNeeds evaluation: no fixed package yet
Temporary blocks until you can update

These stop Brotli data from reaching a vulnerable decoder. They do not replace the update, and blocking incoming requests does not protect responses your app downloads.

nginx: reject requests whose body is Brotli-compressed (inside the server block)
if ($http_content_encoding ~* "br") { return 415; }
Apache: reject Brotli-compressed request bodies (mod_rewrite)
RewriteEngine On RewriteCond %{HTTP:Content-Encoding} br [NC] RewriteRule ^ - [F]
Express 5: stop body-parser from decompressing request bodies (also turns off gzip bodies)
app.use(express.json({ inflate: false }));
Bun: do not auto-decompress a response from a server you don't control
await fetch(url, { decompress: false });
Python: remove the Brotli packages so HTTP clients fall back to gzip
pip uninstall -y Brotli brotlicffi

Checked in your browser. What you paste is never uploaded.

Compressed data blocks flowing into a server, with a shield stopping one cracked block and a patch on the rack

How to use

  1. Read the first sections below to see what goes wrong in the Brotli decoder and where your apps decode Brotli without asking.
  2. Choose what to check: Node.js, Bun, the Python Brotli or brotlicffi package, the Brotli library itself, or a Debian/Ubuntu brotli package.
  3. Run the command shown under How to get it on the server, in the container image or in CI, and paste the output (or just the version).
  4. Read the verdict and the fixed version, copy the update command, then restart the service and rebuild images. If you can't update today, copy a temporary block from the bottom of the tool.

What happened

On October 21, 2026, Node.js released 22.23.4, 24.22.1 and 26.12.1 to fix CVE-2026-111497, first nicknamed Node2Shell. Within days it turned out to sit in Google's Brotli decompression library (versions 1.0.3 to 1.2.0), which many other programs embed, so it was renamed HTTP2Shell. The name is misleading: it has nothing to do with the HTTP/2 protocol. Google rates it 9.2 on CVSS 4.0; Node.js rates it high. The bug was reported to Node.js by OpenAI's Codex Security team.

What causes it, in plain words

Brotli is the compression behind Content-Encoding: br, the format browsers and servers use to make web pages smaller. A Brotli stream is cut into blocks, and the stream says up front how many block types it uses; the decoder can then be told to switch from one type to another. A stream that declares a single block type and then asks to switch is simply broken.

The old decoder handled that case wrongly. The function that processes a block switch only answered yes or no, and the decoder read the no as "I need more input" instead of "this data is invalid". So it kept waiting, and kept appending each new incoming byte to a small internal buffer of eight bytes, past its end and into whatever memory came next. Writing attacker-chosen bytes into neighboring memory is how a crash becomes code execution. Think of a clerk who finds a form that makes no sense, says "I'll wait for the rest", and keeps stapling every page that arrives into a folder with room for one.

The fix (Brotli commit 0ed4268, in 1.0.10, 1.1.1 and 1.2.1) makes the decoder stop with a format error the moment it sees that switch.

Where your software decodes Brotli without asking

Two paths of compressed data reaching a Brotli decoder: a request sent to a server and a response downloaded from an unknown server

Incoming requests: Express 5 decodes Brotli request bodies through body-parser 2.x, which inflates by default. Sysdig and Semgrep also name Koa (co-body, @koa/bodyparser, koa-body), Egg, Strapi and Fastify with @fastify/compress. A bare Node.js HTTP server and Express 4 do not decode Brotli bodies. Apache mod_brotli and nginx only compress responses.

Outgoing requests: when your app fetches a URL, the HTTP client decodes a Brotli response on its own. Node.js fetch() does this whenever the response says Content-Encoding: br, even if you asked for identity, and so do Bun fetch() and Python's requests, urllib3, httpx and aiohttp when a Brotli package is installed. Any server you call, or any link a user can make you fetch (webhooks, link previews, scrapers), can send the bad data.

Elsewhere: JFrog showed the same decoder reachable from .NET (HttpClient automatic decompression, ASP.NET Core request decompression), FFmpeg through JPEG XL images, Apache Arrow and ClickHouse. Microsoft shipped an emergency .NET update.

Is it being exploited?

Imperva got code execution on the official Node.js 24.22.0 image, after several attempts, and confirmed 24.22.1 rejects the same input. Public proofs of concept mostly crash the process. Reports differ on attacks: BleepingComputer said on October 26 that none were known, while Sysdig wrote on October 28 that ELLIO had confirmed exploitation on October 26. Treat it as exploited.

Fixed versions

A server with an update arrow and a container image being rebuilt with a wrench

Run node --version inside the real runtime (each container image, CI runner and serverless function), not only on the host; a tag such as node:24 doesn't show the patch number. For Python, run pip show Brotli brotlicffi in every environment. Node.js normally bundles its own Brotli, so updating the system library doesn't fix it; Debian's Node.js is the exception and uses the system brotli package. Bun binaries built with bun build --compile stay vulnerable until rebuilt.

SoftwareFixed in
Node.js 22 / 24 / 2622.23.4 / 24.22.1 / 26.12.1
Node.js 20, 23, 25 and olderNo fix (end of life)
Bun1.4.4
Python Brotli / brotlicffi1.2.1 / 1.2.1.0
Google Brotli library1.0.10, 1.1.1, 1.2.1
Debian 12 / 131.0.9-2+deb12u1 / 1.1.0-2+deb13u1

Ways to protect your apps

A gateway shield stopping a cracked compressed data block while ordinary messages pass through

Patch: update the runtime or package, restart every process, and rebuild and redeploy container images on a patched base image.

Close the inbound path: reject requests whose Content-Encoding contains br at the reverse proxy or load balancer, or turn off request decompression in the framework (express.json({ inflate: false }), which also rejects gzip bodies, so test clients first).

Close the outbound path: removing br from Accept-Encoding is not enough, because a malicious server can send Brotli anyway. Disable decompression for untrusted URLs (Bun: fetch(url, { decompress: false })) or, in Python, uninstall Brotli and brotlicffi until you update.

Limit the damage and watch: run Node.js as an unprivileged user, keep secrets out of its environment, and alert when a Node or Python process crashes during decompression and then starts a shell or opens an unexpected connection. A crash alone is not proof of an attack, but it is worth a look.

Frequently asked questions

Is HTTP2Shell the same as Node2Shell?

Yes. Both names refer to CVE-2026-111497. HTTP2Shell came into use on October 23 as the bug turned out to affect more than Node.js.

Is it related to PHP2Shell?

No. PHP2Shell (CVE-2026-109618 and CVE-2026-109619) is a separate flaw in PHP, disclosed the same week. Check PHP with the PHP2Shell Checker.

My site runs on nginx or Apache. Am I affected?

Not through the web server itself in its default setup. You can still be affected through an application behind it, such as a Node.js, Python or .NET app, or through anything that fetches URLs and decodes Brotli.

Are browsers affected?

The fixes and reports so far are for servers, runtimes and libraries. Keep your browser updated anyway; it updates itself in the background.

Is what I paste uploaded?

No. The version check runs in your browser, and nothing you paste leaves your device.

Found a problem or have an idea? Report a problem

Share

You might also like