Vulnerability · Published Jul 24, 2026 · Assigned by VulnCheck
CVE-2026-66032libssh2 Double-Free Heap Corruption via sftp_open()
High 8.8
In plain English
A high-severity double free 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.4% (higher than 39% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
libssh2 through 1.11.1, fixed in commit 5e47761, contains a double-free vulnerability in the sftp_open() function in src/sftp.c that allows a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the response data buffer is freed, and if a subsequent sftp_packet_require() call returns a specific error such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed a second time, enabling tcache dup conditions on glibc systems that allow overlapping allocations and function pointer overwrites.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.21 | libssh2 | 1.11.1-r3 | ALPINE-CVE-2026-66032 |
| Alpine:v3.22 | libssh2 | 1.11.1-r3 | ALPINE-CVE-2026-66032 |
| Alpine:v3.23 | libssh2 | 1.11.1-r4 | ALPINE-CVE-2026-66032 |
| Alpine:v3.24 | libssh2 | 1.11.1-r4 | ALPINE-CVE-2026-66032 |
| Debian:12 | libssh2 | 1.10.0-3+deb12u1 | DEBIAN-CVE-2026-66032 |
| Debian:13 | libssh2 | 1.11.1-1+deb13u2 | DEBIAN-CVE-2026-66032 |
| Debian:14 | libssh2 | 1.11.1-5 | DEBIAN-CVE-2026-66032 |
| Ubuntu:22.04:LTS | libssh2 | 1.10.0-3ubuntu0.1 | USN-8799-1 |
| Ubuntu:22.04:LTS | libssh2 | 1.10.0-3ubuntu0.1 | UBUNTU-CVE-2026-66032 |
| Ubuntu:24.04:LTS | libssh2 | 1.11.0-4.1ubuntu0.24.04.4 | USN-8722-1 |
| Ubuntu:24.04:LTS | libssh2 | 1.11.0-4.1ubuntu0.24.04.4 | UBUNTU-CVE-2026-66032 |
| Ubuntu:26.04:LTS | libssh2 | 1.11.1-1ubuntu0.26.04.4 | USN-8722-1 |
| Ubuntu:26.04:LTS | libssh2 | 1.11.1-1ubuntu0.26.04.4 | UBUNTU-CVE-2026-66032 |
Affected products (as reported)
Weakness: CWE-415 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- Pull Request issue-tracking, patch
- Patch Commit patch
- https://www.vulncheck.com/advisories/libssh2-double-free-heap-corruption-via-sftp-open third-party-advisory