- The CVE-2026-111497 vulnerability causes an out-of-bounds write to the Google library, allowing malicious code to be executed.
- It affects multiple environments such as Node.js, Python, Bun and various network tools that process Brotli compressed data.
- Exposure occurs both when receiving HTTP request bodies and when downloading responses from external servers.
- The definitive solution requires updating the runtimes and libraries to the patched versions and restarting all active processes.
Imagine your server, without anyone having to log in or bypass any passwords, is left vulnerable to an attacker gaining complete control simply by sending them a compressed file. That's essentially what happens with the vulnerability known as HTTP2Shell , a critical flaw that has turned Node.js, Python, and Bun upside down. It's not just any bug; it's a problem with how the Brotli format is decompressed, a technology almost everyone uses on the web to make pages load faster.
This security vulnerability, registered as CVE-2026-111497 , is what experts call an out-of-bounds write. In simple terms, Google's decoder gets confused with the data and ends up writing information where it shouldn't, corrupting the process's memory. This can cause anything from a simple system crash to a hacker executing arbitrary code with the same permissions as your application, which is, at the very least, a major problem.
Where does this problem come from and why does it have so many names?
At first, everyone was talking about Node2Shell because Node.js was the first to release a patch. Shortly after, they realized that Python packages were also affected, so they started calling it Python2Shell . Eventually, it became clear that the problem wasn't with a specific language, but with Google's C library that everyone shares, so the final name became HTTP2Shell (although some still call it Broccoli2Shell). It's a classic example of a supply chain issue: a core component fails, and the entire ecosystem that uses it becomes vulnerable.
Technically, the failure occurs in a function called DecodeBlockTypeAndLength()The problem was that the program couldn't distinguish whether an error meant the data stream was malformed or if it simply needed more data to continue. On the decoder's fast path, The return value was ignoredallowing an attacker to send data specifically designed to trick the system and write outside of the eight-byte internal buffer.
Who are really in the crosshairs?
It's not enough to have the vulnerable version installed; the attacker's controlled data must reach the decoder. There are three main ways you can be exposed:
- Incoming request bodies: If you use Express 5 with
body-parser 2.xThe server automatically decompresses Brotli request bodies by default. A single line of code like this is all it takes.app.use(express.json())for any anonymous user The internet may attempt to attack the server. - External responses: This is the most dangerous blind spot. If your code does a
fetch()in Node.js or use libraries likerequests,urllib3,aiohttpohttpxIn Python, the system automatically negotiates Brotli compression. If your app downloads content from a user-provided URL (such as in link previews or webhooks), a malicious server could attack your client. - Direct decompression: Any tool that processes Parquet files, XL JPEG images, or PDFs compressed with Brotli and does not control the data source is at risk.
It's important to note that pure Java, Rust, or Go implementations don't suffer from this problem, as they don't use the affected C library or handle errors differently. Basic Apache or Nginx servers are also unaffected, since they compress the output but don't decompress the request bodies by default.
Affected versions and how to fix it
The problem lies with versions 1.0.3 through 1.2.0 of the Google library. To get around this, you need to update your environments immediately. In the case of Node.js, the safe versions are 22.23.4, 24.22.1, and 26.12.1 . If you're using Node.js 20 or earlier, you're out of luck because they are no longer supported and won't receive a patch; you'll have to upgrade to a modern version.
For Python users, the solution is to upgrade the package version Brotli to 1.2.1 y brotlicffi to 1.2.1.0If you use Bun, you must move to version 1.4.4But be aware that updating the package on the disk isn't enough. You also need to restart all processes active, since the vulnerable decoder remains loaded in RAM until the process dies and is reborn.
Emergency measures if you can't patch right now
If for some reason you can't update right now, there are some temporary workarounds, though none are perfect. The most robust option is to block Content-Encoding: br in your WAF, load balancer, or reverse proxy. This prevents compressed data from reaching your server, but it only protects the inbound path.
In Express 5 you can disable body inflation using express.json({ inflate: false })But be careful, because this will also reject gzip files and could break some of your integrations. In Python, the safest approach is uninstall the Brotli packagesThe HTTP libraries will automatically revert to using gzip or deflate, ensuring your data is safe for both incoming and outgoing traffic.
To complete the picture, remember that you shouldn't rely solely on version scanners. What matters is the accessibility of the vulnerability . A server that doesn't process external data is far less critical than a bot crawling the web. The key is to prioritize assets exposed to the internet that make requests to untrusted URLs, rebuilding Docker images and updating lock files so the vulnerability doesn't slip through in the next deployment.
This vulnerability has made it clear that a simple C library can compromise thousands of modern applications in a matter of seconds. To be on the safe side, it's crucial to update Node.js, Python, and Bun to their latest versions, clean up container images, and monitor logs for any unusual behavior, such as unexpected restarts of processes handling compressed traffic.
FAQ
What exactly is the HTTP2Shell vulnerability?
This security vulnerability, identified as CVE-2026-111497, involves an out-of-bounds write to the Google Brotli decoder. This allows an attacker to cause system crashes or execute remote code on the affected server.
Is my Python application vulnerable if I haven't imported the Brotli library?
This is possible if the package is installed as a transitive dependency. Common libraries like requests or httpx automatically use Brotli to decompress responses if they detect that the package is present in the environment.
Are Node2Shell and Python2Shell different attacks?
No, they're referring to the exact same bug in Google's C library. They were initially given different names because Node.js and Python released their patches at different times, but the root cause of the problem is the same.
Can a WAF fully protect me from this RCE?
A WAF only protects incoming requests by blocking compressed bodies. It cannot prevent your application from being attacked when it makes a request to a malicious external server that sends a corrupted Brotli response.
Which versions of Node.js are safe from this vulnerability?
The patched versions are 22.23.4, 24.22.1, and 26.12.1. Users of versions 20 or lower should migrate to a supported version as they will not receive security updates for this issue.
How can I check if my server is under attack?
It is recommended to look for frequent and unexpected restarts of Node.js or Python processes and review the logs for POST requests with the Content-Encoding: br header and unusually large bodies.




