Improper Validation of Certificate with Host Mismatch Affecting Open this link in a new tab package, versions [,1.5.0)

  • Attack Complexity


  • Confidentiality


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


  • published

    8 May 2020

  • disclosed

    7 May 2020

  • credit

    Peter Stöckli

How to fix?

Upgrade to version 1.5.0 or higher.

Overview is a barebones WebSocket server and client implementation written in 100% Java.

Affected versions of this package are vulnerable to Improper Validation of Certificate with Host Mismatch. 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.