CVE-2020-11050: Java WebSocket Improper Validation Of Certificate With Vulnerability

HIGH
Advisory Identifier: GHSA-gw55-jm4h-x339
CVSS 9.0
CWE-295 CWE-297
Published
Advisory Summary

CVE-2020-11050 is a HIGH (CVSS 9.0) improper validation of certificate with vulnerability (CWE-295: Improper Certificate Validation) affecting Java WebSocket libraries in the Maven ecosystem. The issue involves improper validation of certificate with host mismatch in java-websocket. Remediation is available by upgrading affected packages to version 1.5.0.

CVE-2020-11050 at a Glance

CVE Identifier CVE-2020-11050
GHSA Identifier GHSA-gw55-jm4h-x339
Severity HIGH
CVSS v3.1 Base Score 9.0
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Java WebSocket
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-11050

To remediate this vulnerability, upgrade all affected Java WebSocket dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.java-websocket:Java-WebSocket fixed: 1.5.0
<dependency>
    <groupId>org.java-websocket</groupId>
    <artifactId>Java-WebSocket</artifactId>
    <version>1.5.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.java-websocket

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-11050, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.java-websocket

Analyze the terminal output to locate any version of Java WebSocket in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.java-websocket 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-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Java WebSocket, 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

The Java-WebSocket Client does not perform hostname verification. - This means that SSL certificates of other hosts are accepted as long as they are trusted. To exploit this vulnerability an attacker has to perform a man-in-the-middle (MITM) attack between a Java application using the Java-WebSocket Client and an WebSocket server it's connecting to. - TLS normally protects users and systems against MITM attacks, it cannot if certificates from other trusted hosts are accepted by the client. For more information see: CWE-297: Improper Validation of Certificate with Host Mismatch - https://cwe.mitre.org/data/definitions/297.html ## Important note The OWASP Dependency-Check (https://jeremylong.github.io/DependencyCheck/index.html) may report that a dependency of your project is affected by this security vulnerability, but you don't use this lib. This is caused by the fuzzy search in the OWASP implementation. Check out this issue (https://github.com/TooTallNate/Java-WebSocket/issues/1019#issuecomment-628507934) for more information and a way to suppress the warning.

CVE-2020-11050 Affected Java WebSocket Versions

1 component(s)
Fixed Versions:
1.5.0
Product / Package Ecosystem Affected Versions Fixed Version
org.java-websocket:Java-WebSocket
Maven
< 1.5.0
1.5.0

References

Frequently Asked Questions

What is CVE-2020-11050?
CVE-2020-11050 is a security vulnerability in Java WebSocket involving Improper Validation of Certificate with Host Mismatch in Java-WebSocket under CWE-295: Improper Certificate Validation.
Which Java WebSocket versions are affected?
Affected versions include releases prior to 1.5.0 across affected packages: org.java-websocket:Java-WebSocket.
What version fixes CVE-2020-11050?
Upgrading to 1.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Java-WebSocket affected?
Yes, org.java-websocket:Java-WebSocket is affected in releases prior to 1.5.0. Upgrade your dependency to 1.5.0 or later.
What is the CVSS score of CVE-2020-11050?
CVE-2020-11050 has a CVSS v3.1 base score of 9.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2020-11050?
CVE-2020-11050 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check Maven dependencies for CVE-2020-11050?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.java-websocket'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gw55-jm4h-x339",
  "modified" : "2021-10-08T19:56:49Z",
  "published" : "2020-05-08T18:54:39Z",
  "aliases" : [ "CVE-2020-11050" ],
  "summary" : "Improper Validation of Certificate with Host Mismatch in Java-WebSocket",
  "details" : "The Java-WebSocket Client does not perform hostname verification.\n\n - This means that SSL certificates of other hosts are accepted as long as they are trusted. To exploit this vulnerability an attacker has to perform a man-in-the-middle (MITM) attack between a Java application using the Java-WebSocket Client and an WebSocket server it's connecting to.\n - TLS normally protects users and systems against MITM attacks, it cannot if certificates from other trusted hosts are accepted by the client.\n\nFor more information see: CWE-297: Improper Validation of Certificate with Host Mismatch - https://cwe.mitre.org/data/definitions/297.html\n\n## Important note\n\nThe OWASP Dependency-Check (https://jeremylong.github.io/DependencyCheck/index.html) may report that a dependency of your project is affected by this security vulnerability, but you don't use this lib.\nThis is caused by the fuzzy search in the OWASP implementation.\nCheck out this issue (https://github.com/TooTallNate/Java-WebSocket/issues/1019#issuecomment-628507934) for more information and a way to suppress the warning.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.java-websocket:Java-WebSocket"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.4.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/TooTallNate/Java-WebSocket/security/advisories/GHSA-gw55-jm4h-x339"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-11050"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/TooTallNate/Java-WebSocket"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295", "CWE-297" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-05-08T18:54:10Z",
    "nvd_published_at" : "2020-05-07T21:15:00Z"
  }
}