Miggo Logo

CVE-2025-58057: Netty's decoders vulnerable to DoS via zip bomb style attack

N/A

CVSS Score

Basic Information

EPSS Score
-
Published
9/3/2025
Updated
9/3/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
io.netty:netty-codec-compressionmaven>= 4.2.0.Alpha1, < 4.2.5.Final4.2.5.Final
io.netty:netty-codecmaven< 4.1.125.Final4.1.125.Final

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a classic denial-of-service issue caused by improper handling of highly compressed data, commonly known as a "zip bomb" attack. The root cause lies in several of Netty's decompression handlers (BrotliDecoder, JZlibDecoder, JdkZlibDecoder, ZstdDecoder) and the higher-level handlers that use them (HttpContentDecoder, DelegatingDecompressorFrameListener).

The vulnerable pattern, common to all affected components, was the use of an output list (List<Object> out) or an internal buffer to accumulate all the decompressed data from a compressed input stream before passing it down the pipeline. When a malicious, highly-compressed payload (a zip bomb) was processed, the decoder would enter a loop, decompressing small chunks of input into large chunks of output and adding each output buffer to the list. This caused the application's memory usage to grow uncontrollably, eventually leading to an java.lang.OutOfMemoryError and a denial of service.

The provided stack trace clearly shows the memory allocation failure originating from BrotliDecoder.pull, which was called by BrotliDecoder.decompress.

The patch addresses this by fundamentally changing the data flow. Instead of collecting buffers in a list, the modified decoders now immediately fire a channelRead event for each piece of decompressed data. This pushes the data down the pipeline as it becomes available, effectively streaming the output and preventing it from being buffered in memory. This change ensures that memory usage remains bounded, mitigating the DoS risk.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry Wit* sp**i*lly *r**t** input, `*rotli***o**r` *n* som* ot**r ***ompr*ssin* ***o**rs will *llo**t* * l*r** num**r o* r******l* *yt* *u***rs, w*i** **n l*** to **ni*l o* s*rvi**. ### **t*ils `*rotli***o**r.***ompr*ss` **s no limit in *ow

Reasoning

T** vuln*r**ility is * *l*ssi* **ni*l-o*-s*rvi** issu* **us** *y improp*r **n*lin* o* *i**ly *ompr*ss** **t*, *ommonly known *s * "zip *om*" *tt**k. T** root **us* li*s in s*v*r*l o* N*tty's ***ompr*ssion **n*l*rs (`*rotli***o**r`, `JZli****o**r`, `J