Denial of Service Vulnerability in libssh2: SSH_MSG_KEXINIT Packet Exploit
Summary
CVE-2015-1782: The kex_agree_methods function in libssh2 before 1.5.0 allows remote servers to cause a denial of service (crash) or have other unspecified impact via crafted length values in an SSH_MSG_KEXINIT packet. Affects libssh2 versions < 1.4.3-4.1. Fixed in 1.4.3-4.1. 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 an API for implementing SSH2 (Secure Shell) protocol functionalities. It is utilized in various applications for secure data transmission over networks. The library is designed to handle SSH connections, including key exchange, authentication, and data encryption. However, prior to version 1.5.0, libssh2 was found to have a vulnerability that could be exploited by remote servers to cause a denial of service, potentially leading to application crashes or other unspecified impacts.
Vulnerability Detail
The vulnerability identified as CVE-2015-1782 originates from the kex_agree_methods function in libssh2 versions before 1.5.0. It allows remote servers to send crafted length values within an SSH_MSG_KEXINIT packet, which can lead to a denial of service condition. This can result in the application crashing or experiencing other unspecified impacts, making it critical for users of the library to address this issue promptly.
How To Fix
Minimum fixed version
1.4.3-4.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
If upgrading is not immediately possible, consider implementing network-level controls to restrict access to the SSH service, thereby mitigating the risk of exploitation until a proper fix can be applied.
Conclusion
CVE-2015-1782 represents a significant vulnerability in libssh2 that can lead to denial of service through crafted SSH_MSG_KEXINIT packets. Users are strongly advised to upgrade to the latest version to mitigate risks associated with this vulnerability.
See every vulnerability recorded for libssh2 →
FAQ
CVE-2015-1782 is a vulnerability in libssh2 that allows remote servers to exploit crafted SSH_MSG_KEXINIT packets, leading to potential denial of service.
libssh2 versions prior to 1.5.0 are affected by this vulnerability.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The vulnerability can lead to application crashes and other unspecified impacts, affecting the stability and security of applications using libssh2.
If an immediate upgrade is not possible, consider implementing network-level controls to limit access to the SSH service as a temporary workaround.
References
Related vulnerabilities
Recent vulnerabilities recorded for libssh2.