Security Update for libssh2

libssh2 Updated 02 Oct 2025

Summary

23/02/2016
N/A
Yes i
Unrated
Not published

DSA-3487-1: libssh2 - security update. Affects libssh2 versions < 1.4.2-1.1+deb7u2. Fixed in 1.4.2-1.1+deb7u2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

libssh2 is a SSH2 client-side library that provides secure communication over a network. It is used by various applications to establish SSH sessions and transfer data securely. However, a vulnerability has been discovered in libssh2 that weakens the security of the SSHv2 handshake, potentially allowing an eavesdropper to decrypt or intercept SSH sessions.

Vulnerability Detail

The vulnerability in libssh2 arises from a flaw in the Diffie-Hellman negotiation process. During the handshake, libssh2 incorrectly passes the number of bytes instead of the number of bits to a function that expects the latter. This mistake significantly weakens the security of the handshake, making it easier for an attacker with sufficient resources to compromise the confidentiality and integrity of SSH sessions. This vulnerability is identified as CVE-2016-0787.

How To Fix

Minimum fixed version

1.4.2-1.1+deb7u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libssh2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to apply the security update to ensure the integrity and confidentiality of SSH sessions.

Conclusion

The libssh2 library is vulnerable to a flaw in the Diffie-Hellman negotiation process, which weakens the security of SSHv2 handshakes. This could potentially allow an attacker to intercept or decrypt SSH sessions. To mitigate this risk, it is crucial to upgrade to the patched versions of libssh2 provided by Debian. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

libssh2 is a client-side library that enables secure communication over SSHv2 protocol. It is used by various applications to establish SSH connections and transfer data securely.

This vulnerability weakens the security of the SSHv2 handshake, potentially allowing an eavesdropper to decrypt or intercept SSH sessions. It is crucial to apply the security update to mitigate this risk.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) and Vulert will analyze it for open-source vulnerabilities in real-time.

No, there are no known workarounds for this vulnerability. It is necessary to apply the security update to address the issue.

The updated libssh2 packages can be obtained from the official Debian repositories. For the oldstable distribution (wheezy), upgrade to version 1.4.2-1.1+deb7u2. For the stable distribution (jessie), upgrade to version 1.4.3-4.1+deb8u1.

Related vulnerabilities

Recent vulnerabilities recorded for libssh2.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.4.2-1.1+deb7u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libssh2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback