libssh2 vulnerabilities
22 known CVE vulnerabilities in libssh2, translated and rated.
- CVE-2026-55200High
libssh2 1.11.1, fixed in commit 97acf3d, contains an out-of-bounds write vulnerability in ssh2_transport_read() that fails to enforce upper bounds on the packet_length field. Remote attackers can send crafted SSH packets with excessively large packet_length values to corrupt heap memory and achieve remote code execution.
- CVE-2019-3861Medium
An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SSH packets with a padding length value greater than the packet length are parsed. A remote attacker who compromises a SSH server may be able to cause a Denial of Service or read data in the client memory.
- CVE-2019-3860Medium
An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SFTP packets with empty payloads are parsed. A remote attacker who compromises a SSH server may be able to cause a Denial of Service or read data in the client memory.
- CVE-2019-3857High
In libssh2 before 1.8.1, an integer overflow flaw which could lead to an out of bounds write was discovered in the way SSH_MSG_CHANNEL_REQUEST packets with an exit signal are parsed. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.
- CVE-2019-3856High
In libssh2 before 1.8.1, an integer overflow flaw, which could lead to an out of bounds write, was discovered in the way keyboard prompt requests are parsed. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.
- CVE-2019-3858Medium
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. A remote attacker who compromises a SSH server may be able to cause a Denial of Service or read data in the client memory.
- CVE-2019-3855High
An integer overflow flaw leading to an out-of-bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from the server. A remote attacker who compromises an SSH server may execute code on the client system when a user connects.
- CVE-2019-3862High
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. A remote attacker who compromises an SSH server may cause a Denial of Service or read data from client memory.
- CVE-2019-3859Critical
An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the _libssh2_packet_require and _libssh2_packet_requirev functions. A remote attacker who compromises a SSH server may be able to cause a Denial of Service or read data in the client memory.
- CVE-2026-66035High
Pre-authentication heap buffer overflow in libssh2 up to 1.11.1, allowing a malicious SSH server to corrupt client heap metadata by sending a packet with packet_length smaller than cipher block size during Encrypt-then-MAC negotiation.
- CVE-2026-66034High
Missing bounds check in libssh2 up to 1.11.1, allowing a malicious SSH server to trigger an arbitrary-length heap out-of-bounds read and free of an uninitialized pointer via the publickey subsystem.
- CVE-2026-66033High
Pre-authentication integer underflow in ssh2_cipher_crypt() in libssh2 up to 1.11.1, allowing a malicious SSH server to crash any connecting client by negotiating AES-GCM ciphers.
- CVE-2026-66032High
Double-free vulnerability in sftp_open() in libssh2 up to 1.11.1, allowing a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session.
- CVE-2026-58051Medium
In libssh2 up to version 1.11.1, when growing the publickey list with SSH2_REALLOC, new entries are not zero-initialized before parsing populates them. A parse failure reaching the cleanup path causes libssh2_publickey_list_free to operate on an uninitialized entry, potentially freeing an attacker-influenceable attrs pointer.
- CVE-2026-58050High
A vulnerability in libssh2 up to version 1.11.1 allows an attacker-controlled SSH server to read a 32-bit attribute count from a publickey-subsystem response. This count is used for memory allocation without bounds checking, causing multiplication overflow on 32-bit platforms and an undersized buffer. A malicious server can then write past the allocation, leading to a heap buffer overflow in the connecting libssh2 client.
- CVE-2025-15661Medium
A vulnerability in libssh2 up to version 1.11.1 (fixed in commit 2dae302) causes an out-of-bounds heap read in the sftp_symlink() function in src/sftp.c. A malicious SSH server or man-in-the-middle attacker can send a crafted SSH_FXP_NAME response, leading to disclosure of heap memory contents or a crash.
- CVE-2026-55199Medium
A pre-authentication denial of service vulnerability in libssh2 through version 1.11.1 (fixed in commit 1762685) allows a malicious SSH server to cause a client CPU exhaustion loop by sending a crafted extension count value (nr_extensions=0xFFFFFFFF) in the SSH_MSG_EXT_INFO handler. The client spins in a tight CPU loop for over 60 seconds because return values from _libssh2_get_string() are unchecked and the session timeout does not apply to CPU-bound loops.
- CVE-2026-25260High
Memory corruption vulnerability when accessing shared buffers without validation of concurrent user-mode input modifications.
- CVE-2026-7598High
A security vulnerability has been found in libssh2 up to version 1.11.1 in the userauth_password function of src/userauth.c. Manipulation of the username_len/password_len arguments leads to an integer overflow. The attack can be launched remotely.
- CVE-2020-22218High
An issue was discovered in function _libssh2_packet_add in libssh2 1.10.0 allows attackers to access out of bounds memory. This vulnerability could lead to unauthorized data access or program crashes.
- CVE-2019-17498High
In libssh2 v1.9.0 and earlier versions, the SSH_MSG_DISCONNECT logic in packet.c has an integer overflow in a bounds check, enabling an attacker to specify an arbitrary (out-of-bounds) offset for a subsequent memory read. A crafted SSH server may be able to disclose sensitive information or cause a denial of service condition on the client system when a user connects to the server.
- CVE-2019-3863High
In libssh2 before 1.8.1, a vulnerability was found on the SSH client side. A server could send multiple keyboard interactive response messages whose total length exceeds the unsigned char max. This value is used by the SSH client as an index to copy memory, causing an out-of-bounds memory write.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

