Out of Bounds Read Flaw in libssh2
Summary
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 ↓
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 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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for libssh2.