CVE-2020-11050: Java WebSocket Improper Validation Of Certificate With Vulnerability
HIGHCVE-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
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).
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.
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
<version>1.5.0</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.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
CVE-2020-11050 Affected Java WebSocket Versions
1 component(s)| 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?
Which Java WebSocket versions are affected?
What version fixes CVE-2020-11050?
Is Java-WebSocket affected?
What is the CVSS score of CVE-2020-11050?
What CWE is associated with CVE-2020-11050?
How can I check Maven dependencies for CVE-2020-11050?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}