Skip to content

CVE-2025-15661 libssh2 - Heap Buffer Over-read via sftp_symlink() in sftp.c

HighCVSS 8.3 EPSS 0.65%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

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.

Upgrade path

23 packages: 14 fixed, 1 partially fixed, 8 with no fix yet.

PackageAffectedFixed inStatus
azure linux libssh(Azure Linux 3.0) All versions No fix listed No fix yet
azure linux rust(Azure Linux 4.0) All versions No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.7 No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.7 No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.7 No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= V3.1.7 No fix listed No fix yet
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= V3.1.7 No fix listed No fix yet
ubuntu/libssh2(Ubuntu 22.04) All versions No fix listed No fix yet
azure linux libssh2(Azure Linux 3.0) < 1.11.1-4; All versions 1.11.1-4 Partially fixed
alpine/chromium-rust(Alpine v3.24) < 1.96.1-r0 1.96.1-r0 Fixed
alpine/libssh2(Alpine v3.21) < 1.11.1-r3 1.11.1-r3 Fixed
alpine/libssh2(Alpine v3.22) < 1.11.1-r3 1.11.1-r3 Fixed
alpine/libssh2(Alpine v3.23) < 1.11.1-r4 1.11.1-r4 Fixed
alpine/libssh2(Alpine v3.24) < 1.11.1-r4 1.11.1-r4 Fixed
alpine/rust(Alpine v3.24) < 1.96.1-r0 1.96.1-r0 Fixed
azure linux libssh2(Azure Linux 4.0) < 0:1.11.1-13.azl4 0:1.11.1-13.azl4 Fixed
debian/libssh2(Debian 12) < 1.10.0-3+deb12u1; = 1.10.0-3 1.10.0-3+deb12u1 Fixed
debian/libssh2(Debian 13) < 1.11.1-1+deb13u1; = 1.11.1-1 1.11.1-1+deb13u1 Fixed
debian/libssh2(Debian 14) < 1.11.1-4; = 1.11.1-1; = 1.11.1-2; = 1.11.1-3 1.11.1-4 Fixed
libssh2 <= 1.11.1 after 1.11.1 Fixed
redhat/libssh2-main(Red Hat hummingbird 1) < 1.11.1-9.hum1 1.11.1-9.hum1 Fixed
ubuntu/libssh2(Ubuntu 24.04) < 1.11.0-4.1ubuntu0.24.04.2 1.11.0-4.1ubuntu0.24.04.2 Fixed
ubuntu/libssh2(Ubuntu 26.04) < 1.11.1-1ubuntu0.26.04.2 1.11.1-1ubuntu0.26.04.2 Fixed

Affected products

ProductAffected versionsFixed in
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+deb13u1 1.11.1-1+deb13u1
debian/libssh2(Debian:13) = 1.11.1-1 No fix listed
debian/libssh2(Debian:14) < 1.11.1-4 1.11.1-4
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
redhat/libssh2-main(Red Hat:hummingbird:1) < 1.11.1-9.hum1 1.11.1-9.hum1
redhat/libssh2(Red Hat:rhel_els:6) All versions No fix listed
redhat/libssh2(Red Hat:rhel_els:7) All versions No fix listed
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
ubuntu/libssh2(Ubuntu:22.04) All versions No fix listed
alpine/chromium-rust(Alpine:v3.24) < 1.96.1-r0 1.96.1-r0
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
alpine/rust(Alpine:v3.24) < 1.96.1-r0 1.96.1-r0
ubuntu/libssh2(Ubuntu:24.04) < 1.11.0-4.1ubuntu0.24.04.2 1.11.0-4.1ubuntu0.24.04.2
Show 6 more
ProductAffected versionsFixed in
ubuntu/libssh2(Ubuntu:26.04) < 1.11.1-1ubuntu0.26.04.2 1.11.1-1ubuntu0.26.04.2
azure linux libssh2(Azure Linux:3.0) All versions No fix listed
azure linux libssh2(Azure Linux:3.0) < 1.11.1-4 1.11.1-4
azure linux libssh(Azure Linux:3.0) All versions No fix listed
azure linux libssh2(Azure Linux:4.0) < 0:1.11.1-13.azl4 0:1.11.1-13.azl4
azure linux rust(Azure Linux:4.0) All versions No fix listed

References