Skip to content

CVE-2026-66032 libssh2 Double-Free Heap Corruption via sftp_open()

HighCVSS 8.7 EPSS 0.48%
Published
Updated
Exploit status
No public exploit known

Description

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.

Affected products

ProductAffected versionsFixed in
libssh2 <= 1.11.1 No fix listed
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= V3.1.7 No fix listed
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= V3.1.7 No fix listed
redhat/libssh2(Red Hat:rhel_els:7) < 1.8.0-4.el7_9.2 1.8.0-4.el7_9.2
redhat/libssh2-main(Red Hat:hummingbird:1) < 1.11.1-10.2.hum1 1.11.1-10.2.hum1
redhat/libssh2(Red Hat:rhel_els:6) All versions No fix listed
debian/libssh2(Debian:12) < 1.10.0-3+deb12u1 1.10.0-3+deb12u1
debian/libssh2(Debian:12) = 1.10.0-3 No fix listed
debian/libssh2(Debian:13) < 1.11.1-1+deb13u2 1.11.1-1+deb13u2
debian/libssh2(Debian:13) = 1.11.1-1 No fix listed
debian/libssh2(Debian:13) = 1.11.1-1+deb13u1 No fix listed
debian/libssh2(Debian:14) < 1.11.1-5 1.11.1-5
debian/libssh2(Debian:14) = 1.11.1-1 No fix listed
debian/libssh2(Debian:14) = 1.11.1-2 No fix listed
debian/libssh2(Debian:14) = 1.11.1-3 No fix listed
debian/libssh2(Debian:14) = 1.11.1-4 No fix listed
ubuntu/libssh2(Ubuntu:22.04) < 1.10.0-3ubuntu0.1 1.10.0-3ubuntu0.1
alpine/libssh2(Alpine:v3.21) < 1.11.1-r3 1.11.1-r3
alpine/libssh2(Alpine:v3.22) < 1.11.1-r3 1.11.1-r3
alpine/libssh2(Alpine:v3.23) < 1.11.1-r4 1.11.1-r4
alpine/libssh2(Alpine:v3.24) < 1.11.1-r4 1.11.1-r4
ubuntu/libssh2(Ubuntu:24.04) < 1.11.0-4.1ubuntu0.24.04.4 1.11.0-4.1ubuntu0.24.04.4
Show 2 more
ProductAffected versionsFixed in
ubuntu/libssh2(Ubuntu:26.04) < 1.11.1-1ubuntu0.26.04.4 1.11.1-1ubuntu0.26.04.4
azure linux libssh2(Azure Linux:3.0) < 1.11.1-5 1.11.1-5

References