HTTP2Shell: Same Exploit, Same Node.js, Different Outcome

HTTP2Shell: Same Exploit, Same Node.js, Different Outcome

HTTP2Shell, CVE-2026-111497, arrived with two stories at once. One said a Brotli decoding bug had turned into remote code execution against Node.js. The other said that outside a lab, the realistic outcome was a crash. Both were partly right, and defenders had to make patching and hunting decisions in the space between them.

HuntIQ tested the question in a lab instead of settling it from headlines. We stood up two deliberately vulnerable Node.js servers on the morning of October 24: one in the official Node.js container image, one installed directly on an Ubuntu host. Both ran the same Node.js version and the same Express application. We fired the public x86-64 proof of concept at each, then read what the endpoint recorded. This post abstracts that work. It carries no exploit code, no request construction and no memory detail; the point is what the results mean for defenders.

Key takeaways

  • Code execution on a stock, unmodified Node.js build is real on x86-64, not only arm64: the public exploit returned the output of a command from the official Node.js 24.22.0 container in most of our runs.

  • It is also narrow. The same exploit, against the same Node.js version installed on a different Linux distribution, crashed the service every time and never ran a command.

  • Every success came after a string of crashes, and the exploit depends on something restarting the service. A restart supervisor, the thing that keeps a service available, is what makes it exploitable.

  • The attacker's command replaced the Node.js process instead of running as its child, so the familiar "web runtime spawned a shell" detection does not fire.

  • Treat any internet-facing Express 5 service on an affected Node.js line as exploitable until patched, and treat a crash loop on one as an attack until shown otherwise.

What HTTP2Shell is, in one paragraph

Google's Brotli decoder, versions 1.0.3 through 1.2.0, mishandles one kind of malformed stream: when it cannot complete a block switch, it reports "need more input" instead of a format error, keeps reading, and writes past an eight-byte internal buffer. Node.js, which bundles the decoder, describes the result as memory corruption that can lead to a crash, disclosure of process memory, or remote code execution (Node.js). The data reaches the decoder through ordinary HTTP features, a compressed request body or a compressed response, so no authentication stands in the way. Because the decoder is compiled into Python's Brotli packages, Bun, Envoy and many other products, the flaw is now called HTTP2Shell (Aikido). It has nothing to do with the HTTP/2 protocol, and HTTP is not the only way in: JFrog has shown instruction-pointer control through a crafted JPEG XL image decoded by libjxl, with no HTTP involved, while stopping short of claiming code execution (JFrog).

How we tested

Both targets ran Node.js 24.22.0, the last vulnerable 24.x release, with Express 5.3.0 and body-parser 2.4.0, which decompress Brotli request bodies by default. The first target was the official Node.js container image on an x86-64 Ubuntu 24.04 virtual machine, kept alive by a shell loop that restarts Node when it exits, with its port published to the lab network. The second ran the official Node.js binary directly on a second Ubuntu 24.04 machine, under systemd with automatic restart, no container involved.

The exploit was the public x86-64 proof of concept, unmodified, using its Express profile. That profile is built for the official container image and tries up to 16 fresh processes per run before it gives up. We recorded the exploit's own output, a Linux audit trail of every process execution under the service's account, the service's restart log, and Tanium Threat Response Recorder history for both hosts.

We kept the scope tight on purpose. Exploitation stayed on isolated lab hosts. We staged no persistence, lateral movement or command-and-control afterward, because nobody had publicly attributed any follow-on behavior to HTTP2Shell and we did not want to invent some. And a failed run tells us about this exploit against this build in this configuration, nothing wider.

What we found

Code execution on a stock container image is real

Against the official container, the exploit returned fresh id output, the service account's identity, over the same HTTP connection it attacked, in most of our runs. One run used all 16 attempts without success; the others succeeded somewhere inside that budget, never on the first try. On the run we repeated with Linux auditing enabled, the audit trail independently confirmed the success: the service's own process executed the command.

That settles the narrowest version of the debate. Imperva had already shown code execution on the official arm64 image (Imperva), while at least one public analysis argued that the bad write could not be turned into code execution on stock builds (Tanium). A public exploit now does it on x86-64 against the official image with no inside knowledge of the target, and it worked for us as its author describes.

The same exploit only crashed the host install

Against the host install of the same Node.js version, both runs of 16 attempts failed. The service crashed with a segmentation fault on nearly every attempt and systemd restarted it each time, so the exploit had all the retries it wanted. No command ever ran. The memory corruption was fully reachable; turning it into code execution was not, on that system.

We did not prove why. The public profile is built for the memory layout of the official container image, which runs a different Linux distribution than our host, and that difference is the likely explanation. The defender's conclusion does not depend on the cause. The gap between "reachable memory corruption" and "working exploit" is still real, and it is set by the build and environment, not by the Node.js version number. One profile of one configuration has been crossed. Others have not been, publicly, yet.

The restart supervisor is part of the exploit

Every success came after a run of crashes, and each crash was a failed guess. The exploit needs the service to come back so it can guess again, and the public profile documents a restart supervisor as a precondition. In production that supervisor is everywhere: a container restart policy, systemd's Restart=always, a process manager such as PM2, or an orchestrator recreating a pod. The feature that makes a Node.js service resilient is what turns this bug from a single crash into repeated chances at code execution.

It also makes the attack visible. Under exploitation the containerized service restarted over and over within a few minutes, and each instance lived only a second or two. Threat Response recorded every one of those starts, and that burst is in the Recorder well after the fact.

The command replaced Node.js instead of running under it

The audit trail showed something that changes how to hunt this. The command did not run as a child of the Node.js process. It ran as the Node.js process: the same process ID, now executing /usr/bin/id instead of node. Threat Response recorded the new execution with the restart loop shell as its parent, the same parent Node.js had, and with no command line at all.

So a detection that waits for node to start a shell does not fire, because nothing ever names node as a parent. What does show is a discovery command, with no recorded command line, starting under the service's supervisor in the same instant a crash-looping runtime ends. The companion hunt walks through finding exactly that.

One related trap is worth knowing. Inside the container the service ran as the image's node user, numeric ID 1000. The endpoint resolves IDs against the host's own accounts, so the Recorder showed the host account that happens to own ID 1000. A hunt filtered on the user name node returned nothing.

Where our findings depart from current reporting

Three points in the public conversation deserve correcting, each with a practical consequence.

"Crash-only on stock builds" is out of date for at least one common configuration. The official Node.js 24.22.0 image running Express 5 is exactly what many teams deploy. On that profile, code execution is public and works. Elsewhere it is not yet shown, which is a head start, not a guarantee.

Availability features raise the risk. Most guidance treats a restart policy as neutral or helpful. Here it is a precondition for the exploit. Crash-loop alerting and restart back-off limits will not fix the bug, but they turn a quiet, repeatable attack into a visible outage and cap how many guesses an attacker gets.

"Runtime spawned a shell" is the wrong primary detection. It remains worth running, and later post-exploitation activity will usually trip it. But the first command an attacker runs through this exploit replaces the runtime, so the parent-child relationship most rules key on is never created. Hunt the crash burst and the replacement process first.

What this means for defenders and leadership

Patch to Node.js 22.23.4, 24.22.1 or 26.12.1, and in Python move to Brotli 1.2.1 or brotlicffi 1.2.1.0, then restart every runtime, because a running process keeps the old decoder. Rebuild container images on a patched base; the official image is the configuration with a public working exploit. Prioritize internet-facing Express 5 services and anything that fetches content from addresses users supply.

"It only crashed in most environments" is not the same claim as "it is only a denial of service." A crash is already an outage for any service that decodes Brotli from users. The gap between crash and code execution is a matter of build profile, and a profile is something an attacker can build for the targets that matter to them.

Until everything is patched, watch for the shape the attack cannot avoid: a supervised Node.js service crashing and restarting in a tight loop. It is cheap to alert on and it has very few innocent explanations on a stable production service.

What we did not test

Our results cover one Node.js version (24.22.0), one framework path (an Express 5 JSON body), x86-64 only, and two configurations: the official container image and a host install on Ubuntu 24.04. We did not test the outbound path, where a vulnerable client fetches a malicious response; arm64; other Node.js lines; Bun; the Python packages; Envoy; or Windows and macOS builds. We did not test exploitation without a restart supervisor, where the first crash should simply end the attack. Someone landing code execution on one of those would add to these results rather than overturn them, and we expect it to happen. This post will be revised as our follow-up testing, or credible outside research, moves the line.

References

About HuntIQ

HuntIQ is Tanium's threat hunting practice. Our hunters go hands-on-keyboard in customer environments, running hunt campaigns against live telemetry, triaging what surfaces, pivoting from one endpoint to the whole estate, and escalating with the evidence already attached. Alongside that we build the durable content behind it, the Signals, hunt packages, and recurring hunts your own analysts can run without us.