netty-handler SniHandler 16MB allocation
Published 20 Jun 2023 · 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 package
- Affected
- <4.1.94.Final
- Fixed in
- 4.1.94.Final
mvn versions:use-dep-version -Dincludes=io.netty:netty-handler -DdepVersion=4.1.94.Final -DforceVersion=trueDetails
Summary
The SniHandler can allocate up to 16MB of heap for each channel during the TLS handshake. When the handler or the channel does not have an idle timeout, it can be used to make a TCP server using the SniHandler to allocate 16MB of heap.
Details
The SniHandler class is a handler that waits for the TLS handshake to configure a SslHandler according to the indicated server name by the ClientHello record. For this matter it allocates a ByteBuf using the value defined in the ClientHello record.
Normally the value of the packet should be smaller than the handshake packet but there are not checks done here and the way the code is written, it is possible to craft a packet that makes the SslClientHelloHandler
1/ allocate a 16MB ByteBuf
2/ not fail decode method in buffer
3/ get out of the loop without an exception
The combination of this without the use of a timeout makes easy to connect to a TCP server and allocate 16MB of heap memory per connection.
Impact
If the user has no idle timeout handler configured it might be possible for a remote peer to send a client hello packet which lead the server to buffer up to 16MB of data per connection. This could lead to a OutOfMemoryError and so result in a DDOS.
Is GHSA-6mjq-h674-j845 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-45416Netty: SNI handler pre-allocates up to 16 MiB from nine attacker bytes · 8 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
References
- Linkgithub.com/netty/netty/security/advisories/GHSA-6mjq-h674-j845
- Advisorynvd.nist.gov/vuln/detail/CVE-2023-34462
- Linkgithub.com/netty/netty/commit/535da17e45201ae4278c0479e6162bb4127d4c32
- Packagegithub.com/netty/netty
- Linksecurity.netapp.com/advisory/ntap-20230803-0001
- Linksecurity.netapp.com/advisory/ntap-20240621-0007
- Linkwww.debian.org/security/2023/dsa-5558
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.