CVE-2026-66032
libssh2 Double-Free Heap Corruption via sftp_open()
Reported by vulncheck · Published July 24, 2026
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| libssh2 | Alpine | 1.11.1-r4, 1.11.1-r3 |
| libssh2-docs | Amazon Linux | 1.10.0-1.amzn2023.0.6, 1.4.3-12.amzn2.2.9 |
| cargo-c | Amazon Linux | 0.10.21-1.amzn2023.0.1 |
| libssh2 | Amazon Linux | 1.10.0-1.amzn2023.0.6, 1.4.3-12.amzn2.2.9 |
| libssh2-devel | Amazon Linux | 1.10.0-1.amzn2023.0.6, 1.4.3-12.amzn2.2.9 |
| libssh2 | libssh2 | 5e4776146552d898b9c0e1b313cd093fa8dc92d0, 1.11.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| libssh2 | libssh2 | 0, 5e4776146552d898b9c0e1b313cd093fa8dc92d0 |
| alpine | libssh2 | 0, 0 |
| amazon:2 | libssh2-docs | 0 |
| libssh2 | libssh2 | 5e4776146552d898b9c0e1b313cd093fa8dc92d0, 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) | 3.1.7 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) | 3.1.7 |
| amazon:2023 | cargo-c | 0 |
| amazon:2023 | libssh2 | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) | 3.1.7 |
| amazon:2023 | libssh2-docs | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | 3.1.7 |
| amazon:2 | libssh2 | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) | 3.1.7 |
| amazon:2023 | libssh2-devel | 0 |
| amazon:2 | libssh2-devel | 0 |
Timeline
- Jul 24, 2026 Coalition ESS Score
- Jul 24, 2026 CVE Published
- Jul 25, 2026 EPSS Score (30 in total, the first dated here)
- Jul 25, 2026 Security Advisory (5 in total, the first dated here)
- Aug 12, 2026 Distribution Patch (3 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-66032
vulnetix vdb fixes CVE-2026-66032
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-66032/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- Pull Request issue-trackingpatch
- Patch Commit patch
- third-party-advisory
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html url