Out of Bounds Read Flaw in libssh2

libssh2 Updated 02 Oct 2025

Summary

21/03/2019
N/A
Yes i
Critical
9.1

CVE-2019-3862: An 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 no payload are parsed. Affects libssh2 across 2 version ranges.

< 1.8.1-r0 < f15b1e297f72882214988101ccdc5e6ad30d7e6e

Fixed in 1.8.1-r0. 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 a client-side implementation of the SSH protocol. It allows applications to establish secure connections and perform various SSH operations. However, a vulnerability has been discovered in versions prior to 1.8.1 that can lead to an out of bounds read. This flaw occurs when parsing SSH_MSG_CHANNEL_REQUEST packets with an exit status message and no payload. An attacker who compromises an SSH server could exploit this vulnerability to cause a Denial of Service or read sensitive data from the client's memory.

Vulnerability Detail

The vulnerability, identified as CVE-2019-3862, originates from the improper handling of SSH_MSG_CHANNEL_REQUEST packets in libssh2. When such packets contain an exit status message without a payload, an out of bounds read occurs. This can be exploited by a remote attacker who has compromised an SSH server. The impact of this vulnerability includes potential Denial of Service attacks and unauthorized access to sensitive information stored in the client's memory.

How To Fix

Minimum fixed version

1.8.1-r0

This is the first release that contains the fix.

sudo apk add --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 crucial to update to the patched version of libssh2 as soon as possible to protect against potential attacks.

Conclusion

The out of bounds read flaw in libssh2 can have serious consequences, including Denial of Service attacks and unauthorized access to sensitive data. It is crucial to update to the patched version of libssh2 (1.8.1 or later) to mitigate the risk of exploitation. 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 library that provides a client-side implementation of the SSH protocol, allowing applications to establish secure connections and perform SSH operations.

The vulnerability can lead to Denial of Service attacks and unauthorized access to sensitive data in the client's memory.

To fix this vulnerability, update libssh2 to version 1.8.1 or later.

No, there is no known workaround for this vulnerability. Updating to the patched version is the recommended solution.

You can find more information about this vulnerability in the CVE-2019-3862 entry.

Related vulnerabilities

Recent vulnerabilities recorded for libssh2.

How To Fix

Minimum fixed version

1.8.1-r0

This is the first release that contains the fix.

sudo apk add --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