The diffie_hellman_sha256 function in kex.c in libssh2 before 1.7.0 improperly truncates…
Priority LOW 31CWE-200Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.0 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-200.
Summary
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."
Why it matters now
EPSS 0.02591 85th percentileScored 2026-11-07
Fix Fixed Red Hat: 1 advisory
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 6
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:* | 22 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:* | 23 | Vulnerable | Fedoraproject |
| cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:* | 13.2 | Vulnerable | openSUSE |
| cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:* | up to 1.6.0 | Vulnerable | The libssh2 Project |
| cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Debian |
- cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:* Versions 22 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:* Versions 23 Vulnerable ·Fedoraproject
- cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:* Versions 13.2 Vulnerable ·openSUSE
- cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:* Versions up to 1.6.0 Vulnerable ·The libssh2 Project
- cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Debian
Remediation
Red Hat 1 advisory
- RHSA-2016:0428 Released 2016-03-10 · Red Hat rating Moderatelibssh2 security update
- Red Hat Enterprise Linux Client (v. 7) libssh2-1.4.3-10.el7_2.1
- Red Hat Enterprise Linux Client Optional (v. 7) libssh2-devel-1.4.3-10.el7_2.1, libssh2-docs-1.4.3-10.el7_2.1
- Red Hat Enterprise Linux ComputeNode (v. 7) libssh2-1.4.3-10.el7_2.1
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) libssh2-devel-1.4.3-10.el7_2.1, libssh2-docs-1.4.3-10.el7_2.1
- Red Hat Enterprise Linux Desktop (v. 6) libssh2-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux Desktop Optional (v. 6) libssh2-devel-1.4.2-2.el6_7.1, libssh2-docs-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux HPC Node (v. 6) libssh2-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux HPC Node Optional (v. 6) libssh2-devel-1.4.2-2.el6_7.1, libssh2-docs-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux Server (v. 6) libssh2-1.4.2-2.el6_7.1, libssh2-1.4.2-2.el6_7.1.ppc
- Red Hat Enterprise Linux Server (v. 7) libssh2-1.4.3-10.el7_2.1, libssh2-1.4.3-10.el7_2.1.ppc
- Red Hat Enterprise Linux Server Optional (v. 6) libssh2-devel-1.4.2-2.el6_7.1, libssh2-devel-1.4.2-2.el6_7.1.ppc, libssh2-docs-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux Server Optional (v. 7) libssh2-devel-1.4.3-10.el7_2.1, libssh2-devel-1.4.3-10.el7_2.1.ppc, libssh2-docs-1.4.3-10.el7_2.1
- Red Hat Enterprise Linux Workstation (v. 6) libssh2-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux Workstation (v. 7) libssh2-1.4.3-10.el7_2.1
- Red Hat Enterprise Linux Workstation Optional (v. 6) libssh2-devel-1.4.2-2.el6_7.1, libssh2-docs-1.4.2-2.el6_7.1
- Red Hat Enterprise Linux Workstation Optional (v. 7) libssh2-devel-1.4.3-10.el7_2.1, libssh2-docs-1.4.3-10.el7_2.1
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux Client (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux ComputeNode (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Desktop (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Desktop Optional (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux HPC Node (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux HPC Node Optional (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Server (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Server Optional (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Workstation (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Workstation Optional (v. 6) | Fixed | RHSA-2016:0428 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2016:0428 |
Timeline
- 2026-10-02 Threatist record created from CVE-2016-0787
- 2026-10-03 Alias added: GHSA-6wmj-27wm-wwx6
References
Advisory 6
Sources
- CVE-2016-0787 · CVE Program
- CVE-2016-0787 · NVD
- FIRST EPSS
- GHSA-6wmj-27wm-wwx6 · GitHub Advisory Database · CC BY 4.0
- CVE-2016-0787 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences