CVE-2025-15661: libssh2 - Heap Buffer Over-read via sftp_symlink() in sftp.c
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.
Security readout for executives and security teams
Plain-English summary
A malicious SSH/SFTP server, or someone intercepting that connection, can make libssh2 read past a heap buffer. This may crash an affected client or expose limited process memory. The issue matters most where systems connect to untrusted or compromised SFTP endpoints.
Executive priority
Treat as a high-priority dependency update for systems that initiate SFTP connections. The business risk is service disruption and possible limited memory disclosure from clients that trust hostile or intercepted SSH servers.
Technical view
libssh2 through 1.11.1 has a CWE-125 heap over-read in sftp_symlink() handling SSH_FXP_NAME responses for SFTP READLINK and REALPATH. A crafted response can set link_len larger than available packet data, causing memcpy to read beyond the buffer. The bundle identifies commit 2dae302 as the fix.
Likely exposure
Exposure is likely in software that embeds or links libssh2 and acts as an SFTP client, especially automation, backup, transfer, or integration tools that connect to third-party SSH servers.
Exploitation context
The CVE is not marked KEV, and the supplied sources do not show active exploitation. Exploitation requires a malicious SSH server or man-in-the-middle position, but no credentials or user interaction are listed in the CVSS vector.
Researcher notes
Evidence supports a packet-length validation flaw in sftp_symlink() with impact limited to over-read disclosure or crash. The provided bundle names a fixing commit but not a fixed release version. Avoid claiming exploitation in the wild unless new KEV or vendor evidence appears.
Mitigation direction
Upgrade libssh2 to a vendor release containing commit 2dae302 when available.
Apply the referenced patch commit if maintaining a custom build.
Review distribution advisories for backported libssh2 fixes.
Restrict SFTP connections to trusted servers where feasible.
Enforce SSH host key verification to reduce man-in-the-middle risk.
Validation and detection
Inventory direct and transitive libssh2 usage across applications and appliances.
Check whether deployed libssh2 is through 1.11.1 or before commit 2dae302.
Identify workflows using SFTP READLINK or REALPATH against external servers.
Confirm vendor, OS, or container packages include the fix or backport.
Prioritize internet-facing automation that connects to third-party SFTP endpoints.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-125: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-125 · source CWE mapping
Out-of-bounds Read
Out-of-bounds Read represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.