CVE-2021-37136
DoS (Denial of Service) vulnerability in netty-codec (Maven)

DoS (Denial of Service) No known exploit

What is CVE-2021-37136 About?

This vulnerability affects the Bzip2 decompression decoder function, as it lacks size restrictions on decompressed output, leading to excessive memory allocation. This can result in an OutOfMemoryError (OOME) and a Denial of Service (DoS) attack. Exploitation is straightforward, requiring only malicious compressed input.

Affected Software

io.netty:netty-codec <4.1.68.Final

Technical Details

The Bzip2Decoder, referenced in its implementation around lines 80, 294, and 305 within 'codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java', does not enforce any size limitations on the data after decompression. This means that if a malicious actor provides a specially crafted Bzip2 compressed input, it can decompress into an extremely large amount of data. The decoder attempts to allocate memory for this unconstrained output, leading to an OutOfMemoryError (OOME). This OOME causes the application to crash or become unresponsive, resulting in a Denial of Service attack against all users of the Bzip2Decoder.

What is the Impact of CVE-2021-37136?

Successful exploitation may allow attackers to cause a denial of service by triggering an OutOfMemoryError, leading to application crashes or unresponsiveness.

What is the Exploitability of CVE-2021-37136?

Exploitation of this vulnerability is relatively easy, requiring the crafting of a malicious Bzip2 compressed input. No authentication is typically needed if the application processes untrusted compressed data from external sources. The prerequisite for exploitation is an accessible endpoint that uses the Bzip2Decoder to process arbitrary Bzip2 compressed streams. There are no special privilege requirements, and the attack can be launched remotely. The primary risk factor is the application's acceptance and processing of untrusted Bzip2 compressed data without appropriate size validation on the decompressed output.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2021-37136?

Available Upgrade Options

  • io.netty:netty-codec
    • <4.1.68.Final → Upgrade to 4.1.68.Final

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2021-37136?

Similar Vulnerabilities: CVE-2021-37137 , CVE-2019-12086 , CVE-2020-13956 , CVE-2022-24823 , CVE-2018-12502