Information Exposure Affecting libssh2 package, versions >=0.0.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

    19 Nov 2019

  • disclosed

    9 Feb 2016

  • credit

    Andreas Schneide

How to fix?

There is no fixed version for libssh2.


libssh2 is a client-side C library implementing the SSH2 protocol.

Affected versions of this package are vulnerable to Information Exposure. During the SSHv2 handshake when libssh2 is to get a suitable value for 'group order' in the Diffle Hellman negotiation, it would pass in number of bytes to a function that expected number of bits. This would result in the library generating numbers using only an 8th the number of random bits than what were intended: 128 or 256 bits instead of 1023 or 2047.