Critical Out of Bounds Read Vulnerability in libssh2: CVE-2019-3862

libssh2 Updated 02 Oct 2025

Summary

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

ALPINE-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 versions < 1.8.1-r0. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libssh2 is a widely used C library that provides an API for implementing the SSH2 protocol in applications. It enables secure communication over unsecured networks and is utilized in various applications for secure file transfers and remote command execution. The library is known for its lightweight design and ease of integration, making it a popular choice among developers. However, it is susceptible to vulnerabilities that can compromise the security of applications relying on it.

Vulnerability Detail

An out of bounds read flaw was discovered in libssh2 before version 1.8.1. This vulnerability arises from the improper handling of SSH_MSG_CHANNEL_REQUEST packets that contain an exit status message but lack a payload. 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. The severity of this vulnerability is underscored by its CVSS score of 9.1, indicating a critical risk level.

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

If an immediate update is not feasible, consider restricting access to the SSH server or implementing network-level controls to limit exposure to potential attackers. Additionally, monitoring logs for unusual activity can help identify attempts to exploit this vulnerability.

Conclusion

CVE-2019-3862 represents a significant security risk for applications utilizing the libssh2 library. It is crucial for developers and system administrators to update to the patched version to safeguard against potential exploits. Regular monitoring and vulnerability assessments can further enhance security posture.

See every vulnerability recorded for libssh2 →

Share this vulnerability

FAQ

CVE-2019-3862 is a critical vulnerability in the libssh2 library that allows for an out of bounds read, potentially leading to Denial of Service or data leakage.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Failing to address this vulnerability could expose your application to Denial of Service attacks and unauthorized access to sensitive information.

Yes, the patch is available in libssh2 version 1.8.1-r0 and later. Updating to this version will resolve the vulnerability.

The CVSS score of CVE-2019-3862 is 9.1, indicating a critical level of severity.

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