Skip to content
OpenAdvisories
High · 8.1 Public exploit CVE-2018-8039 EUVD-2018-0630GHSA-jc7r-v6fg-2gpf

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

Published Jul 2, 2018 · Updated Sep 17, 2024 · Assigned by apache

Description

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 products

VendorProductAffectedFixed
Apache Software Foundation Apache CXF prior to 3.1.16, 3.2.x prior to 3.2.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
RHEL 7 rhvm-appliance 2:4.2-20180828.0.el7 RHSA-2018:2643
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat JBoss EAP 7 eap7-activemq-artemis +15 1.5.5.013-1.redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-apache-cxf +3 3.1.16-1.redhat_1.1.ep7.el6 RHSA-2018:2276
Red Hat JBoss EAP 7 eap7-bouncycastle +3 1.56.0-5.redhat_3.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-guava +1 25.0.0-1.redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-hibernate +5 5.1.15-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-ironjacamar +8 1.4.10-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-jberet +1 1.2.6-2.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-jboss-ejb-client 4.0.11-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-jboss-remoting 5.0.8-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-jboss-server-migration +18 1.0.6-4.Final_redhat_4.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-mod_cluster 1.3.10-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-narayana +10 5.5.32-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-picketlink-api +9 2.5.5-13.SP12_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-resteasy +16 3.0.26-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-undertow 1.4.18-7.SP8_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-wildfly +1 7.1.3-4.GA_redhat_3.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423, RHSA-2018:2276
Red Hat JBoss EAP 7 eap7-wildfly-javadocs 7.1.4-2.GA_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-wildfly-naming-client 1.0.9-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-wildfly-openssl-linux 1.0.6-14.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-wildfly-transaction-client 1.0.4-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-wildfly-web-console-eap 2.9.18-1.Final_redhat_1.1.ep7.el6 RHSA-2018:2424, RHSA-2018:2423
Red Hat JBoss EAP 7 eap7-wss4j +6 2.1.12-1.redhat_1.1.ep7.el6 RHSA-2018:2276
Red Hat JBoss EAP 7 eap7-xml-security 2.0.10-1.redhat_1.1.ep7.el6 RHSA-2018:2276

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.apache.cxf:apache-cxf >= 3.2.0, < 3.2.5 3.2.5 GHSA-jc7r-v6fg-2gpf
Maven org.apache.cxf:apache-cxf < 3.1.16 3.1.16 GHSA-jc7r-v6fg-2gpf
Maven org.apache.cxf:cxf-rt-transports-http >= 3.2.0, < 3.2.5 3.2.5 GHSA-jc7r-v6fg-2gpf
Maven org.apache.cxf:cxf-rt-transports-http < 3.1.16 3.1.16 GHSA-jc7r-v6fg-2gpf

Advisories 6

References