Netty: HttpContentDecompressor maxAllocation bypass via Content-Encoding: br/zstd/snappy enables decompression bomb DoS
Netty's decompression feature has a safety limit to prevent 'decompression bombs' (malicious compressed files that explode into huge sizes), but this limit is ignored when using certain compression types like Brotli, zstd, or Snappy. An attacker can exploit this to crash a server by sending specially crafted compressed data that consumes all available memory.
HttpContentDecompressor in Netty fails to enforce the maxAllocation limit for Brotli, zstd, and Snappy content encodings, while correctly enforcing it for gzip and deflate via ZlibDecoder. An attacker can send a compressed payload with Content-Encoding: br/zstd/snappy to trigger unbounded memory allocation, causing out-of-memory DoS. The same bypass affects DelegatingDecompressorFrameListener in HTTP/2 connections.
Want to know if your infrastructure is exposed to this?
Talk to TrueHacking →