CVE-2016-0739
libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman...
CVE-2016-0739 is a medium vulnerability (CVSS 5.9) in Libssh, published February 23, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.43%, the 84th percentile. Fixed in libssh 0.6.3-4.3.
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."
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.9
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."
- Record
CVE-2016-0739- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:P/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
CVE List No score
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."
- Record
CVE-2016-0739- Updated
- 2026-11-02
EUVDEUVD-2016-0763 No score
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."
- Record
EUVD-2016-0763- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-v7q8-7g48-2272
5.9
libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman...
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."
- Record
GHSA-v7q8-7g48-2272- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
OSV
5.9
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."
- Record
CVE-2016-0739- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-0739
5.9
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."
- Record
DEBIAN-CVE-2016-0739- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 5 moreShow less
OSVUBUNTU-CVE-2016-0739
5.9
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."
- Record
UBUNTU-CVE-2016-0739- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVMGASA-2016-0082 No score
Updated libssh packages fix CVE-2016-0739
Updated libssh packages fix security vulnerability:
libssh versions 0.1 and above have a bits/bytes confusion bug and generate an abnormally short ephemeral secret for the diffie-hellman-group1 and diffie-hellman-group14 key exchange methods. The resulting secret is 128 bits long, instead of the recommended sizes of 1024 and 2048 bits respectively. Both client and server are vulnerable, pre-authentication. This vulnerability could be exploited by an eavesdropper with enough resources to decrypt or intercept SSH sessions (CVE-2016-0739).
- Record
MGASA-2016-0082- Updated
- 2026-11-02
OSVSUSE-SU-2016:0622-1 No score
Security update for libssh
This update for libssh fixes the following issues:
CVE-2016-0739: Fix Weakness in diffie-hellman secret key generation. (bsc#965875)
- Record
SUSE-SU-2016:0622-1- Updated
- 2026-11-02
OSVSUSE-SU-2016:0625-1 No score
Security update for libssh
This update for libssh fixes the following issues:
- CVE-2016-0739: Fix Weakness in diffie-hellman secret key generation. (bsc#965875)
- Record
SUSE-SU-2016:0625-1- Updated
- 2026-11-02
OSVUSN-2912-1 No score
libssh vulnerabilities
Mariusz Ziulek discovered that libssh incorrectly handled certain packets. A remote attacker could possibly use this issue to cause libssh to crash, resulting in a denial of service. (CVE-2015-3146)
Aris Adamantiadis discovered that libssh incorrectly generated ephemeral secret keys of 128 bits instead of the recommended 1024 or 2048 bits when using the diffie-hellman-group1 and diffie-hellman-group14 methods. If a remote attacker were able to perform a machine-in-the-middle attack, this flaw could be exploited to view sensitive information. (CVE-2016-0739)
- Record
USN-2912-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libsshDebian:12 |
before 0.6.3-4.3 | 0.6.3-4.3 |
libsshDebian:13 |
before 0.6.3-4.3 | 0.6.3-4.3 |
libsshDebian:14 |
before 0.6.3-4.3 | 0.6.3-4.3 |
libsshDebian:6.0 |
before 0.4.5-3+squeeze3, plus listed versions 0.4.5-30.4.5-3+squeeze10.4.5-3+squeeze2 |
0.4.5-3+squeeze3 |
libsshDebian:7 |
before 0.5.4-1+deb7u3, plus listed versions 0.5.4-10.5.4-1+deb7u10.5.4-1+deb7u2 |
0.5.4-1+deb7u3 |
libsshDebian:8 |
before 0.6.3-4+deb8u2, plus listed versions 0.6.3-40.6.3-4+deb8u1 |
0.6.3-4+deb8u2 |
libsshMageia:5 |
before 0.6.5-1.1.mga5 | 0.6.5-1.1.mga5 |
libsshRed Hat:rhel_extras_other:7 |
before 0:0.7.1-2.el7 | 0:0.7.1-2.el7 |
libssh-debuginfoRed Hat:rhel_extras_other:7 |
before 0:0.7.1-2.el7 | 0:0.7.1-2.el7 |
libssh-develRed Hat:rhel_extras_other:7 |
before 0:0.7.1-2.el7 | 0:0.7.1-2.el7 |
Show 10 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libsshSUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 0.2-5.22.1 | 0.2-5.22.1 |
libsshSUSE:Linux Enterprise Desktop 11 SP4 |
before 0.2-5.22.1 | 0.2-5.22.1 |
libsshSUSE:Linux Enterprise Desktop 12 |
before 0.6.3-11.1 | 0.6.3-11.1 |
libsshSUSE:Linux Enterprise Desktop 12 SP1 |
before 0.6.3-11.1 | 0.6.3-11.1 |
libsshSUSE:Linux Enterprise Software Development Kit 12 |
before 0.6.3-11.1 | 0.6.3-11.1 |
libsshSUSE:Linux Enterprise Software Development Kit 12 SP1 |
before 0.6.3-11.1 | 0.6.3-11.1 |
libsshSUSE:Linux Enterprise Workstation Extension 12 |
before 0.6.3-11.1 | 0.6.3-11.1 |
libsshSUSE:Linux Enterprise Workstation Extension 12 SP1 |
before 0.6.3-11.1 | 0.6.3-11.1 |
libsshUbuntu:14.04:LTS |
before 0.6.1-0ubuntu3.3, plus listed versions 0.5.4-10.6.1-0ubuntu20.6.1-0ubuntu30.6.1-0ubuntu3.1 |
0.6.1-0ubuntu3.3 |
libsshUbuntu:16.04:LTS |
before 0.6.3-4.2ubuntu1, plus listed versions 0.6.3-3ubuntu30.6.3-4.10.6.3-4.2 |
0.6.3-4.2ubuntu1 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
lists.fedoraproject.org/pipermail/package-announce/2016-February/178058.html
ubuntu.com/usn/USN-2912-1
libssh.org/security/advisories/CVE-2016-0739.txt
puppet.com/security/cve/CVE-2016-0739
lists.fedoraproject.org/pipermail/package-announce/2016-March/178822.html
security.gentoo.org/glsa/201606-12
Show 23 moreShow less
debian.org/security/2016/dsa-3488
rhn.redhat.com/errata/RHSA-2016-0566.html
libssh.org/2016/02/23/libssh-0-7-3-security-and-bugfix-release
lists.opensuse.org/opensuse-updates/2016-03/msg00111.html
nvd.nist.gov/vuln/detail/CVE-2016-0739
github.com/advisories/GHSA-v7q8-7g48-2272
security-tracker.debian.org/tracker/CVE-2016-0739
advisories.mageia.org/MGASA-2016-0082.html
bugs.mageia.org/show_bug.cgi?id=17809
access.redhat.com/errata/RHSA-2016:0566
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1305971
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0566.json
access.redhat.com/security/cve/CVE-2016-0739
cve.org/CVERecord?id=CVE-2016-0739
suse.com/support/update/announcement/2016/suse-su-20160622-1
bugzilla.suse.com/965875
suse.com/security/cve/CVE-2016-0739
suse.com/support/update/announcement/2016/suse-su-20160625-1
ubuntu.com/security/CVE-2016-0739
libssh2.org/adv_20160223.html
ubuntu.com/security/notices/USN-2912-1
ubuntu.com/security/CVE-2015-3146