CVE-2025-15661: Heap out-of-bounds read in libssh2 SFTP response handling
- Vendor
- Libssh2
CVE-2025-15661 is a heap out-of-bounds read vulnerability in the sftp_symlink() function in libssh2 through version 1.11.1. During SFTP READLINK and REALPATH operations, crafted SSH_FXP_NAME responses can specify a link_len larger than the available packet data. Missing packet-buffer bounds validation before memcpy() causes a heap over-read of up to target_len minus one bytes. A malicious SSH server or man-in-the-middle attacker able to deliver these responses can disclose heap memory contents or crash the client application.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Exploitation can expose heap memory belonging to the application using libssh2 and cause an application crash, resulting in confidentiality loss or denial of service. The read length is bounded by the caller's target_len minus one bytes. Arbitrary code execution and memory modification are not established impacts of this vulnerability.
Mitigation
If you can’t patch tonight, do this now.
Until patched, restrict outbound SSH/SFTP connections to trusted servers and enforce strict SSH host-key verification to reduce server-impersonation risk. Suspend workflows connecting to unverified endpoints where feasible. These controls do not protect against a compromised trusted server and do not replace the bounds-checking fix.
Remediation
Patch, then assume compromise.
Apply upstream commit 2dae302 or install a vendor-supported package or release confirmed to include that fix. Distribution-specific fixed packages include libssh2 1.10.0-3+deb12u1 for Debian 12 and 1.11.1-1+deb13u1 for Debian 13. Applicable Alpine Linux updates include libssh2 1.11.1-r4 or later. Update affected applications that bundle libssh2 as well as system-installed libraries.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2025-15661 exploited in the wild?
- As of Nov 26, 2026, Mallory has no reports of CVE-2025-15661 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-15661?
- As of Nov 26, 2026, Mallory has found no public exploit for CVE-2025-15661.
- Is there a patch for CVE-2025-15661?
- Apply upstream commit 2dae302 or install a vendor-supported package or release confirmed to include that fix. Distribution-specific fixed packages include libssh2 1.10.0-3+deb12u1 for Debian 12 and 1.11.1-1+deb13u1 for Debian 13.
- What products are affected by CVE-2025-15661?
- Libssh2.
- How severe is CVE-2025-15661?
- CVE-2025-15661 has a CVSS v4 score of 8.3 (High) and an EPSS score of 0.45% (31st percentile) as of Nov 26, 2026.
Recent activity
41 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.