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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | chromium-rust | 1.96.1-r0 | ALPINE-CVE-2025-15661 |
| Alpine:v3.21 | libssh2 | 1.11.1-r3 | ALPINE-CVE-2025-15661 |
| Alpine:v3.22 | libssh2 | 1.11.1-r3 | ALPINE-CVE-2025-15661 |
| Alpine:v3.23 | libssh2 | 1.11.1-r4 | ALPINE-CVE-2025-15661 |
| Alpine:v3.24 | libssh2 | 1.11.1-r4 | ALPINE-CVE-2025-15661 |
| Alpine:v3.24 | rust | 1.96.1-r0 | ALPINE-CVE-2025-15661 |
| Debian:12 | libssh2 | 1.10.0-3+deb12u1 | DEBIAN-CVE-2025-15661 |
| Debian:13 | libssh2 | 1.11.1-1+deb13u1 | DEBIAN-CVE-2025-15661 |
| Debian:14 | libssh2 | 1.11.1-4 | DEBIAN-CVE-2025-15661 |
| Ubuntu:22.04:LTS | libssh2 | no fix listed | UBUNTU-CVE-2025-15661 |
| Ubuntu:24.04:LTS | libssh2 | 1.11.0-4.1ubuntu0.24.04.2 | UBUNTU-CVE-2025-15661 |
| Ubuntu:25.10 | libssh2 | 1.11.1-1ubuntu0.25.10.2 | UBUNTU-CVE-2025-15661 |
| Ubuntu:26.04:LTS | libssh2 | 1.11.1-1ubuntu0.26.04.2 | UBUNTU-CVE-2025-15661 |
Affected products (as reported)
Weakness: CWE-125 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
References
- Researcher Pull Request issue-tracking
- Maintainer Pull Request issue-tracking
- Patch Commit patch
- https://www.vulncheck.com/advisories/libssh2-heap-buffer-over-read-via-sftp-symlink-in-sftp-c third-party-advisory