Impact
A double‑free bug in the sftp_open() routine of libssh2 allows a malicious SSH server to corrupt the heap of any authenticated client that opens an SFTP session. The sequence requires the server to reply with SSH_FXP_STATUS containing FX_OK, followed by a packet that causes a second free of the same buffer. This condition enables glibc tcache duplication attacks that can overwrite function pointers, potentially leading to arbitrary code execution on the client system.
Affected Systems
Libssh2, the SSH client library, is affected in all releases up to and including version 1.11.1. The vulnerability was fixed by commit 5e47761, and any installation running a pre‑1.11.1 build is at risk.
Risk and Exploitability
The CVSS base score of 8.7 marks this as high severity, but the EPSS score of less than 1% indicates a very low probability of exploitation at present. The vulnerability is not listed in the CISA KEV catalog. Attackers require the ability to run a malicious SSH server and gain authenticated access to a client that uses libssh2 to open an SFTP session. The exploit path is straightforward: connect to the vulnerable server, send the specific sequence of status and packet responses, and trigger the double free, leading to heap corruption and potential code execution.
OpenCVE Enrichment