
Fifteen years building engineering platforms, currently focused on advanced AI infrastructure at yeet. I love turning the deeply complex topics into something everyone can understand. I relate deeply with the core yeet philosophy that you can just build things.
Last updated: November 2026
I'm an engineer at yeet, and the part of it this post touches is the programmable firewall, which is one of the options below.
Quick answer. The fix is node.js 26.12.1, 24.22.1 or 22.23.4, or brotli 1.2.1, 1.1.1 or 1.0.10 if you link it directly. If that cannot ship tonight, the fastest thing that blocks the exploit is a rule that refuses any request whose
Content-Encodingheader namesbr, applied on each origin host with no deploy and no process restart. Node.js publishes no in-runtime workaround, so that rule and every other stopgap here buys time while the upgrade rolls through your fleet. Node2Shell has been exploited in the wild since 26 October 2026 and has been on CISA's KEV list since 27 October, so the window this buys is the only one you get.
Node2Shell is CVE-2026-111497, a memory-corruption bug in the brotli decoder that node.js bundles. A request whose body the client declares as brotli-compressed reaches the decoder before any application code runs, which makes it unauthenticated remote code execution against anything that accepts a compressed body. The Node2Shell reference page carries the affected versions, the patch and the check commands.
This post is about the other question: the upgrade is scheduled, it is not tonight, and the bug is already being exploited. The reference page tells you whether you are affected and what to install. What follows is the operational decision underneath that, which is what covers the gap between knowing and shipping, and which of the available stopgaps are worth the disruption they cost.
Five that need no upgrade, ordered by how fast they land. Node.js and brotli publish no in-runtime workaround, so every row here buys time rather than fixing the bug, and the upgrade is still the work. The last column is what each option's own source says about it.
| Route | How fast it lands | Needs a deploy or restart | Sees requests that skip your CDN or WAF | What its own source says |
|---|---|---|---|---|
| A virtual patch on each origin host, such as the yeet programmable firewall | under a minute to install, 3 to 6 ms to apply the rule | No | Yes, east-west included | cleartext only, so TLS terminates upstream of the host |
Reject Content-Encoding: br at the proxy, load balancer or WAF | minutes | No | No | red hat: "strip or reject Content-Encoding: br" |
| Disable the brotli decompressor in Envoy or Istio | minutes, a mesh config push | No | Yes, inside the mesh | keeps gzip and zstd working |
express.json({ inflate: false }) | one deploy | Yes, it is a deploy | n/a, it closes that parser everywhere | rejects gzip bodies too, not only brotli |
| Disable automatic brotli response decompression in HTTP clients | one deploy | Yes | n/a | covers the outbound path the others miss |
This is the only option that blocks the request without changing your application, your deploy or your node.js, which is why it goes first when tonight's upgrade is not happening. Everything below it needs either a configuration push you may not control or a release you were already trying to avoid tonight.
The indicator is unusually clean for a memory-corruption bug. The decoder only runs on a body the client has declared as brotli, and the client declares it in a header: Content-Encoding: br. A rule that refuses those requests closes the inbound path before node reads the body. That is a header match in the first couple of kilobytes, which a host rule can do at line rate, and it does not depend on recognising anything about the payload itself. Most request-matching rules approximate the vulnerability; this one sits on the precondition the decoder needs.
Put it on the origin host rather than at the edge and it sits behind your TLS termination, so it reads the same cleartext node is about to parse, and it covers every route into that machine: east-west calls between your own services, traffic addressed to the host directly, and anything that never crossed your CDN.
Here is the rule, which is the one we tested:
nocase;
reassemble 3000;
// A Content-Encoding header line that names br, alone or
// after other codings. Accept-Encoding is a different line
// and is not matched.
regex br_body = "\ncontent-encoding:[^\r\n]{0,40}br";
filter {
if (proto != 6) decide pass;
if (dport != 3000) decide pass;
if (len == 0) decide pass;
if (any(within(payload, 2048), br_body)) {
log(96);
decide rst("node2shell_br_request", 0);
}
decide pass;
}
The nocase and the bounded character class are doing real work here. A header written CONTENT-ENCODING: BR, written with no space after the colon, or naming brotli second in a list as gzip, br, all still match, and those are the forms a naive equality check misses. Accept-Encoding, which is what an ordinary browser sends on nearly every request and which must keep working, does not match, because the pattern anchors on the newline before the header name.
Content-Encoding rule showedWe ran it on linux 6.12.117 against an unpatched node:24.22.0-slim running express 5.3.0, in three passes: no rule, rule enforcing, and rule in monitor mode. With no rule loaded, all eight requests reached the app and the app decoded the brotli body, which is what makes the later block attributable to the rule rather than to anything else.
| Request | No rule | Rule enforcing |
|---|---|---|
GET, browser Accept-Encoding: gzip, br | reached the app | reached the app |
| JSON post, no content coding | reached the app | reached the app |
| JSON post, body coded gzip | reached the app | reached the app |
| JSON post, body coded br | reached the app, decoded | refused |
Header written CONTENT-ENCODING: BR | reached the app | refused |
| No space after the colon | reached the app | refused |
br named after gzip | reached the app | refused |
br body after a 4.5 KB cookie header | reached the app | refused |
Five brotli forms refused, three ordinary requests passed, including the browser Accept-Encoding header that a careless rule would have broken. In monitor mode every request reached the app and the rule logged five verdict events, which is the count you look at before you enforce.
Content-Encoding: br at the proxy or WAFThe same match, one hop earlier. Red Hat's guidance is to "strip or reject Content-Encoding: br", and if your traffic already passes through a proxy you control, this is a configuration change rather than a deployment, which usually makes it the second fastest thing on the list after a host rule.
Match case-insensitively and account for the header naming brotli in a list, because gzip, br is the form that slips past a naive equality check. The limit is the one every edge control has: it inspects what crosses it, so a request addressed to an origin host directly, or a call from one of your own services to another, never meets the rule.
If you run a mesh, the decompressor is a filter you can turn off for brotli while leaving gzip and zstd in place. That covers service-to-service traffic inside the mesh, which is exactly the traffic an edge rule does not see, and it needs no application change and no redeploy of the workloads themselves. The limit is the obvious one: it covers what goes through the mesh, so a node process reachable outside it is untouched.
express.json({ inflate: false }) and the client-side pathSetting inflate: false makes express answer 415 to a compressed body, which closes that parser's route to the decoder. Two caveats are worth weighing before you reach for it. It rejects gzip bodies as well as brotli, which may break legitimate clients that compress their uploads. And it needs a deploy, which puts it on roughly the same timeline as the upgrade you were trying to buy time against, so it is rarely the fastest answer to the question this post asks.
The outbound path is the one most people forget. If your code calls fetch() and the response arrives brotli-coded, node decodes it with the same vulnerable decoder, so a server you call can reach you. Disabling automatic brotli response decompression in your HTTP clients closes that, and no inbound rule anywhere covers it.
It blocks the requests it sees, which is a smaller set than the requests your application actually receives. The gap between those two sets is where this bug stays reachable, and on Node2Shell that gap is wider than usual for two separate reasons.
An edge rule inspects traffic that reaches the edge. That covers inbound HTTP from the internet and nothing else: not calls between your own services, not a request addressed to the origin by IP, not a vulnerable node process reachable only from inside your network. Internal node services exchanging compressed payloads sit entirely outside its view.
The second gap is direction. Every edge rule in this class matches inbound request bodies, and Node2Shell is also reachable through responses your own code fetches. A WAF never sees that traffic, because it is your server making the call outward rather than somebody arriving inward. Any service your application integrates with, or any URL it fetches on a user's behalf, is a path the edge cannot inspect.
So the honest reading: an edge rule is worth turning on immediately if you have one, because it costs nothing and covers the largest single slice of traffic. It is not a reason to deprioritise anything else on the list, and in particular it is not a reason to treat the internal and outbound paths as covered.
Yes, since before most teams heard of it, and it changes the order of the work rather than the work itself. The upgrade was always the fix. What exploitation changes is how much tolerance you have for the interval before it ships, which is the interval a rule is there to cover.
Exploit traffic was first seen on 26 October 2026, and CISA added CVE-2026-111497 to the Known Exploited Vulnerabilities catalog on 27 October. Federal civilian agencies have a binding deadline against KEV entries, and for everyone else the listing is the signal that the window between disclosure and commodity scanning has already closed.
What that means practically: there is no "we will do it next sprint" option that is also a defensible one. Either the upgrade goes out now, or something blocks the request shape while it is prepared. The difference between those two is hours of exposure, which is what a rule you can apply without a restart is actually for.
By reading the running process rather than the package manifest, because on a host that was upgraded without a restart the two disagree. The manifest reports what is installed. The thing serving your traffic is whatever each process loaded when it started, and only one of those answers is true of the code actually running.
The useful check is the node binary's own version, not the brotli version it reports. node -p process.versions.brotli prints 1.2.0 on both fixed and unfixed node 24 builds, so it tells you nothing about this CVE. A reliable probe for a patched build is whether a constant added by the fix is present:
node -p "'BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH' in require('zlib').constants"
That prints false on 22.23.3, 24.22.0 and 26.12.0, and true on 22.23.4, 24.22.1 and 26.12.1, checked against the official images for each of those releases. It works because the constant ships with the fix, so its presence is a property of the build rather than of a version string somebody could have patched around.
Two more places node hides, both of which survive a clean sweep of node versions. Bun bundles its own brotli and needs 1.4.4, and binaries produced by bun build --compile need rebuilding rather than just an upgraded runtime. Anything that vendors the brotli library directly, rather than going through node, needs brotli 1.2.1, 1.1.1 or 1.0.10 and will not appear in a node inventory at all.
Content-Encoding rule see?Four things, and knowing them is the difference between a stopgap you are using deliberately and a false sense of completion. Each is a path the header match does not reach, which matters most when somebody later asks whether the rule means the upgrade can wait.
Responses your own code fetches. The decoder runs on brotli-coded response bodies too. An inbound rule matches requests arriving at your host; it does nothing about a brotli response returned by a service you called. That makes any outbound HTTP call to a server you do not control a live path, which is the gap most teams miss because it inverts the usual direction of attack.
Traffic inside TLS the host does not terminate. A rule at XDP reads what arrives at the NIC, which is the cleartext the machine is about to parse only when something upstream has already decrypted it. If TLS terminates inside the node process rather than at an edge, a load balancer or a sidecar, the rule sees ciphertext and matches nothing. This is worth settling before counting on a host rule anywhere in your estate.
A body line that looks like a header. The rule matches a content-encoding line in the first two kilobytes. A request body that contains that text can match it, which is a false positive rather than a miss, and is the reason to run monitor mode before enforcing.
More than 40 bytes between the colon and br. The tested rule bounds the header value it scans, which is what keeps the work per packet predictable. A sufficiently padded header value falls outside that bound, so the trade is bounded cost against exotic header shapes, and the bound is a number in the rule rather than a property of the approach.
No. It covers the inbound path while the upgrade ships, and the upgrade is what resolves the bug. Node2Shell has a cleaner indicator than most memory-corruption bugs: the decoder only runs when the client says the body is brotli, and the client says so in a header. That makes it one of the rare cases where a request rule genuinely covers the inbound path rather than approximating it. Put a rule on each origin host tonight, where it sees the east-west traffic your edge misses, run it in monitor mode long enough to look at the count, then enforce. Roll node.js 26.12.1, 24.22.1 or 22.23.4 behind it at the pace a careful upgrade takes, restart every process, and remember the fetch() path that no inbound rule covers.
Refuse requests whose Content-Encoding header names br. The brotli decoder only runs on a body the client has declared as brotli-coded, so rejecting that header closes the inbound path before node reads the body. Applied as a virtual patch on each origin host it needs no deploy and no process restart, and it covers the east-west traffic an edge rule never sees. The reference page carries the versions that actually fix it.
A rule that refuses the malicious request before the vulnerable brotli decoder runs, rather than a change to node.js itself. For Node2Shell that means matching a Content-Encoding header line that names br, case-insensitively and including forms like gzip, br, and dropping the request at the host. It is a compensating control that closes the delivery path without touching your application or your runtime.
Node2Shell is CVE-2026-111497, a memory-corruption bug in the brotli decoder bundled with node.js. A request body declared as brotli-compressed reaches the decoder before any application code runs, which makes it unauthenticated remote code execution against anything willing to accept a compressed body. Because the bug sits in the library rather than in node itself, it reaches every runtime that links brotli. The Node2Shell reference page carries the full record.
Node.js 26.12.1, 24.22.1 and 22.23.4. If you link brotli directly rather than through node, the fixed library versions are 1.2.1, 1.1.1 and 1.0.10, and bun needs 1.4.4, with bun build --compile binaries requiring a rebuild rather than only an upgrade. The reference page lists affected and fixed versions per branch, including the distribution packages.
Yes. Exploit traffic was first seen on 26 October 2026, and CVE-2026-111497 has been on CISA's KEV catalog since 27 October 2026, which puts a binding remediation deadline on federal civilian agencies and signals to everyone else that commodity scanning has already started. Treat the upgrade as urgent and use a request rule to cover the hours in between.
It blocks the inbound requests that cross it, which is worth having and is not the whole picture. It does not see calls between your own services, requests addressed to an origin host directly, or the outbound path where your own fetch() call decodes a brotli response returned by somebody else's server. Where a host firewall sits relative to a network firewall covers that split in more detail.
Not in our testing, as long as the rule matches the Content-Encoding header rather than Accept-Encoding. Browsers advertise brotli support on nearly every request through Accept-Encoding, which must keep working; compressed request bodies are comparatively rare. Run the rule in monitor mode first and look at what it would have blocked before enforcing.
Because it does not move. node -p process.versions.brotli prints 1.2.0 on both fixed and unfixed node 24 builds. Check the node version itself, or probe for a constant the fix added: node -p "'BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH' in require('zlib').constants" returns true only on a patched build.
Yes. The bug is in the brotli library, so anything that links it is affected, including bun, which needs 1.4.4. Software that vendors brotli directly needs the fixed library version and will not appear in a node version sweep at all, which is the case most likely to be missed during an inventory. Python environments with the brotli or brotlicffi packages installed are worth checking on the same pass.
l7-firewall-in-the-kernel. The enforcement point described here and its measured compile-and-swap timing.