This is a notice from the Information Security Office to alert you to a critical vulnerability that impacts the Brotli compression decoder, a library used by NodeJS and Python. Please share this alert internally with IT admins and service owners who run the affected products so they are aware and know what actions to take to address this vulnerability.
SUMMARY
ISO is aware of a critical vulnerability that affects the Brotli compression decoder library. This vulnerability was first announced to affect Node.js[1] but was later announced to also affect Python[2]. After further research, the flaw was found to be in the underlying Google Brotli library[3] and to impact many other products. If malicious Brotli data is decompressed on the server, this vulnerability could allow the attacker to extract memory or run remote code on the server, or perform a Denial of Service attack.
IMPACT
If the vulnerability is exploited on an affected server, this could allow the attacker to perform Remote Code Execution on the server. Every project that bundles an affected version of the Brotli library in its own code, or depends on a vulnerable version of the library, will have to be updated.
WHAT IS VULNERABLE[3]
Node and NodeJS
- Versions 10.16.0 - 22.23.3
- Versions 23.0.0 - 24.22.0
- Versions 25.0.0 - 26.12.0
Python
- The Python brotli extension versions 1.0.4 - 1.2.0
C++ - the google.brotli package and libbrotli:
- Versions 1.0.3 - 1.0.9
- Version 1.1.0
- Version 1.2.0
RECOMMENDATIONS
- Node and NodeJS: upgrade to a patched version:
- Versions 10.16.0 - 22.23.3: upgrade to 22.23.4
- Versions 23.0.0 - 24.22.0: upgrade to 24.22.1
- Versions 25.0.0 - 26.12.0: upgrade to 26.12.1
- Python brotli extension:
- Upgrade to version 1.2.1
- C++ google.brotli package and libbrotli:
- Versions 1.0.3 - 1.0.9: upgrade to 1.0.10
- Version 1.1.0: upgrade to 1.1.1
- Version 1.2.0: upgrade to 1.2.1
MITIGATION
The vulnerability is difficult to exploit if you are running an operating system that is running Address Space Layout Randomization (ASLR). This is a technique that puts the memory used by the operating system and its applications in random locations in memory, making them harder to predict and extract.[4] Ensure that your operating system has ASLR enabled[5], which will protect you against this attack as well as others.
You can also reject requests that use Brotli compression in your WAF or reverse proxy, or in your web server configuration.
REFERENCES
- https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/
- https://opensourcemalware.com/blog/node2shell-affects-python
- https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497
- https://www.huntress.com/cybersecurity-101/topic/what-is-address-space-layout-randomization-aslr
- https://www.incibe.es/en/incibe-cert/blog/aslr-essential-protection-against-memory-exploitation
If you have any questions about the vulnerability or would like some assistance patching or mitigating it, please contact security@berkeley.edu.