CVE-2018-8039
Apache CXF TLS hostname verification does not work correctly with com.sun.net.ssl.*
Also known as GHSA-jc7r-v6fg-2gpf
Mitigation
- Upgrade org.apache.cxf:cxf-rt-transports-http to one of 3.2.5, 3.1.16 (or later in the same release line).
- Upgrade org.apache.cxf:apache-cxf to one of 3.2.5, 3.1.16 (or later in the same release line).
Who should check
- Projects that depend on Maven package org.apache.cxf:cxf-rt-transports-http (>= 3.2.0, < 3.2.5)
- Projects that depend on Maven package org.apache.cxf:apache-cxf (>= 3.2.0, < 3.2.5)
- Anyone running Apache Software Foundation Apache CXF prior to 3.1.16; 3.2.x prior to 3.2.5
Vulnerability facts
- Affected
- org.apache.cxf:cxf-rt-transports-http >= 3.2.0, < 3.2.5; org.apache.cxf:apache-cxf >= 3.2.0, < 3.2.5
- Fixed in
- 3.2.5, 3.1.16
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.1 (v3.0, NVD)CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 8.21% chance of exploitation in 30 days (percentile 96, 2026-11-26)
- CWE
- CWE-755
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.apache.cxf:cxf-rt-transports-http | >= 3.2.0, < 3.2.5 | 3.2.5, 3.1.16 | osv |
| Maven org.apache.cxf:apache-cxf | >= 3.2.0, < 3.2.5 | 3.2.5, 3.1.16 | osv |
| Apache Software Foundation Apache CXF | prior to 3.1.16; 3.2.x prior to 3.2.5 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2018-8039. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2018-8039.md Affected: org.apache.cxf:cxf-rt-transports-http >= 3.2.0, < 3.2.5; org.apache.cxf:apache-cxf >= 3.2.0, < 3.2.5 Fixed in: 3.2.5, 3.1.16 Steps: 1. Search this machine and project for org.apache.cxf:cxf-rt-transports-http (Maven), org.apache.cxf:apache-cxf (Maven), Apache Software Foundation Apache CXF: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://access.redhat.com/errata/RHSA-2018:2428
- https://access.redhat.com/errata/RHSA-2018:3817
- https://access.redhat.com/errata/RHSA-2018:2643
- https://access.redhat.com/errata/RHSA-2018:2279
- https://access.redhat.com/errata/RHSA-2018:2424
- https://access.redhat.com/errata/RHSA-2018:2276
- https://access.redhat.com/errata/RHSA-2018:2423
- https://access.redhat.com/errata/RHSA-2018:2425
- https://access.redhat.com/errata/RHSA-2018:2277
- http://cxf.apache.org/security-advisories.data/CVE-2018-8039.txt.asc?version=1&modificationDate=1530184663000&api=v2
- https://access.redhat.com/errata/RHSA-2018:3768
- https://nvd.nist.gov/vuln/detail/CVE-2018-8039
- https://github.com/advisories/GHSA-jc7r-v6fg-2gpf
Patches
Other
- https://lists.apache.org/thread.html/1f8ff31df204ad0374ab26ad333169e0387a5e7ec92422f337431866%40%3Cdev.cxf.apache.org%3E
- http://www.securityfocus.com/bid/106357
- http://www.securitytracker.com/id/1041199
- https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html
- https://www.oracle.com/security-alerts/cpujan2020.html
- https://lists.apache.org/thread.html/rc774278135816e7afc943dc9fc78eb0764f2c84a2b96470a0187315c%40%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/r36e44ffc1a9b365327df62cdfaabe85b9a5637de102cea07d79b2dbf%40%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rff42cfa5e7d75b7c1af0e37589140a8f1999e578a75738740b244bd4%40%3Ccommits.cxf.apache.org%3E
- https://www.oracle.com/security-alerts/cpuapr2020.html
- https://lists.apache.org/thread.html/rd49aabd984ed540c8ff7916d4d79405f3fa311d2fdbcf9ed307839a6%40%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rec7160382badd3ef4ad017a22f64a266c7188b9ba71394f0d321e2d4%40%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rfb87e0bf3995e7d560afeed750fac9329ff5f1ad49da365129b7f89e%40%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rff42cfa5e7d75b7c1af0e37589140a8f1999e578a75738740b244bd4@%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rfb87e0bf3995e7d560afeed750fac9329ff5f1ad49da365129b7f89e@%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rec7160382badd3ef4ad017a22f64a266c7188b9ba71394f0d321e2d4@%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rd49aabd984ed540c8ff7916d4d79405f3fa311d2fdbcf9ed307839a6@%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/rc774278135816e7afc943dc9fc78eb0764f2c84a2b96470a0187315c@%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/r36e44ffc1a9b365327df62cdfaabe85b9a5637de102cea07d79b2dbf@%3Ccommits.cxf.apache.org%3E
- https://lists.apache.org/thread.html/1f8ff31df204ad0374ab26ad333169e0387a5e7ec92422f337431866@%3Cdev.cxf.apache.org%3E
- https://github.com/apache/cxf
- https://cxf.apache.org/security-advisories.data/CVE-2018-8039.txt.asc
FAQ
Is CVE-2018-8039 being exploited?
There is no confirmed exploitation: CVE-2018-8039 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 8.21% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2018-8039?
High: CVSS 8.1 (v3.0, scored by NVD). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2018-8039?
org.apache.cxf:cxf-rt-transports-http >= 3.2.0, < 3.2.5; org.apache.cxf:apache-cxf >= 3.2.0, < 3.2.5.
Is there a fix for CVE-2018-8039?
Yes. Fixed in 3.2.5, 3.1.16. Upgrade org.apache.cxf:cxf-rt-transports-http to one of 3.2.5, 3.1.16 (or later in the same release line). Upgrade org.apache.cxf:apache-cxf to one of 3.2.5, 3.1.16 (or later in the same release line).
How do I check if I'm affected by CVE-2018-8039?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.