io.netty:netty-codec-http

CVE-2026-42587

CVE-2026-42587 is a high-severity uncontrolled resource consumption vulnerability in io.netty:netty-codec-http (maven), affecting versions >= 4.2.0.Alpha1, <= 4.2.12.Final. It is fixed in 4.2.13.Final, 4.1.133.Final.

Key facts
CVSS score
7.5
High
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
io.netty:netty-codec-http
Fixed in
4.2.13.Final, 4.1.133.Final
Disclosed
2026

Summary

Summary HttpContentDecompressor accepts a maxAllocation parameter to limit decompression buffer size and prevent decompression bomb attacks. This limit is correctly enforced for gzip and deflate encodings via ZlibDecoder, but is silently ignored when the content encoding is br (Brotli), zstd, or snappy. An attacker can bypass the configured decompression limit by sending a compressed payload with Content-Encoding: br instead of Content-Encoding: gzip, causing unbounded memory allocation and out-of-memory denial of service. The same vulnerability exists in DelegatingDecompressorFrameListener for HTTP/2 connections. Details HttpContentDecompressor stores the maxAllocation value at construction time (HttpContentDecompressor.java:89) and uses it in newContentDecoder() to create the appropriate decompression handler. For gzip/deflate, maxAllocation is forwarded to ZlibCodecFactory.newZlibDecoder(): ZlibDecoder.prepareDecompressBuffer() enforces this as a hard cap by setting the buffer's maxCapacity and throwing DecompressionException when the limit is reached: For brotli, zstd, and snappy, the decoders are created without any size limit: BrotliDecoder has no maxAllocation parameter at all, there is no way to constrain its output. It streams decompressed data in chunks via fireChannelRead with no total limit. ZstdDecoder() defaults to a 4MB maximumAllocationSize, but this only constrains individual buffer allocations, not total output. The decode loop (ZstdDecoder.java:100-114) creates new buffers and fires channelRead repeatedly, so total decompressed output is unbounded. The identical pattern exists in DelegatingDecompressorFrameListener.newContentDecompressor() at lines 188-210 for HTTP/2. PoC Configure a Netty HTTP server with decompression bomb protection: Generate a brotli-compressed bomb (~1KB compressed → 1GB decompressed): Send the bomb with gzip encoding (BLOCKED by maxAllocation): Send the same bomb with brotli encoding (BYPASSES maxAllocation): The same bypass works with Content-Encoding: zstd and Content-Encoding: snappy. Impact Denial of Service: An attacker can cause out-of-memory conditions on any Netty server that relies on maxAllocation for decompression bomb protection, by simply using a non-gzip content encoding. False sense of security: Developers who explicitly configure maxAllocation to protect against decompression bombs are not actually protected for brotli, zstd, or snappy encodings. The API documentation implies all encodings are covered. Trivial bypass: The attacker only needs to change one HTTP header (Content-Encoding: br instead of Content-Encoding: gzip) to circumvent the protection entirely. Both HTTP/1.1 and HTTP/2: The vulnerability exists in both HttpContentDecompressor (HTTP/1.1) and DelegatingDecompressorFrameListener (HTTP/2). Recommended Fix Pass maxAllocation to all decoder constructors. For BrotliDecoder, which currently has no maxAllocation support, add the parameter: HttpContentDecompressor.java, pass maxAllocation to all decoders: DelegatingDecompressorFrameListener.java, same fix at lines 188-210. BrotliDecoder, add maxAllocation parameter with the same semantics as ZlibDecoder.prepareDecompressBuffer(): set buffer maxCapacity and throw DecompressionException when the total decompressed output exceeds the limit. SnappyFrameDecoder, add maxAllocation parameter with equivalent enforcement. ZstdDecoder, ensure that when maxAllocation is set, total output across all buffers is bounded (not just per-buffer allocation size).

Impact

What is uncontrolled resource consumption?

Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.

Severity and exposure

CVE-2026-42587 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (4.2.13.Final, 4.1.133.Final). Upgrading removes the vulnerable code path.

Affected versions

maven

  • io.netty:netty-codec-http (>= 4.2.0.Alpha1, <= 4.2.12.Final)
  • io.netty:netty-codec-http2 (>= 4.2.0.Alpha1, <= 4.2.12.Final)
  • io.netty:netty-codec-http (<= 4.1.132.Final)
  • io.netty:netty-codec-http2 (<= 4.1.132.Final)

Security releases

  • io.netty:netty-codec-http → 4.2.13.Final (maven)
  • io.netty:netty-codec-http2 → 4.2.13.Final (maven)
  • io.netty:netty-codec-http → 4.1.133.Final (maven)
  • io.netty:netty-codec-http2 → 4.1.133.Final (maven)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-42587 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-42587 is reachable in your applications. Get a demo

Remediation advice

Upgrade the following packages to resolve this vulnerability:

  • Upgrade io.netty:netty-codec-http to 4.2.13.Final or later
  • Upgrade io.netty:netty-codec-http2 to 4.2.13.Final or later
  • Upgrade io.netty:netty-codec-http to 4.1.133.Final or later
  • Upgrade io.netty:netty-codec-http2 to 4.1.133.Final or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-42587

What is CVE-2026-42587?

CVE-2026-42587 is a high-severity uncontrolled resource consumption vulnerability in io.netty:netty-codec-http (maven), affecting versions >= 4.2.0.Alpha1, <= 4.2.12.Final. It is fixed in 4.2.13.Final, 4.1.133.Final. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.

How severe is CVE-2026-42587?

CVE-2026-42587 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which packages are affected by CVE-2026-42587?
  • io.netty:netty-codec-http (maven) (versions >= 4.2.0.Alpha1, <= 4.2.12.Final)
  • io.netty:netty-codec-http2 (maven) (versions >= 4.2.0.Alpha1, <= 4.2.12.Final)
Is there a fix for CVE-2026-42587?

Yes. CVE-2026-42587 is fixed in 4.2.13.Final, 4.1.133.Final. Upgrade to this version or later.

Is CVE-2026-42587 exploitable, and should I be worried?

Whether CVE-2026-42587 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-42587 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-42587?
  • Upgrade io.netty:netty-codec-http to 4.2.13.Final or later
  • Upgrade io.netty:netty-codec-http2 to 4.2.13.Final or later
  • Upgrade io.netty:netty-codec-http to 4.1.133.Final or later
  • Upgrade io.netty:netty-codec-http2 to 4.1.133.Final or later

Stop the waste.
Protect your environment with Kodem.