{"id":"CVE-2016-0739","aliases":["DEBIAN-CVE-2016-0739","DLA-425-1","DSA-3488-1","EUVD-2016-0763","GHSA-v7q8-7g48-2272","MGASA-2016-0082","RHSA-2016:0566","SUSE-SU-2016:0622-1","SUSE-SU-2016:0625-1","UBUNTU-CVE-2016-0739","USN-2912-1"],"status":"published","title":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman...","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","severity":{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.02431,"percentile":0.84352,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-200"],"published":"2016-02-23T00:00:00Z","modified":"2026-10-24T10:30:55Z","fixes":[{"ecosystem":"Debian:12","package":"libssh","fixed_in":["0.6.3-4.3"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"libssh","fixed_in":["0.6.3-4.3"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"libssh","fixed_in":["0.6.3-4.3"],"sources":["osv"]},{"ecosystem":"Debian:6.0","package":"libssh","fixed_in":["0.4.5-3+squeeze3"],"sources":["osv"]},{"ecosystem":"Debian:7","package":"libssh","fixed_in":["0.5.4-1+deb7u3"],"sources":["osv"]},{"ecosystem":"Debian:8","package":"libssh","fixed_in":["0.6.3-4+deb8u2"],"sources":["osv"]},{"ecosystem":"Mageia:5","package":"libssh","fixed_in":["0.6.5-1.1.mga5"],"sources":["osv"]},{"ecosystem":"Red Hat:rhel_extras_other:7","package":"libssh","fixed_in":["0:0.7.1-2.el7"],"sources":["osv"]},{"ecosystem":"Red Hat:rhel_extras_other:7","package":"libssh-debuginfo","fixed_in":["0:0.7.1-2.el7"],"sources":["osv"]},{"ecosystem":"Red Hat:rhel_extras_other:7","package":"libssh-devel","fixed_in":["0:0.7.1-2.el7"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 11 SP4","package":"libssh","fixed_in":["0.2-5.22.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Desktop 11 SP4","package":"libssh","fixed_in":["0.2-5.22.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Desktop 12","package":"libssh","fixed_in":["0.6.3-11.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Desktop 12 SP1","package":"libssh","fixed_in":["0.6.3-11.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12","package":"libssh","fixed_in":["0.6.3-11.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP1","package":"libssh","fixed_in":["0.6.3-11.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Workstation Extension 12","package":"libssh","fixed_in":["0.6.3-11.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Workstation Extension 12 SP1","package":"libssh","fixed_in":["0.6.3-11.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:14.04:LTS","package":"libssh","fixed_in":["0.6.1-0ubuntu3.3"],"sources":["osv"]},{"ecosystem":"Ubuntu:16.04:LTS","package":"libssh","fixed_in":["0.6.3-4.2ubuntu1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-4.3"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-4.3"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-4.3"}]}]},{"source":"osv","ecosystem":"Debian:6.0","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.5-3+squeeze3"}]}],"versions":["0.4.5-3","0.4.5-3+squeeze1","0.4.5-3+squeeze2"]},{"source":"osv","ecosystem":"Debian:7","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.4-1+deb7u3"}]}],"versions":["0.5.4-1","0.5.4-1+deb7u1","0.5.4-1+deb7u2"]},{"source":"osv","ecosystem":"Debian:8","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-4+deb8u2"}]}],"versions":["0.6.3-4","0.6.3-4+deb8u1"]},{"source":"osv","ecosystem":"Mageia:5","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.5-1.1.mga5"}]}]},{"source":"osv","ecosystem":"Red Hat:rhel_extras_other:7","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.7.1-2.el7"}]}]},{"source":"osv","ecosystem":"Red Hat:rhel_extras_other:7","package":"libssh-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.7.1-2.el7"}]}]},{"source":"osv","ecosystem":"Red Hat:rhel_extras_other:7","package":"libssh-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.7.1-2.el7"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Software Development Kit 11 SP4","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2-5.22.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Desktop 11 SP4","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2-5.22.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Desktop 12","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-11.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Desktop 12 SP1","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-11.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Software Development Kit 12","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-11.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP1","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-11.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Workstation Extension 12","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-11.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Workstation Extension 12 SP1","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-11.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.1-0ubuntu3.3"}]}],"versions":["0.5.4-1","0.6.1-0ubuntu2","0.6.1-0ubuntu3","0.6.1-0ubuntu3.1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.3-4.2ubuntu1"}]}],"versions":["0.6.3-3ubuntu3","0.6.3-4.1","0.6.3-4.2"]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"libssh","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.1-0ubuntu3.3"}]}],"versions":["0.5.4-1","0.6.1-0ubuntu2","0.6.1-0ubuntu3","0.6.1-0ubuntu3.1"],"bundled":2}],"products":[{"vendor":"canonical","product":"ubuntu_linux"},{"vendor":"debian","product":"debian_linux"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"libssh","product":"libssh"},{"vendor":"redhat","product":"enterprise_linux"}],"references":[{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2016-February/178058.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"http://www.ubuntu.com/usn/USN-2912-1","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred","advisory"]},{"url":"https://www.libssh.org/security/advisories/CVE-2016-0739.txt","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","article"]},{"url":"https://puppet.com/security/cve/CVE-2016-0739","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2016-March/178822.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://security.gentoo.org/glsa/201606-12","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Third Party Advisory","advisory"]},{"url":"http://www.debian.org/security/2016/dsa-3488","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","advisory"]},{"url":"http://rhn.redhat.com/errata/RHSA-2016-0566.html","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","advisory"]},{"url":"https://www.libssh.org/2016/02/23/libssh-0-7-3-security-and-bugfix-release/","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web","report"]},{"url":"http://lists.opensuse.org/opensuse-updates/2016-03/msg00111.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-0739","tags":["advisory"]},{"url":"https://www.libssh.org/2016/02/23/libssh-0-7-3-security-and-bugfix-release"},{"url":"https://github.com/advisories/GHSA-v7q8-7g48-2272"},{"url":"https://security-tracker.debian.org/tracker/CVE-2016-0739","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2016-0082.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=17809","tags":["report"]},{"url":"https://access.redhat.com/errata/RHSA-2016:0566","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1305971","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0566.json","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2016-0739","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2016-0739","tags":["advisory","report"]},{"url":"https://www.suse.com/support/update/announcement/2016/suse-su-20160622-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/965875","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2016-0739","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2016/suse-su-20160625-1/","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2016-0739","tags":["report"]},{"url":"https://www.libssh2.org/adv_20160223.html","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-2912-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2015-3146","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2016-0739","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2016-04-13T17:00:00Z","modified":"2024-08-05T22:30:04.158Z","updated_at":"2026-11-02T14:33:37.12286Z"}],"euvd":[{"id":"EUVD-2016-0763","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2016-04-13T17:00:00Z","modified":"2024-08-05T22:30:04Z","updated_at":"2026-11-03T02:23:00.426765Z"}],"ghsa":[{"id":"GHSA-v7q8-7g48-2272","title":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman...","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2022-05-17T00:16:49Z","modified":"2025-04-12T12:59:40Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T15:01:26.909163Z"}],"nvd":[{"id":"CVE-2016-0739","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2016-04-13T17:59:08.413Z","modified":"2026-06-17T00:38:07.81Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:03:23.795791Z"}],"osv":[{"id":"CVE-2016-0739","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2016-04-13T17:59:08.413Z","modified":"2026-10-24T10:30:55.736500004Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:01.531338Z"},{"id":"DEBIAN-CVE-2016-0739","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2016-04-13T17:59:08.413Z","modified":"2026-09-22T07:00:07.169845333Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:27.323751Z"},{"id":"UBUNTU-CVE-2016-0739","description":"libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 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.\"","status":"published","published":"2016-02-23T15:00:00Z","modified":"2026-04-22T10:26:58.87758Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:54:11.100633Z"},{"id":"DLA-425-1","title":"libssh - security update","status":"published","published":"2016-02-23T00:00:00Z","modified":"2026-03-09T02:10:46.962062Z","updated_at":"2026-11-02T15:46:12.7027Z"},{"id":"DSA-3488-1","title":"libssh - security update","status":"published","published":"2016-02-23T00:00:00Z","modified":"2026-03-09T01:17:57.545786Z","updated_at":"2026-11-02T15:46:16.199525Z"},{"id":"MGASA-2016-0082","title":"Updated libssh packages fix CVE-2016-0739","description":"Updated libssh packages fix security vulnerability:\n\nlibssh versions 0.1 and above have a bits/bytes confusion bug and generate an\nabnormally short ephemeral secret for the diffie-hellman-group1 and\ndiffie-hellman-group14 key exchange methods. The resulting secret is 128 bits\nlong, instead of the recommended sizes of 1024 and 2048 bits respectively.\nBoth client and server are vulnerable, pre-authentication. This\nvulnerability could be exploited by an eavesdropper with enough resources to\ndecrypt or intercept SSH sessions (CVE-2016-0739).\n","status":"published","published":"2016-02-24T17:06:40Z","modified":"2026-04-16T06:26:22.431689327Z","updated_at":"2026-11-02T15:49:39.792687Z"},{"id":"RHSA-2016:0566","title":"Red Hat Security Advisory: libssh security update","status":"published","published":"2024-09-13T12:28:18Z","modified":"2025-11-22T11:09:10Z","updated_at":"2026-11-02T15:53:03.734507Z"},{"id":"SUSE-SU-2016:0622-1","title":"Security update for libssh","description":"\nThis update for libssh fixes the following issues: \n\nCVE-2016-0739: Fix Weakness in diffie-hellman secret key generation. (bsc#965875)\n","status":"published","published":"2016-03-01T13:49:50Z","modified":"2026-02-04T02:26:22.372707Z","updated_at":"2026-11-02T15:53:43.030986Z"},{"id":"SUSE-SU-2016:0625-1","title":"Security update for libssh","description":"\nThis update for libssh fixes the following issues: \n\n- CVE-2016-0739: Fix Weakness in diffie-hellman secret key generation. (bsc#965875)\n","status":"published","published":"2016-03-01T15:49:06Z","modified":"2026-02-04T03:00:32.279626Z","updated_at":"2026-11-02T15:53:43.030986Z"},{"id":"USN-2912-1","title":"libssh vulnerabilities","description":"Mariusz Ziulek discovered that libssh incorrectly handled certain packets.\nA remote attacker could possibly use this issue to cause libssh to crash,\nresulting in a denial of service.\n(CVE-2015-3146)\n\nAris Adamantiadis discovered that libssh incorrectly generated ephemeral\nsecret keys of 128 bits instead of the recommended 1024 or 2048 bits when\nusing the diffie-hellman-group1 and diffie-hellman-group14 methods. If a\nremote attacker were able to perform a machine-in-the-middle attack, this flaw\ncould be exploited to view sensitive information. (CVE-2016-0739)\n","status":"published","published":"2016-02-23T14:14:59Z","modified":"2026-04-22T09:21:53.96988Z","updated_at":"2026-11-02T16:58:10.303275Z"}]}}
