Critical Out of Bounds Read Vulnerability in libssh2
Summary
ALPINE-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.1-r0. Fixed in 1.8.1-r0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
libssh2 is a widely used C library that implements the SSH2 protocol, enabling secure communication over a network. It 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, a critical vulnerability has been identified that could compromise the security of applications relying on this library.
Vulnerability Detail
An out of bounds read flaw was discovered in libssh2 before version 1.8.1. This vulnerability arises when a specially crafted SFTP packet is received from a server. A remote attacker who compromises an SSH server may exploit this flaw to cause a Denial of Service (DoS) or potentially read sensitive data from the client’s memory. The vulnerability has a CVSS score of 9.1, indicating its critical nature and the significant risk it poses to affected systems.
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
As a temporary measure, if updating the package is not immediately feasible, consider restricting access to the SSH server to trusted IP addresses only. This can help mitigate the risk of exploitation until the library is updated.
Conclusion
The out of bounds read vulnerability in libssh2 poses a significant risk to applications using this library. It is crucial for developers and system administrators to update to the patched version to safeguard against potential attacks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time, ensuring ongoing security.
See every vulnerability recorded for libssh2 →
FAQ
The vulnerability is an out of bounds read flaw that can lead to Denial of Service or unauthorized data access.
You can use the Vulert playground at Vulert Scanner to check if your application is affected without any signup.
The CVSS score of this vulnerability is 9.1, indicating a critical severity level.
Update the libssh2 package to version 1.8.1-r0 or later to mitigate the vulnerability.
While specific exploits may not be publicly available, the nature of the vulnerability allows for potential Denial of Service attacks and data leakage.
References
Related vulnerabilities
Recent vulnerabilities recorded for libssh2.