{"id":"UBUNTU-CVE-2016-0787","details":"The diffie_hellman_sha256 function in kex.c in libssh2 before 1.7.0 improperly truncates secrets to 128 or 256 bits, which makes it easier for man-in-the-middle attackers to decrypt or intercept SSH sessions via unspecified vectors, aka a \"bits/bytes confusion bug.\"","modified":"2025-09-08T16:43:35Z","published":"2016-04-13T17:59:00Z","upstream":["CVE-2016-0787"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2016-0787"},{"type":"REPORT","url":"https://www.libssh2.org/adv_20160223.html"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2016-0787"}],"affected":[{"package":{"name":"libssh2","ecosystem":"Ubuntu:14.04:LTS","purl":"pkg:deb/ubuntu/libssh2@1.4.3-2ubuntu0.1?arch=source&distro=trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.3-2ubuntu0.1"}]}],"versions":["1.4.3-1","1.4.3-2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libssh2-1","binary_version":"1.4.3-2ubuntu0.1"},{"binary_name":"libssh2-1-dev","binary_version":"1.4.3-2ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2016/UBUNTU-CVE-2016-0787.json"}},{"package":{"name":"libssh2","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/libssh2@1.5.0-2ubuntu0.1?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.0-2ubuntu0.1"}]}],"versions":["1.5.0-2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libssh2-1","binary_version":"1.5.0-2ubuntu0.1"},{"binary_name":"libssh2-1-dev","binary_version":"1.5.0-2ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2016/UBUNTU-CVE-2016-0787.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"},{"type":"Ubuntu","score":"medium"}]}