Netty: SNI Routing Bypass via Fragmented TLS ClientHello Causing Fallback to Default SslContext
Published 8 Sept 2026 · Updated 8 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.17.Final
- Fixed in
- 4.2.17.Final
mvn versions:use-dep-version -Dincludes=io.netty:netty-handler -DdepVersion=4.2.17.Final -DforceVersion=true- Affected
- <4.1.137.Final
- Fixed in
- 4.1.137.Final
mvn versions:use-dep-version -Dincludes=io.netty:netty-handler -DdepVersion=4.1.137.Final -DforceVersion=trueDetails
Summary
A fragmented TLS ClientHello whose handshake header spans multiple records makes Netty silently fall back to the default SslContext; where per-SNI selection is the sole mTLS gate, an unauthenticated attacker can bypass the route's mTLS requirement.
Details
In io.netty.handler.ssl.SslClientHelloHandler#decode the guard that should wait for the 4-byte handshake header checks the wrong offset - it ignores the 5-byte record header that precedes it - and therefore never fires:
if (handshakeLength == -1) {
if (readerIndex + 4 > endOffset) {
// Need more data to read HandshakeType and handshakeLength (4 bytes)
return;
}When the first record's payload is < 4 bytes, handshakeLength = in.getUnsignedMedium(readerIndex + SslUtils.SSL_RECORD_HEADER_LENGTH + 1); leads to IndexOutOfBoundsException . That is caught by the generic catch (Exception) block, which calls select(ctx, null) - this is the default SslContext. Fallback to default on parse failure is a problem when per-SNI selection is the sole mTLS gate.
Impact
SNI routing bypass. Escalates to an unauthenticated mTLS bypass only when:
- mTLS is enforced solely via per-SNI SslContext (clientAuth=REQUIRE)
- the default/fallback SslContext is permissive (clientAuth=NONE/OPTIONAL)
- no secondary peer-certificate verification exists at the application layer.
Is GHSA-c4c3-7fpv-j4q5 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
- 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
- MediumCVE-2023-34462netty-handler SniHandler 16MB allocation · 20 Jun 2023
References
- Linkgithub.com/netty/netty/security/advisories/GHSA-c4c3-7fpv-j4q5
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-75595
- Linkgithub.com/netty/netty/pull/17213
- Linkgithub.com/netty/netty/pull/17217
- Linkgithub.com/netty/netty/commit/1b5abc6443b63726c72cdd285af2feb7ddbb8ff7
- Linkgithub.com/netty/netty/commit/9e0519239108a69b7e9bbc5e9182ee139a0d7961
- Packagegithub.com/netty/netty
- Linkgithub.com/netty/netty/releases/tag/netty-4.1.137.Final
- Linkgithub.com/netty/netty/releases/tag/netty-4.2.17.Final
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.