cve.bz

CVE-2016-0787

5.9 mediumEPSS 2.6%Fix available

Medium (5.9). EPSS 2.6% estimated probability of exploitation activity in the next 30 days.

On this page
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."

Severity

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
EPSS
2.6% (unchanged from 2.6% a week ago; 2.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 86th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2016-0787 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2016-0787?via=ask-ai-copy and https://cve.bz/cve/CVE-2016-0787?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2016-0787 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
fedoraproject:fedora22
fedoraproject:fedora23
opensuse:opensuse13.2
libssh2:libssh2through 1.6.0
debian:debian_linux7.0
debian:debian_linux8.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian6.0libssh21.2.6-1+deb6u2DLA-426-1
Debian7libssh21.4.2-1.1+deb7u2DSA-3487-1
Debian8libssh21.4.3-4.1+deb8u1DSA-3487-1
Debian12, 13, 14libssh21.5.0-2.1DEBIAN-CVE-2016-0787
Ubuntu14.04:LTSlibssh21.4.3-2ubuntu0.1UBUNTU-CVE-2016-0787
Ubuntu16.04:LTSlibssh21.5.0-2ubuntu0.1UBUNTU-CVE-2016-0787
Red Hatenterprise_linux:6::client, enterprise_linux:6::computenode, enterprise_linux:6::server and 1 morelibssh2, libssh2-docs, libssh2-devel and 1 more0:1.4.2-2.el6_7.1RHSA-2016:0428
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 morelibssh2, libssh2-docs, libssh2-devel and 1 more0:1.4.3-10.el7_2.1RHSA-2016:0428
SUSELinux Enterprise Desktop 11 SP4, Linux Enterprise Server 11 SP4, Linux Enterprise Server for SAP Applications 11 SP4 and 1 morelibssh2_org1.2.9-4.2.6.1SUSE-SU-2016:0723-1
SUSELinux Enterprise Desktop 12, Linux Enterprise Desktop 12 SP1, Linux Enterprise Server 12 and 5 morelibssh2_org1.4.3-16.1SUSE-SU-2016:0718-1
openSUSETumbleweedlibssh2_org1.7.0-1.5openSUSE-SU-2024:10190-1
Alpinev3.4libssh21.7.0-r0ALPINE-CVE-2016-0787

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6libssh2-0:1.4.2-2.el6_7.1Fixed 2016-03-10RHSA-2016:0428
Red Hat Enterprise Linux 7libssh2-0:1.4.3-10.el7_2.1Fixed 2016-03-10RHSA-2016:0428

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2016-0787.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-200 (59).

References

Check your stackJSON