CVE-2021-37136
📋 TL;DR
CVE-2021-37136 is a denial-of-service vulnerability in Netty's Bzip2Decoder that allows attackers to trigger out-of-memory errors by sending specially crafted Bzip2 compressed data. The vulnerability affects all users of Netty's Bzip2Decoder component. Attackers can cause service disruption by exhausting system memory through uncontrolled decompression.
💻 Affected Systems
- Netty
- Apache Druid (uses Netty)
- Other applications using Netty's Bzip2Decoder
📦 What is this software?
Coherence by Oracle
Coherence by Oracle
Communications Brm Elastic Charging Engine by Oracle
View all CVEs affecting Communications Brm Elastic Charging Engine →
Communications Brm Elastic Charging Engine by Oracle
View all CVEs affecting Communications Brm Elastic Charging Engine →
Communications Cloud Native Core Binding Support Function by Oracle
View all CVEs affecting Communications Cloud Native Core Binding Support Function →
Communications Cloud Native Core Binding Support Function by Oracle
View all CVEs affecting Communications Cloud Native Core Binding Support Function →
Communications Cloud Native Core Network Slice Selection Function by Oracle
View all CVEs affecting Communications Cloud Native Core Network Slice Selection Function →
Communications Cloud Native Core Policy by Oracle
View all CVEs affecting Communications Cloud Native Core Policy →
Communications Cloud Native Core Security Edge Protection Proxy by Oracle
View all CVEs affecting Communications Cloud Native Core Security Edge Protection Proxy →
Communications Cloud Native Core Unified Data Repository by Oracle
View all CVEs affecting Communications Cloud Native Core Unified Data Repository →
Communications Diameter Signaling Router by Oracle
View all CVEs affecting Communications Diameter Signaling Router →
Communications Instant Messaging Server by Oracle
View all CVEs affecting Communications Instant Messaging Server →
Helidon by Oracle
Helidon by Oracle
Netty by Netty
Peoplesoft Enterprise Peopletools by Oracle
Peoplesoft Enterprise Peopletools by Oracle
Peoplesoft Enterprise Peopletools by Oracle
Peoplesoft Enterprise Peopletools by Oracle
Quarkus by Quarkus
⚠️ Risk & Real-World Impact
Worst Case
Complete service outage due to out-of-memory conditions causing application crashes and system instability.
Likely Case
Service disruption and degraded performance as systems struggle with memory exhaustion from malicious decompression requests.
If Mitigated
Controlled memory usage with proper input validation and size restrictions preventing successful exploitation.
🎯 Exploit Status
Exploitation requires sending specially crafted Bzip2 data to vulnerable endpoints. The vulnerability is well-documented in public advisories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Netty 4.1.66.Final and later
Vendor Advisory: https://github.com/netty/netty/security/advisories/GHSA-grg4-wf29-r9vv
Restart Required: Yes
Instructions:
1. Update Netty dependency to version 4.1.66.Final or later. 2. For Apache Druid, update to version 0.22.0 or later. 3. Rebuild and redeploy affected applications. 4. Restart services using the updated libraries.
🔧 Temporary Workarounds
Implement custom decompression size limits
allAdd size restrictions to Bzip2Decoder usage in application code
// Java example: new Bzip2Decoder(maxLength)
Disable Bzip2 decompression
allRemove or disable Bzip2Decoder usage if not required
Remove Bzip2Decoder from pipeline configuration
🧯 If You Can't Patch
- Implement network-level controls to filter or limit Bzip2 compressed data
- Deploy memory monitoring and alerting to detect out-of-memory conditions
🔍 How to Verify
Check if Vulnerable:
Check Netty version in dependencies: grep -r 'netty.*4\.1\.[0-6][0-5]' pom.xml build.gradle
Check Version:
java -cp netty-all-*.jar io.netty.util.Version
Verify Fix Applied:
Verify Netty version is 4.1.66.Final or later: mvn dependency:tree | grep netty
📡 Detection & Monitoring
Log Indicators:
- OutOfMemoryError in application logs
- High memory usage spikes
- Application crashes during decompression
Network Indicators:
- Unusually large Bzip2 compressed payloads
- Multiple decompression requests to vulnerable endpoints
SIEM Query:
source="application.logs" AND ("OutOfMemoryError" OR "java.lang.OutOfMemoryError") AND process="*netty*"
🔗 References
- https://github.com/netty/netty/security/advisories/GHSA-grg4-wf29-r9vv
- https://lists.apache.org/thread.html/r06a145c9bd41a7344da242cef07977b24abe3349161ede948e30913d%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/r5406eaf3b07577d233b9f07cfc8f26e28369e6bab5edfcab41f28abb%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/r5e05eba32476c580412f9fbdfc9b8782d5b40558018ac4ac07192a04%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/r75490c61c2cb7b6ae2c81238fd52ae13636c60435abcd732d41531a0%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/rd262f59b1586a108e320e5c966feeafbb1b8cdc96965debc7cc10b16%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/rfb2bf8597e53364ccab212fbcbb2a4e9f0a9e1429b1dc08023c6868e%40%3Cdev.tinkerpop.apache.org%3E
- https://lists.debian.org/debian-lts-announce/2023/01/msg00008.html
- https://security.netapp.com/advisory/ntap-20220210-0012/
- https://www.debian.org/security/2023/dsa-5316
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://github.com/netty/netty/security/advisories/GHSA-grg4-wf29-r9vv
- https://lists.apache.org/thread.html/r06a145c9bd41a7344da242cef07977b24abe3349161ede948e30913d%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/r5406eaf3b07577d233b9f07cfc8f26e28369e6bab5edfcab41f28abb%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/r5e05eba32476c580412f9fbdfc9b8782d5b40558018ac4ac07192a04%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/r75490c61c2cb7b6ae2c81238fd52ae13636c60435abcd732d41531a0%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/rd262f59b1586a108e320e5c966feeafbb1b8cdc96965debc7cc10b16%40%3Ccommits.druid.apache.org%3E
- https://lists.apache.org/thread.html/rfb2bf8597e53364ccab212fbcbb2a4e9f0a9e1429b1dc08023c6868e%40%3Cdev.tinkerpop.apache.org%3E
- https://lists.debian.org/debian-lts-announce/2023/01/msg00008.html
- https://security.netapp.com/advisory/ntap-20220210-0012/
- https://www.debian.org/security/2023/dsa-5316
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html