Vulnerabilities in pkg:maven/org.apache.cxf/apache-cxf
PACKAGECVE-2018-8039 is a HIGH (CVSS 8.1) apache cxf tls hostname verification vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Cxf rt transports http libraries in the Maven ecosystem. The issue involves apache cxf tls hostname verification does not work correctly with com.sun.net.ssl.*. Remediation is available by upgrading affected packages to version 3.2.5, 3.1.16.
pkg:maven/org.apache.cxf/apache-cxf
Vulnerability advisories affecting package pkg:maven/org.apache.cxf/apache-cxf. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-jc7r-v6fg-2gpf | CVE-2018-8039 | HIGH | Apache CXF TLS hostname verification does not work correctly with com.sun.net.ssl.* |
| GHSA-7q4h-pj78-j7vg | CVE-2021-22696 | HIGH | Authorization service vulnerable to DDos attacks in Apache CFX |
| GHSA-g23v-p5jq-jvh4 | CVE-2021-30468 | HIGH | Infinite loop in Apache CFX |
| GHSA-f93p-f762-vr53 | CVE-2019-17573 | MODERATE | Reflected Cross-Site Scripting in Apache CXF |
| GHSA-42f2-f9vc-6365 | CVE-2019-12423 | HIGH | Private key leak in Apache CXF |
| GHSA-58p8-9g59-q2hr | CVE-2019-12406 | MODERATE | Potential DOS attack due to unrestricted attachment count in messages |
| GHSA-64x2-gq24-75pv | CVE-2020-13954 | MODERATE | Cross-site scripting in Apache CXF |
CVE-2018-8039 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2018-8039
To remediate this vulnerability, upgrade all affected Cxf rt transports http dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.16</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>apache-cxf</artifactId>
<version>3.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>apache-cxf</artifactId>
<version>3.1.16</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.cxf
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2018-8039, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.cxf
Analyze the terminal output to locate any version of Cxf rt transports http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.cxf command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Cxf rt transports http, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2018-8039 Affected Cxf rt transports http Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.cxf:cxf-rt-transports-http
|
Maven |
≥ 3.2.0
< 3.2.5
|
3.2.5
|
|
org.apache.cxf:cxf-rt-transports-http
|
Maven |
< 3.1.16
|
3.1.16
|
|
org.apache.cxf:apache-cxf
|
Maven |
≥ 3.2.0
< 3.2.5
|
3.2.5
|
|
org.apache.cxf:apache-cxf
|
Maven |
< 3.1.16
|
3.1.16
|
References
Frequently Asked Questions
What is CVE-2018-8039?
Which Cxf rt transports http versions are affected?
What version fixes CVE-2018-8039?
Is cxf-rt-transports-http affected?
Is apache-cxf affected?
What is the CVSS score of CVE-2018-8039?
What CWE is associated with CVE-2018-8039?
How can I check Maven dependencies for CVE-2018-8039?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jc7r-v6fg-2gpf",
"modified" : "2025-05-29T17:42:39Z",
"published" : "2018-10-19T16:40:01Z",
"aliases" : [ "CVE-2018-8039" ],
"summary" : "Apache CXF TLS hostname verification does not work correctly with com.sun.net.ssl.*",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:cxf-rt-transports-http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"fixed" : "3.2.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:cxf-rt-transports-http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:apache-cxf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"fixed" : "3.2.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.cxf:apache-cxf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.16"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-8039"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/cxf/commit/8ed6208f987ff72e4c4d2cf8a6b1ec9b27575d4"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujan2020.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rff42cfa5e7d75b7c1af0e37589140a8f1999e578a75738740b244bd4@%3Ccommits.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rfb87e0bf3995e7d560afeed750fac9329ff5f1ad49da365129b7f89e@%3Ccommits.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rec7160382badd3ef4ad017a22f64a266c7188b9ba71394f0d321e2d4@%3Ccommits.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rd49aabd984ed540c8ff7916d4d79405f3fa311d2fdbcf9ed307839a6@%3Ccommits.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rc774278135816e7afc943dc9fc78eb0764f2c84a2b96470a0187315c@%3Ccommits.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r36e44ffc1a9b365327df62cdfaabe85b9a5637de102cea07d79b2dbf@%3Ccommits.cxf.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/1f8ff31df204ad0374ab26ad333169e0387a5e7ec92422f337431866@%3Cdev.cxf.apache.org%3E"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/cxf"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-jc7r-v6fg-2gpf"
}, {
"type" : "WEB",
"url" : "https://cxf.apache.org/security-advisories.data/CVE-2018-8039.txt.asc"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3817"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3768"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2643"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2428"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2425"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2424"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2423"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2279"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2277"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2276"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/106357"
}, {
"type" : "WEB",
"url" : "http://www.securitytracker.com/id/1041199"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-755" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:43:00Z",
"nvd_published_at" : "2018-07-02T13:29:00Z"
}
}