CVE-2018-8039
apache-cxf: TLS hostname verification does not work correctly with com.sun.net.ssl.*
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
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.
Es posible configurar Apache CXF para que use la implementación com.sun.net.ssl a través de "System.setProperty("java.protocol.handler.pkgs" "com.sun.net.ssl.internal.www.protocol");". Cuando se establece esta propiedad de sistema, CXF utiliza determinada reflexión para intentar hacer que HostnameVerifier funcione con la antigua interfaz com.sun.net.ssl.HostnameVerifier. Sin embargo, la implementación predeterminada de HostnameVerifier en CXF no implementa el método en esta interfaz y se lanza una excepción. Sin embargo, en Apache CXF en versiones anteriores a la 3.2.5 y 3.1.16, la excepción queda atrapada en el código de reflexión y no se propaga correctamente. Esto significa que, si está utilizando la pila com.sun.net.ssl con CXF, no se producirá un error con la verificación del nombre de host TLS, lo que dejará a un cliente CXF sujeto a ataques Man-in-the-Middle (MitM).
It was discovered that when Apache CXF is configured to use the system property com.sun.net.ssl.internal.www.protocol ,it uses reflection to make the HostnameVerifier work with old com.sun.net.ssl.HostnameVerifier interface. Although the CXF implementation throws an exception, which is caught in the reflection code but it is not properly propagated, this can lead to a man-in-the-middle attack.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2018-03-09 CVE Reserved
- 2018-07-02 CVE Published
- 2018-11-19 First Exploit
- 2024-08-23 EPSS Updated
- 2024-09-17 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-248: Uncaught Exception
- CWE-755: Improper Handling of Exceptional Conditions
CAPEC
References (27)
URL | Date | SRC |
---|---|---|
https://github.com/tafamace/CVE-2018-8039 | 2018-11-19 |
URL | Date | SRC |
---|---|---|
https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b | 2023-11-07 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Apache Search vendor "Apache" | Cxf Search vendor "Apache" for product "Cxf" | < 3.1.16 Search vendor "Apache" for product "Cxf" and version " < 3.1.16" | - |
Affected
| ||||||
Apache Search vendor "Apache" | Cxf Search vendor "Apache" for product "Cxf" | >= 3.2.0 < 3.2.5 Search vendor "Apache" for product "Cxf" and version " >= 3.2.0 < 3.2.5" | - |
Affected
| ||||||
Redhat Search vendor "Redhat" | Jboss Enterprise Application Platform Search vendor "Redhat" for product "Jboss Enterprise Application Platform" | 7.1.0 Search vendor "Redhat" for product "Jboss Enterprise Application Platform" and version "7.1.0" | - |
Affected
|