Breaking: Ruby2Shell - Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2016-0787

libssh2: bits/bytes confusion resulting in truncated Diffie-Hellman secret length

Overview

Published
13 Apr 2016
Modified
6 May 2026
Medium CVE
0 Registry packages
6 OS packages
6 Linux distributions
Yes Fix available

Description

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."

Source: OX vulnerability database

Severity

5.9 · MEDIUM

CVSS 3.0 base score, scored by NVD.

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Weakness: CWE-200

Affected packages · 0

No registry package. This ID affects operating system packages only.

Operating systems · 10 fixes

Oracle Linux 1 release · 1 package

fixed 1
libssh2
Oracle Linux fixes for CVE-2016-0787
ReleasePackageFixed in
7 libssh2 +2 1.4.3-10.el7_2.1

Red Hat 1 release · 1 package

fixed 1
libssh2
Red Hat fixes for CVE-2016-0787
ReleasePackageFixed inAdvisory
7 libssh2 +2 0:1.4.3-10.el7_2.1 RHSA-2016:0428

debian 4 releases · 1 package

fixed 4
libssh2
debian fixes for CVE-2016-0787
ReleasePackageFixed in
11 libssh2 1.5.0-2.1
12 libssh2 1.5.0-2.1
13 libssh2 1.5.0-2.1
14 libssh2 1.5.0-2.1

echo 1 release · 1 package

fixed 1
libssh2
echo fixes for CVE-2016-0787
ReleasePackageFixed in
libssh2 1.5.0-2.1

openSUSE 1 release · 1 package

fixed 1
libssh2-1
openSUSE fixes for CVE-2016-0787
ReleasePackageFixed inAdvisory
Tumbleweed libssh2-1 +2 1.7.0-1.5 openSUSE-SU-2024:10190-1

root.io debian 2 releases · 1 package

fixed 2
rootio-libssh2
root.io debian fixes for CVE-2016-0787
ReleasePackageFixed in
12 rootio-libssh2 1.5.0-2.1
13 rootio-libssh2 1.5.0-2.1

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.