High

Apache CXF TLS hostname verification does not work correctly with com.sun.net.ssl.*

  • Disclosed: 19.10.2018
  • Updated: 11.10.2026 12:21

It is possible to configure Apache CXF to use the com.sun.net.ssl implementation via 'System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");'. When this system property is set, CXF uses some reflection to try to make the HostnameVerifier work with the old com.sun.net.ssl.HostnameVerifier interface. However, the default HostnameVerifier implementation in CXF does not implement the method in this interface, and an exception is thrown. However, in Apache CXF prior to 3.2.5 and 3.1.16 the exception is caught in the reflection code and not properly propagated. What this means is that if you are using the com.sun.net.ssl stack with CXF, an error with TLS hostname verification will not be thrown, leaving a CXF client subject to man-in-the-middle attacks.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.apache.cxf:apache-cxf >= 3.2.0, < 3.2.5, < 3.1.16 3.2.5, 3.1.16
Java / Kotlin (Maven) org.apache.cxf:cxf-rt-transports-http >= 3.2.0, < 3.2.5, < 3.1.16 3.2.5, 3.1.16

References

CVSS score 8.1/10
CVSS vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-755
Platform
Java / Kotlin (Maven)
Package
org.apache.cxf:apache-cxf, org.apache.cxf:cxf-rt-transports-http
Disclosed
19.10.2018
Updated
11.10.2026 12:21

Sources and licenses

OSV / GitHub Advisory Database - GHSA-jc7r-v6fg-2gpf - CC BY 4.0

Vulnerability history: org.apache.cxf:cxf-rt-transports-http

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
10.2018 07.2024
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 2

Disclosures per year

  1. 2018: 1
  2. 2019: 0
  3. 2020: 0
  4. 2021: 0
  5. 2022: 1
  6. 2023: 0
  7. 2024: 1
  8. 2025: 0
  9. 2026: 0
  1. Medium · 3.7 CVE-2024-41172 >= 4.0.0, < 4.0.5, >= 3.6.0, < 3.6.4 4.0.5, 3.6.4
  2. Medium CVE-2012-5575 >= 2.5.0, < 2.5.10, >= 2.6.0, < 2.6.7, >= 2.7.0, < 2.7.4 2.5.10, 2.6.7, 2.7.4
  3. Apache CXF TLS hostname verification does not work correctly with com.sun.net.ssl.* this entry
    High · 8.1 CVE-2018-8039 >= 3.2.0, < 3.2.5, < 3.1.16 3.2.5, 3.1.16

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.