Skip to content
Noroxi
CVE-2016-0787· NVD / CVE Program· CNA redhat

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 f

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

MediumCVSS 5.9 · v3.0—No exploit Fix available
Published
Apr 13, 2016
Updated
Jun 16, 2026
EPSS
2.6% · 85th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

24

Monitor

Low priority for now.

CVSS
23 / 40 · 5.9 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 2.6%

Affected systems

VendorProduct
libssh2libssh2
fedoraprojectfedora
opensuseopensuse
debiandebian linux

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • debian debian linux7.0
  • debian debian linux8.0
  • fedoraproject fedora22
  • fedoraproject fedora23
  • libssh2 libssh2up to 1.6.0 inclusive
  • opensuse opensuse13.2

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Alpine:v3.4libssh2before 1.7.0-r01.7.0-r0
Debian:12libssh2before 1.5.0-2.11.5.0-2.1
Debian:6.0libssh2before 1.2.6-1+deb6u21.2.6-1+deb6u2
Debian:7libssh2before 1.4.2-1.1+deb7u21.4.2-1.1+deb7u2
Debian:8libssh2before 1.4.3-4.1+deb8u11.4.3-4.1+deb8u1
openSUSE:Tumbleweedlibssh2_orgbefore 1.7.0-1.51.7.0-1.5
Red Hat:enterprise_linux:6::clientlibssh2before 0:1.4.2-2.el6_7.10:1.4.2-2.el6_7.1
Red Hat:enterprise_linux:6::clientlibssh2-debuginfobefore 0:1.4.2-2.el6_7.10:1.4.2-2.el6_7.1
Red Hat:enterprise_linux:6::clientlibssh2-develbefore 0:1.4.2-2.el6_7.10:1.4.2-2.el6_7.1
Red Hat:enterprise_linux:6::clientlibssh2-docsbefore 0:1.4.2-2.el6_7.10:1.4.2-2.el6_7.1
Red Hat:enterprise_linux:7::clientlibssh2before 0:1.4.3-10.el7_2.10:1.4.3-10.el7_2.1
Red Hat:enterprise_linux:7::clientlibssh2-debuginfobefore 0:1.4.3-10.el7_2.10:1.4.3-10.el7_2.1
Red Hat:enterprise_linux:7::clientlibssh2-develbefore 0:1.4.3-10.el7_2.10:1.4.3-10.el7_2.1
Red Hat:enterprise_linux:7::clientlibssh2-docsbefore 0:1.4.3-10.el7_2.10:1.4.3-10.el7_2.1
SUSE:Linux Enterprise Desktop 12libssh2_orgbefore 1.4.3-16.11.4.3-16.1
SUSE:Linux Enterprise Software Development Kit 11 SP4libssh2_orgbefore 1.2.9-4.2.6.11.2.9-4.2.6.1

Other highest-scoring records for the same primary product.

  • CVE-2019-3861An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SSH packets with a padding length value greater than the packet
    38Monitor
  • CVE-2019-3860An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SFTP packets with empty payloads are parsed.
    38Monitor
  • CVE-2019-3858An out of bounds read flaw was discovered in libssh2 before 1.8.1 when a specially crafted SFTP packet is received from the server.
    38Monitor
  • CVE-2019-3855An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from
    38Monitor
  • CVE-2019-3862An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SSH_MSG_CHANNEL_REQUEST packets with an exit status message and
    38Monitor
  • CVE-2019-3859An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the _libssh2_packet_require and _libssh2_packet_requirev functions.
    38Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
alpine:libssh21.7.0-r0 · Alpine:v3.4Package registry (OSV)
debian:libssh21.5.0-2.1 · Debian:12Package registry (OSV)
opensuse:libssh2_org1.7.0-1.5 · openSUSE:TumbleweedPackage registry (OSV)
red hat:libssh20:1.4.2-2.el6_7.1 · Red Hat:enterprise_linux:6::clientPackage registry (OSV)
red hat:libssh2-debuginfo0:1.4.2-2.el6_7.1 · Red Hat:enterprise_linux:6::clientPackage registry (OSV)
red hat:libssh2-devel0:1.4.2-2.el6_7.1 · Red Hat:enterprise_linux:6::clientPackage registry (OSV)
red hat:libssh2-docs0:1.4.2-2.el6_7.1 · Red Hat:enterprise_linux:6::clientPackage registry (OSV)
suse:libssh2_org1.4.3-16.1 · SUSE:Linux Enterprise Desktop 12Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • Special conditions such as timing or configuration are required.

If successful

Confidentiality
high · data can be read
Integrity
none
Availability
none
Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
None
Availability impact
None

CVSS vector

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

nvd-primary

Root cause

The extension requests broader permissions than its function needs and sends the data it collects out for purposes beyond its stated function.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

json
{  "permissions": ["tabs", "<all_urls>"],  "background": { "service_worker": "analytics.js" }}

Fixed

json
{  "permissions": ["activeTab"],  "host_permissions": ["https://yildiz.example/*"]}

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records