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

> Attackers can cause denial of service in Netty applications by sending crafted input that triggers excessive memory allocation in the BrotliDecoder.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Sep 2025
- **Updated:** 4 Sep 2025
- **Also known as:** CLEANSTART-2026-DD70897, CLEANSTART-2026-DW10612, CLEANSTART-2026-HA94391, CLEANSTART-2026-TU89159, CLEANSTART-2026-UI06484, CLSA-2026-1777336751, CLSA-2026-1777336753, DEBIAN-CVE-2025-58057, ECHO-5b70-97c8-c749, GHSA-3p8m-j85q-pgmj, MINI-2fmr-227r-3mmc, MINI-2m4f-c237-9w69, MINI-2xxj-j6rj-q5p5, MINI-3j6h-hc77-6pvq, MINI-3vq8-x5qr-4v2q, MINI-3w3f-59qq-cqwx, MINI-447q-pgg7-vj4p, MINI-4692-2g3q-x33c, MINI-4g66-vfhq-fpp8, MINI-4pch-p6jw-8v5v, MINI-5697-v92c-7vwr, MINI-5mx5-2m3m-vp42, MINI-6593-v7wp-cqh5, MINI-72vr-jq37-wmc7, MINI-77f2-6fw3-xv4w, MINI-784x-c479-q876, MINI-7m6q-548p-r52p, MINI-86hq-55rw-9w2m, MINI-89rm-24p5-r62g, MINI-8fwq-m7hh-9m2c, MINI-8jh2-gwfj-h3v5, MINI-9cpx-9f59-gx82, MINI-9prh-96rw-r73g, MINI-c52v-fjhh-q54r, MINI-cfrc-wjw9-v49x, MINI-cvxj-2j4h-gc6w, MINI-fc78-6h7v-v426, MINI-fj6v-r6jf-733c, MINI-frh2-w5v2-988x, MINI-h9qc-wmhg-pj95, MINI-hgxc-w7hm-8hh3, MINI-hhww-qhvf-xjhw, MINI-jc69-m2wc-5263, MINI-jx79-2f6p-r7mg, MINI-m2j8-wxgr-26rq, MINI-mm47-22gc-4mxx, MINI-mq4j-mw7j-r822, MINI-p85h-4cp2-rcxm, MINI-q4gv-5cwv-5p86, MINI-qc27-cwp9-7w53, MINI-qf7j-w86h-24v4, MINI-qjfm-942f-7hc5, MINI-r68f-9v6w-cmqq, MINI-r8mj-346r-hhv2, MINI-rvrx-cpv2-wwjr, MINI-w5p3-9xmh-694j, MINI-wf2g-j36r-m22g, MINI-wfwv-5937-pg28, MINI-x8gv-w9h3-p452, ROOT-APP-MAVEN-CVE-2025-58057

## What is CVE-2025-58057?

CVE-2025-58057 is a medium-severity denial of service vulnerability in Netty Netty, published on 3 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. In netty-codec-compression versions 4.1.124.Final and below, and netty-codec versions 4.2.4.Final and below, when supplied with specially crafted input, BrotliDecoder and certain other decompression decoders will allocate a large number of reachable byte buffers, which can lead to denial of service. BrotliDecoder.decompress has no limit in how often it calls pull, decompressing data 64K bytes at a time. The buffers are saved in the output list, and remain reachable until OOM is hit. This is fixed in versions 4.1.125.Final of netty-codec and 4.2.5.Final of netty-codec-compression.

Weakness: CWE-409 (Improper Handling of Highly Compressed Data (Data Amplification))

## Which versions are affected by CVE-2025-58057?

4 open source packages ship an affected version, including io.netty:netty-codec and io.netty:netty-codec-compression. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `io.netty:netty-codec` | Maven | All versions | 4.1.125.Final |
| `io.netty:netty-codec` | Maven | All versions | 4.1.125.Final |
| `io.netty:netty-codec-compression` | Maven | From 4.2.0.Alpha1 | 4.2.5.Final |
| `io.netty:netty-codec-compression` | Maven | From 4.2.0.Alpha1 | 4.2.5.Final |

Products: Netty Netty.

## How do I fix CVE-2025-58057?

Upgrade io.netty:netty-codec to 4.1.125.Final or later.

## Is CVE-2025-58057 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58057 exists.

## Other vulnerabilities in Netty Netty

- [CVE-2026-75595](https://insights.sbomify.com/CVE-2026-75595/): Netty: SNI Routing Bypass via Fragmented TLS ClientHello Causing Fallback to Default SslContext (critical 9.1)
- [CVE-2026-75596](https://insights.sbomify.com/CVE-2026-75596/): Netty: Fragmented ClientHello records trigger quadratic pre-handshake reassembly in default SNI parsing (high 8.7)
- [CVE-2026-59901](https://insights.sbomify.com/CVE-2026-59901/): Netty Bzip2Decoder: Infinite Loop in RLE State Machine Leads to Event-Loop Thread Hang (high 8.7)
- [CVE-2026-55851](https://insights.sbomify.com/CVE-2026-55851/): Netty codec-haproxy: Signed-Byte Sentinel Collision in HAProxyMessageDecoder Leads to Unbounded Memory Exhaustion (high 8.7)
- [CVE-2026-56745](https://insights.sbomify.com/CVE-2026-56745/): Netty SpdyHttpDecoder: ByteBuf Reference Leak on RST_STREAM Leads to Native Memory Exhaustion (high 8.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-58057 and fix it if it is affected.

What it is: CVE-2025-58057 is a medium-severity denial of service vulnerability in Netty Netty, published on 3 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58057 exists.

Affected packages and fixed versions:
- io.netty:netty-codec (Maven): affected all versions; fixed in 4.1.125.Final
- io.netty:netty-codec (Maven): affected all versions; fixed in 4.1.125.Final
- io.netty:netty-codec-compression (Maven): affected from 4.2.0.Alpha1; fixed in 4.2.5.Final
- io.netty:netty-codec-compression (Maven): affected from 4.2.0.Alpha1; fixed in 4.2.5.Final

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-58057/ (Markdown: https://insights.sbomify.com/CVE-2025-58057/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-58057
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-58057
- OSV: https://osv.dev/vulnerability/CVE-2025-58057

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-58057/
Summaries are generated and may contain mistakes; the official description above is the record.
