Netty: SNI handler pre-allocates up to 16 MiB from nine attacker bytes
Published 8 Jun 2026 · Updated 10 Sept 2026
Is your project on an affected io.netty:netty-handler?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=4.2.0.Final <4.2.15.Final
- Fixed in
- 4.2.15.Final
mvn versions:use-dep-version -Dincludes=io.netty:netty-handler -DdepVersion=4.2.15.Final -DforceVersion=true- Affected
- <4.1.135.Final
- Fixed in
- 4.1.135.Final
mvn versions:use-dep-version -Dincludes=io.netty:netty-handler -DdepVersion=4.1.135.Final -DforceVersion=trueDetails
SslClientHelloHandler.decode() reads the 24-bit TLS handshake length and, when the ClientHello does not fit in the first record, eagerly allocates ctx.alloc().buffer(handshakeLength) (line 161). The guard at line 140 is handshakeLength > maxClientHelloLength && maxClientHelloLength != 0, and the commonly-used SniHandler/AbstractSniHandler constructors (SniHandler(Mapping), SniHandler(AsyncMapping), AbstractSniHandler()) pass maxClientHelloLength=0 and handshakeTimeoutMillis=0, so the length guard is disabled and no timeout is scheduled. A 16 MiB request exceeds the default pooled chunk size and becomes a huge/unpooled allocation performed immediately. The buffer is retained in the handler until the channel closes.
Is GHSA-x4gw-5cx5-pgmh in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected io.netty:netty-handler, and gives you the command that fixes it.
More advisories for io.netty:netty-handler
- CriticalCVE-2026-75595Netty: SNI Routing Bypass via Fragmented TLS ClientHello Causing Fallback to Default SslContext · 8 Sept 2026
- MediumCVE-2026-75596Netty: Fragmented ClientHello records trigger quadratic pre-handshake reassembly in default SNI parsing · 8 Sept 2026
- HighCVE-2026-50010Netty: Wrapping plain trust manager silently disables hostname verification · 15 Jun 2026
- HighCVE-2026-44249Netty has an IPv6 Subnet Filter Bypass via Incorrect Comparator Masking · 8 Jun 2026
- HighCVE-2025-24970SslHandler doesn't correctly validate packets which can lead to native crash when using native SSLEngine · 10 Feb 2025
- MediumCVE-2023-34462netty-handler SniHandler 16MB allocation · 20 Jun 2023
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.