Man-in-the-Middle (MitM) Affecting org.apache.cxf:cxf-rt-transports-http package, versions [,3.1.16) [3.2.0,3.2.6)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.69% (81st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JAVA-ORGAPACHECXF-31691
  • published 4 Jul 2018
  • disclosed 2 Jul 2018
  • credit Unknown

How to fix?

Upgrade org.apache.cxf:cxf-rt-transports-http to version 3.1.16, 3.2.6 or higher.

Overview

org.apache.cxf:cxf-rt-transports-http is an open source services framework.

Affected versions of this package are vulnerable to Man-in-the-Middle (MitM). When configuring CXF to use the com.sun.net.ssl implementation via:

System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");

It attempts to make the HostnameVerifier work with the old com.sun.net.ssl.HostnameVerifier interface, but the default HostnameVerifier implementation in CXF does not implement the method in this interface which caused an exception is thrown. This exception caught in the reflection code and not properly propagated. Thus the TLS hostname verification error will not be thrown, leaving a CXF client subject to man-in-the-middle attacks.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.1 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High