Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2018-8039

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-8039
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:27 UTC · Revision 1

Source evidence

CVE-2018-8039

core-osv · Original source

Published 2 Jul 2018, 13:29 UTC

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.

osv:CVE-2018-8039
Complete source record
{
  "id": "be15dcce8f9a9b472bd61e675dd883bc8c8bdc25209d0b014e0b2f9412717856",
  "url": "https://osv.dev/vulnerability/CVE-2018-8039",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-8039",
    "summary": "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.",
    "evidence": "osv:CVE-2018-8039",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2018-8039",
      "aliases": [
        "CVE-2018-8039",
        "GHSA-jc7r-v6fg-2gpf"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apache/cxf",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "103932060cb426d1eea3fe28ae029b337c8ebd89"
                },
                {
                  "introduced": "f5ee3b786e22a081121eeebbba6d02fa9f4e7206"
                },
                {
                  "fixed": "bc2f01b3c76266b9dd138ba33c226b303e33713d"
                },
                {
                  "fixed": "fae6fabf9bd7647f5e9cb68897a7d72b545b741b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apache:cxf:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.1.16"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:apache:cxf:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.2.0"
                      },
                      {
                        "fixed": "3.2.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "fae6fabf9bd7647f5e9cb68897a7d72b545b741b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "cxf-3.2.4",
            "cxf-3.2.3",
            "cxf-3.1.15",
            "cxf-3.2.2",
            "cxf-3.2.1",
            "cxf-3.1.14",
            "cxf-3.2.0",
            "cxf-3.1.13",
            "cxf-3.1.12",
            "cxf-3.1.11",
            "cxf-3.1.10",
            "cxf-3.1.9",
            "cxf-3.1.8",
            "cxf-3.1.7",
            "cxf-3.1.6",
            "cxf-3.1.5",
            "cxf-3.1.4",
            "cxf-3.1.3",
            "cxf-3.1.2",
            "cxf-3.1.1",
            "cxf-3.1.0",
            "cxf-3.0.0",
            "cxf-3.0.0-milestone2",
            "cxf-2.7.2",
            "cxf-2.7.1",
            "cxf-2.7.0",
            "cxf-2.6.1",
            "cxf-2.6.0",
            "cxf-2.5.1",
            "cxf-2.5.0",
            "cxf-2.4.0",
            "cxf-2.3.0",
            "cxf-2.2.2",
            "cxf-2.2.1",
            "cxf-2.2",
            "cxf-2.1.2",
            "cxf-2.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-8039.json",
            "vanir_signatures": [
              {
                "id": "CVE-2018-8039-1e5f5859",
                "digest": {
                  "length": 180,
                  "function_hash": "84945857156092962710129030850930809493"
                },
                "source": "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b",
                "target": {
                  "file": "rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java",
                  "function": "invoke"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2018-8039-30fadbcc",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "213913390259491039131549401267186375028",
                    "335391923332883398951730313256478179123"
                  ]
                },
                "source": "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b",
                "target": {
                  "file": "rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2018-8039-3480313c",
                "digest": {
                  "length": 2501,
                  "function_hash": "303838424797550863392538980852074412340"
                },
                "source": "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b",
                "target": {
                  "file": "rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java",
                  "function": "decorateWithTLS"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2018-8039-8b78643f",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "188461621133119421001549968880047904997",
                    "117411491607624719512441840354788300152",
                    "329208879483314357076888436045139267436",
                    "238150500670111072594087164928134947741"
                  ]
                },
                "source": "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b",
                "target": {
                  "file": "rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2018-8039-d69fdc8d",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "88210350243782250675121449946846566935",
                    "324313358388823458397964355427546229776",
                    "177231698756307637688848807439312338449"
                  ]
                },
                "source": "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b",
                "target": {
                  "file": "rt/transports/http/src/main/java/org/apache/cxf/transport/https/httpclient/DefaultHostnameVerifier.java"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:35:48Z"
          }
        }
      ],
      "modified": "2026-10-20T13:35:48.991855117Z",
      "provider": "osv",
      "references": [
        "https://lists.apache.org/thread.html/1f8ff31df204ad0374ab26ad333169e0387a5e7ec92422f337431866%40%3Cdev.cxf.apache.org%3E",
        "https://lists.apache.org/thread.html/r36e44ffc1a9b365327df62cdfaabe85b9a5637de102cea07d79b2dbf%40%3Ccommits.cxf.apache.org%3E",
        "https://lists.apache.org/thread.html/rc774278135816e7afc943dc9fc78eb0764f2c84a2b96470a0187315c%40%3Ccommits.cxf.apache.org%3E",
        "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%40%3Ccommits.cxf.apache.org%3E",
        "https://www.oracle.com/security-alerts/cpuapr2020.html",
        "https://www.oracle.com/security-alerts/cpujan2020.html",
        "https://access.redhat.com/errata/RHSA-2018:2276",
        "https://access.redhat.com/errata/RHSA-2018:2277",
        "https://access.redhat.com/errata/RHSA-2018:2279",
        "https://access.redhat.com/errata/RHSA-2018:2423",
        "https://access.redhat.com/errata/RHSA-2018:2424",
        "https://access.redhat.com/errata/RHSA-2018:2425",
        "https://access.redhat.com/errata/RHSA-2018:2428",
        "https://access.redhat.com/errata/RHSA-2018:2643",
        "https://access.redhat.com/errata/RHSA-2018:3768",
        "https://access.redhat.com/errata/RHSA-2018:3817",
        "https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html",
        "https://github.com/apache/cxf/commit/fae6fabf9bd7647f5e9cb68897a7d72b545b741b"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:redhat:jboss_enterprise_application_platform:7.1.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:jboss_enterprise_application_platform",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.1.0"
                  },
                  {
                    "last_affected": "7.1.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2018-8039",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 387859,
  "published_at": "2018-07-02T13:29:00.413+00:00"
}