Out of Bounds Read Vulnerability in libssh2: Denial of Service Risk

libssh2 Updated 02 Oct 2025

Summary

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

DEBIAN-CVE-2019-3858: An out of bounds read flaw was discovered in libssh2 before 1.8.1 when a specially crafted SFTP packet is received from the server. 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 library that provides an API for implementing SSH2 client and server functionality. It is utilized in various applications for secure data transmission over networks. The library supports SFTP, SCP, and other protocols, making it a critical component in many software solutions. However, prior to version 1.8.1, libssh2 was susceptible to an out of bounds read vulnerability that could be exploited through specially crafted SFTP packets.

Vulnerability Detail

An out of bounds read flaw was discovered in libssh2 before version 1.8.1. This vulnerability arises when a malicious actor sends a specially crafted SFTP packet to a client using the library. If the SSH server is compromised, the attacker may be able to exploit this flaw to cause a Denial of Service (DoS) or potentially read sensitive data from the client's memory. The vulnerability is significant as it can lead to unauthorized access to sensitive information and disrupt service availability.

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 measure, if updating the package is not immediately feasible, consider restricting access to the SSH server or implementing network-level controls to limit exposure to potentially malicious SFTP packets.

Conclusion

The out of bounds read vulnerability in libssh2 poses a significant risk to applications utilizing this library. It is crucial for developers and system administrators to update to the patched version to safeguard against potential exploits. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

The vulnerability is an out of bounds read flaw that can be exploited through specially crafted SFTP packets, potentially leading to Denial of Service or unauthorized data access.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By simply uploading your manifest file like package-lock.json, you can check for vulnerabilities without needing to access the code.

If exploited, this vulnerability can lead to Denial of Service, causing applications to crash or become unresponsive, and may also allow attackers to read sensitive information from memory.

Yes, you should upgrade to version 1.8.0-2.1 or later to mitigate the vulnerability.

Detailed information can be found in the Debian CVE database, specifically at the link provided in the vulnerability details.

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