CVE-2026-58050
HighCVSS 7.0Exploitation Probability (EPSS)
Low risk25th percentile - higher than 25% of all known CVEs
Summary
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.
Risk Assessment
The risk includes potential remote code execution or client crash via a malicious SSH server. An attacker could exploit this to gain control over the client system or cause denial of service.
Recommendation
Immediately upgrade libssh2 to version 1.11.2 or later, which includes the fix. If an upgrade is not possible, restrict SSH connections to trusted servers only.
Other vulnerabilities in libssh2
See all- 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-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-55200High
libssh2 up to version 1.11.1 has 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-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.
Original NVD description (English source)
libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation num_attrs * sizeof(libssh2_publickey_attribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.

