Description
There are packages installed that are affected by multiple vulnerabilities referenced in the following CVEs:
- libssh2 through 1.11.1, fixed in commit 2dae302, contains an out-of-bounds heap read vulnerability in the
sftp_symlink() function in src/sftp.c that allows a malicious SSH server or man-in-the-middle attacker to
disclose heap memory contents or cause a crash by sending a crafted SSH_FXP_NAME response. Attackers can
supply a link_len value larger than the actual packet data in SSH_FXP_NAME responses for SFTP READLINK and
REALPATH operations, triggering a heap buffer over-read of up to target_len minus one bytes due to the
missing validation of available packet buffer size before the memcpy operation. (CVE-2025-15661)
- 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. (CVE-2026-58050)
- libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries
before parsing populates them, so a parse failure reaching the cleanup path leaves
libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the
publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-
influenceable attrs pointer in a connecting libssh2 client. (CVE-2026-58051)
- libssh2 through 1.11.1, fixed in commit 5e47761, contains a double-free vulnerability in the sftp_open()
function in src/sftp.c that allows a malicious SSH server to corrupt the heap of any authenticated client
opening an SFTP session. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the
response data buffer is freed, and if a subsequent sftp_packet_require() call returns a specific error
such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed a second time, enabling tcache
dup conditions on glibc systems that allow overlapping allocations and function pointer overwrites.
(CVE-2026-66032)
Solution
Update the libssh2 library and its related packages to version 1.11.1-r4 or later.
Plugin Details
Supported Sensors: Agentless Assessment
Risk Information
Vector: CVSS2#AV:N/AC:H/Au:N/C:P/I:N/A:C
Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C
Threat Vector: CVSS:4.0/E:P
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Vulnerability Information
Exploit Ease: Exploits are available
Vulnerability Publication Date: 6/18/2026