Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
Unrated

Heap Buffer Over-read in libssh2 sftp_symlink()

IdentifiersCVE-2025-15661CWE-125

CVE-2025-15661 is an out-of-bounds heap read vulnerability in libssh2 through version 1.11.1, in the sftp_symlink() function in src/sftp.c. The flaw is triggered when libssh2 processes a crafted SSH_FXP_NAME response during SFTP READLINK or REALPATH operations. A malicious SSH server or a man-in-the-middle attacker can provide a link_len value larger than the actual packet data, and because the code does not properly validate the available packet buffer size before a memcpy operation, libssh2 performs a heap buffer over-read of up to target_len minus one bytes. This can expose adjacent heap memory contents and may also crash the client application.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can disclose heap memory from the libssh2 client process to a malicious SSH server or an active man-in-the-middle, potentially exposing sensitive process data resident in adjacent heap regions. The malformed response can also cause the client application to crash, resulting in denial of service for applications using libssh2 for SFTP operations. The provided content also notes broader advisory language that multiple libssh2 issues could potentially lead to arbitrary code execution, but for CVE-2025-15661 specifically the documented impact is heap memory disclosure and crash.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by avoiding connections to untrusted SFTP/SSH servers and by preventing active man-in-the-middle conditions through strict host key verification and protected transport paths. Limit or disable affected SFTP operations such as READLINK and REALPATH where operationally feasible. Monitor client applications using libssh2 for unexpected crashes during SFTP activity. These measures only reduce exploitability; patching is the definitive fix.

Remediation

Patch, then assume compromise.

Upgrade libssh2 to a patched release containing the fix for CVE-2025-15661. The issue is fixed upstream in commit 2dae3024897e1898d389835151f4e9606227721d. Versions through 1.11.1 are affected. Where distribution packages are used, apply the vendor-supplied security update; the provided content cites Debian stable (trixie) remediation via libssh2 version 1.11.1-1+deb13u1. If maintaining a custom build, incorporate the upstream fix and ensure packet-length and buffer-boundary validation is performed before memcpy when parsing SSH_FXP_NAME responses.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

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.

VendorProductType
DebianLibssh2application
Libssh2Libssh2application

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity8

Community discussion across Reddit, Mastodon, and other social sources.