Vulnerability · Published Jun 18, 2026 · Assigned by VulnCheck

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

Medium 6.5

In plain English

A medium-severity out-of-bounds read in libssh2 from libssh2. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 51% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.6%top 48.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.24chromium-rust1.96.1-r0ALPINE-CVE-2025-15661
Alpine:v3.21libssh21.11.1-r3ALPINE-CVE-2025-15661
Alpine:v3.22libssh21.11.1-r3ALPINE-CVE-2025-15661
Alpine:v3.23libssh21.11.1-r4ALPINE-CVE-2025-15661
Alpine:v3.24libssh21.11.1-r4ALPINE-CVE-2025-15661
Alpine:v3.24rust1.96.1-r0ALPINE-CVE-2025-15661
Debian:12libssh21.10.0-3+deb12u1DEBIAN-CVE-2025-15661
Debian:13libssh21.11.1-1+deb13u1DEBIAN-CVE-2025-15661
Debian:14libssh21.11.1-4DEBIAN-CVE-2025-15661
Ubuntu:22.04:LTSlibssh2no fix listedUBUNTU-CVE-2025-15661
Ubuntu:24.04:LTSlibssh21.11.0-4.1ubuntu0.24.04.2UBUNTU-CVE-2025-15661
Ubuntu:25.10libssh21.11.1-1ubuntu0.25.10.2UBUNTU-CVE-2025-15661
Ubuntu:26.04:LTSlibssh21.11.1-1ubuntu0.26.04.2UBUNTU-CVE-2025-15661

Affected products (as reported)

VendorProductVersions
libssh2 libssh2 0 – through 1.11.1

Weakness: CWE-125 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H

References