CVE-2026-50010: Netty TLS Hostname Verification Bypass with Custom Trust Managers
Netty, a widely-used Java framework for building networked applications, contains a vulnerability in how it handles TLS certificate validation. When developers supply their own certificate trust manager to Netty's SSL configuration, the framework wraps it in a way that causes hostname verification to be skipped entirely—even though Netty attempts to enable it by default. An attacker positioned to intercept network traffic could exploit this to perform man-in-the-middle attacks, presenting a valid certificate for a different domain and having the client accept it without complaint.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-347
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-12 / 2026-07-15
NVD description (verbatim)
Netty is a network application framework for development of protocol servers and clients. Prior to versions 4.1.135.Final and 4.2.15.Final, SimpleTrustManagerFactory.engineGetTrustManagers() and related paths wrap any user-supplied plain X509TrustManager in X509TrustManagerWrapper, which extends X509ExtendedTrustManager but implements the 3-arg checkServerTrusted(chain, authType, SSLEngine) by discarding the SSLEngine and calling the 2-arg delegate. Because the object now IS an X509ExtendedTrustManager, neither SunJSSE's internal AbstractTrustManagerWrapper nor Netty's own OpenSslX509TrustManagerWrapper will re-wrap it to add endpoint-identification. Consequently, even though Netty 4.2 sets endpointIdentificationAlgorithm="HTTPS" by default, a client built with `SslContextBuilder.forClient().trustManager(somePlainX509TrustManager)` performs no hostname verification at all. Versions 4.1.135.Final and 4.2.15.Final patch the issue.
12 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in SimpleTrustManagerFactory.engineGetTrustManagers() and related code paths that wrap user-provided X509TrustManager implementations. The wrapper extends X509ExtendedTrustManager but incorrectly implements the 3-argument checkServerTrusted(chain, authType, SSLEngine) method by discarding the SSLEngine parameter and delegating to the 2-argument variant. Because the wrapper object now IS-A X509ExtendedTrustManager, neither SunJSSE's AbstractTrustManagerWrapper nor Netty's OpenSslX509TrustManagerWrapper will perform the re-wrapping necessary to inject endpoint identification. This bypasses the endpointIdentificationAlgorithm="HTTPS" setting that Netty 4.2 configures by default, resulting in no hostname verification when a custom trust manager is supplied via SslContextBuilder.forClient().trustManager().
Business impact
Organizations relying on Netty for TLS clients—particularly those using custom certificate trust managers for internal PKI or certificate pinning—face exposure to man-in-the-middle attacks. Attackers on the network path could intercept HTTPS connections and present valid certificates for unrelated domains, potentially compromising the confidentiality and integrity of data in transit. Affected deployments appear secure but lack the hostname verification layer they expect.
Affected systems
Netty versions prior to 4.1.135.Final and 4.2.15.Final are vulnerable. Any application using Netty's SslContextBuilder with a custom X509TrustManager is at risk. This includes microservices, API clients, proxy servers, and other Java applications that perform outbound TLS connections with custom trust store logic.
Exploitability
Exploitation requires network access to intercept traffic between the vulnerable client and its destination server. No authentication, user interaction, or special privileges are needed; an attacker on the network path (or controlling DNS/routing) can present a valid certificate for any domain and the client will accept it. The barrier to exploitation is moderate—it requires either compromised network infrastructure or a position on the data path, but once achieved, attacks are straightforward.
Remediation
Upgrade to Netty 4.1.135.Final or later for the 4.1 branch, or to 4.2.15.Final or later for the 4.2 branch. These versions correct the wrapping logic to ensure endpoint identification is properly applied even when custom trust managers are supplied. After patching, verify that your SslContextBuilder configuration uses the updated code paths.
Patch guidance
Apply patches from the Netty project: upgrade to version 4.1.135.Final (4.1.x users) or 4.2.15.Final (4.2.x users) as your dependency management allows. Confirm the patched version is in use by checking your dependency resolution tools (Maven, Gradle, etc.). Testing should include verifying that clients reject certificates with hostname mismatches, which can be validated using test TLS servers with intentionally mismatched certificate names.
Detection guidance
Review application code for uses of SslContextBuilder.forClient().trustManager(customTrustManager). Examine build artifacts (JAR manifests, Maven dependency trees) to confirm Netty version and identify which applications embed vulnerable versions. Runtime detection is difficult without TLS inspection, but security monitoring for unexpected certificate acceptance or HTTPS errors may provide indirect signals. Consider deploying a proxy or TLS gateway that enforces hostname verification independently.
Why prioritize this
HIGH severity due to the high CVSS score (7.5) reflecting confidentiality impact and network accessibility. The vulnerability is silent—affected applications appear to validate certificates but do not. Organizations using Netty for outbound TLS connections with custom trust managers should prioritize patching, particularly if those connections traverse untrusted networks or are exposed to hostile environments.
Risk score, explained
CVSS 3.1 score of 7.5 (HIGH) reflects: AV:N (network-accessible attack vector), AC:L (low complexity—no special conditions required), PR:N (no privileges needed), UI:N (no user interaction), S:U (scope unchanged), C:H (high confidentiality impact—MITM can eavesdrop), I:N (integrity is not scored as violated by this vector, though in practice MITM enables tampering), A:N (availability unaffected). The score appropriately captures the exposure of encrypted traffic to interception.
Frequently asked questions
Does this vulnerability affect applications that do not supply a custom trust manager?
No. Applications using Netty's default SSL configuration (without SslContextBuilder.trustManager()) are not vulnerable. Hostname verification operates correctly in the default path. This vulnerability is specific to the custom trust manager wrapping code.
Is there a workaround for users who cannot immediately patch?
Users should audit their TLS connections to identify which ones use custom trust managers and whether those connections traverse untrusted networks. If possible, restrict network access to trusted endpoints or deploy external TLS validation (e.g., a reverse proxy that enforces hostname verification). However, patching is strongly preferred and is the only complete mitigation.
How can we test whether our application is vulnerable?
Build a test TLS server that presents a valid certificate with a hostname that does not match the hostname your client is connecting to (e.g., connect to 127.0.0.1 using a certificate for example.com). Vulnerable applications will accept the certificate without error; patched applications will reject it. This test should be conducted in a controlled environment only.
Does the presence of endpointIdentificationAlgorithm="HTTPS" in Netty 4.2 prevent this issue?
No. Although Netty 4.2 sets this parameter, the wrapping logic prevents it from being applied to custom trust managers. The parameter alone does not protect affected deployments; the code fix in versions 4.1.135.Final and 4.2.15.Final is required.
This analysis is provided for informational purposes and reflects the vulnerability as described in official Netty advisories. Organizations should verify patch availability and compatibility with their specific dependency configurations before deploying updates. Testing in non-production environments is strongly recommended. SEC.co makes no warranty regarding the completeness or accuracy of this information as it applies to your infrastructure. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10795HIGHUpdraftPlus Authentication Bypass Leading to RCE
- CVE-2026-42462HIGHFedify JSON-LD Signature Bypass Vulnerability – Patch Now
- CVE-2026-47201HIGHauthentik SAML XML Signature Wrapping Authentication Bypass
- CVE-2026-48526HIGHPyJWT Authentication Bypass via HMAC Algorithm Misuse
- CVE-2026-52754HIGHGhidra Authentication Bypass via Invalid Certificate Signature
- CVE-2026-41694LOWSpring Security SAML Decryption Oracle Vulnerability
- CVE-2026-45614MEDIUMOP-TEE ECDH Private Key Recovery via Curve Validation Bypass
- CVE-2026-48523MEDIUMPyJWT Algorithm Bypass in JWK Verification (2.9.0–2.12.1)