Critical Out of Bounds Read Vulnerability in libssh2 Package

libssh2 Updated 02 Oct 2025

Summary

25/03/2019
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2019-3861: An 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 length are parsed. Affects libssh2 versions < 1.8.0-2.1. Fixed in 1.8.0-2.1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libssh2 is a widely used C library that provides an API for implementing SSH2 client and server functionality. It allows applications to securely connect to remote servers, transfer files, and execute commands. The library is essential for secure communications in various applications, making it crucial for developers to ensure its integrity and security. However, a vulnerability has been identified that could compromise its security.

Vulnerability Detail

An out of bounds read flaw was discovered in libssh2 versions prior to 1.8.1. This vulnerability arises from the improper parsing of SSH packets that have a padding length value greater than the actual packet length. A remote attacker who successfully compromises an SSH server could exploit this flaw to cause a Denial of Service (DoS) or potentially read sensitive data from the client’s memory, leading to severe security implications.

How To Fix

Minimum fixed version

1.8.0-2.1

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

As a temporary workaround, users can limit access to the SSH server or implement firewall rules to restrict incoming connections until the package is updated. However, this is not a permanent solution and should be followed by an update as soon as possible.

Conclusion

The out of bounds read vulnerability in the libssh2 package poses significant risks to applications relying on this library for secure communications. It is crucial for users to update to the patched version to mitigate these risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

The vulnerability is an out of bounds read flaw that can lead to Denial of Service or unauthorized data access.

You can use Vulert's playground at Vulert Scanner to check if your application is affected without any signup.

If exploited, this vulnerability can lead to service interruptions or unauthorized access to sensitive information in memory.

Yes, the patched version of libssh2 is 1.8.0-2.1 or later, which addresses this vulnerability.

Implement firewall rules to restrict access to the SSH server as a temporary measure until the package can be updated.

Related vulnerabilities

Recent vulnerabilities recorded for libssh2.

How To Fix

Minimum fixed version

1.8.0-2.1

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