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… (CVE-2026-66032)
Description
libssh2 versions through 1.11.1 contain a double-free vulnerability in the sftp_open() function. This flaw allows a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session by freeing the same memory pointer twice under specific conditions. The issue was fixed in commit 5e47761.
CVSS v3.1
Score 8.8high
Affected software
pkg:deb/ubuntu/libssh2?arch=source&distro=esm-infra-legacy/trustypkg:deb/ubuntu/libssh2?arch=source&distro=esm-apps/xenialpkg:deb/ubuntu/libssh2?arch=source&distro=bionicpkg:deb/ubuntu/libssh2?arch=source&distro=focalpkg:deb/ubuntu/libssh2?arch=source&distro=jammypkg:deb/ubuntu/libssh2?arch=source&distro=noblepkg:deb/ubuntu/libssh2?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
libssh2 versions up to and including 1.11.1 have a double-free vulnerability in the sftp_open() function located in src/sftp.c. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the response data buffer is freed. If a subsequent sftp_packet_require() call returns an error such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed again. This double-free can lead to tcache duplication conditions on glibc systems, enabling overlapping memory allocations and potential function pointer overwrites. The vulnerability is fixed in commit 5e47761.
Potential Impact
A malicious SSH server can exploit this vulnerability to corrupt the heap of an authenticated client using libssh2 for SFTP sessions. This heap corruption may allow an attacker to overwrite function pointers, potentially leading to arbitrary code execution or denial of service on the client side.
Mitigation Recommendations
A fix is available and was introduced in commit 5e47761. Users should upgrade libssh2 to a version including this commit or later to remediate the vulnerability. No additional mitigation steps are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-66032
- Osv Schema Version
- 1.7.0
- Ecosystems
- ["Ubuntu:Pro:14.04:LTS","Ubuntu:Pro:16.04:LTS","Ubuntu:18.04:LTS","Ubuntu:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:26.04:LTS"]
- Cvss Version
- 3.1
Threat ID: 6a984573acd9273b496ad581
Added to database: 09/02/2026, 15:49:07 UTC
Last enriched: 09/07/2026, 22:08:54 UTC
Last updated: 10/16/2026, 06:48:18 UTC
Views: 42
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.