Every CVE Search/ Get API key

CVE-2016-0739

libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman...

5.9 MediumFix available

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

2.43%Up 0.9 points since Feb 4, 2022
90%50%10%1%

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 MediumCVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.0
4.3 MediumAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
libssh
Debian:12
before 0.6.3-4.3
0.6.3-4.3
libssh
Debian:13
before 0.6.3-4.3
0.6.3-4.3
libssh
Debian:14
before 0.6.3-4.3
0.6.3-4.3
libssh
Debian: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
libssh
Debian: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
libssh
Debian:8
before 0.6.3-4+deb8u2, plus listed versions
0.6.3-40.6.3-4+deb8u1
0.6.3-4+deb8u2
libssh
Mageia:5
before 0.6.5-1.1.mga5
0.6.5-1.1.mga5
libssh
Red Hat:rhel_extras_other:7
before 0:0.7.1-2.el7
0:0.7.1-2.el7
libssh-debuginfo
Red Hat:rhel_extras_other:7
before 0:0.7.1-2.el7
0:0.7.1-2.el7
libssh-devel
Red Hat:rhel_extras_other:7
before 0:0.7.1-2.el7
0:0.7.1-2.el7
Show 10 moreShow less
Affected packages
PackageAffectedFixed
libssh
SUSE:Linux Enterprise Software Development Kit 11 SP4
before 0.2-5.22.1
0.2-5.22.1
libssh
SUSE:Linux Enterprise Desktop 11 SP4
before 0.2-5.22.1
0.2-5.22.1
libssh
SUSE:Linux Enterprise Desktop 12
before 0.6.3-11.1
0.6.3-11.1
libssh
SUSE:Linux Enterprise Desktop 12 SP1
before 0.6.3-11.1
0.6.3-11.1
libssh
SUSE:Linux Enterprise Software Development Kit 12
before 0.6.3-11.1
0.6.3-11.1
libssh
SUSE:Linux Enterprise Software Development Kit 12 SP1
before 0.6.3-11.1
0.6.3-11.1
libssh
SUSE:Linux Enterprise Workstation Extension 12
before 0.6.3-11.1
0.6.3-11.1
libssh
SUSE:Linux Enterprise Workstation Extension 12 SP1
before 0.6.3-11.1
0.6.3-11.1
libssh
Ubuntu: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
libssh
Ubuntu: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

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, GitHub Advisories, NVD, OSV

References

Show 23 moreShow less
MoveEnter Open