Skip to content

CVE-2025-5351 Libssh: double free vulnerability in libssh key export functions

MediumCVSS 6.5 EPSS 0.63%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

A flaw was found in the key export functionality of libssh. The issue occurs in the internal function responsible for converting cryptographic keys into serialized formats. During error handling, a memory structure is freed but not cleared, leading to a potential double free issue if an additional failure occurs later in the function. This condition may result in heap corruption or application instability in low-memory scenarios, posing a risk to system reliability where key export operations are performed.

Upgrade path

14 packages: 10 fixed, 1 partially fixed, 1 with no fix yet.

PackageAffectedFixed inStatus
redhat openshift All versions No fix listed No fix yet
redhat enterprise linux < 0:0.10.4-18.el9; = 6.0; = 7.0; = 8.0 +3 more 0:0.10.4-18.el9 Partially fixed
alpine/libssh(Alpine v3.22) >= 0.10.0, < 0.11.2-r0 0.11.2-r0 Fixed
alpine/libssh(Alpine v3.23) >= 0.10.0, < 0.11.2-r0 0.11.2-r0 Fixed
alpine/libssh(Alpine v3.24) >= 0.10.0, < 0.11.2-r0 0.11.2-r0 Fixed
azure linux libssh(Azure Linux 3.0) < 0.10.6-2 0.10.6-2 Fixed
cbl-mariner libssh(CBL-Mariner 2.0) < 0.10.6-2 0.10.6-2 Fixed
debian/libssh(Debian 12) < 0.10.6-0+deb12u2; = 0.10.5-2; = 0.10.5-3; = 0.10.5-3+hurd.1 +1 more 0.10.6-0+deb12u2 Fixed
debian/libssh(Debian 13) < 0.11.2-1 0.11.2-1 Fixed
debian/libssh(Debian 14) < 0.11.2-1 0.11.2-1 Fixed
libssh >= 0.10.0, < 0.11.2 0.11.2 Fixed
ubuntu/libssh(Ubuntu 24.04) < 0.10.6-2ubuntu0.1 0.10.6-2ubuntu0.1 Fixed
redhat openshift container platform = 4.0 No fix listed Versions listed
redhat rhel els = 6; = 7 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
cbl-mariner libssh(CBL-Mariner:2.0) < 0.10.6-2 0.10.6-2
azure linux libssh(Azure Linux:3.0) < 0.10.6-2 0.10.6-2
debian/libssh(Debian:12) < 0.10.6-0+deb12u2 0.10.6-0+deb12u2
debian/libssh(Debian:12) = 0.10.5-2 No fix listed
debian/libssh(Debian:12) = 0.10.5-3 No fix listed
debian/libssh(Debian:12) = 0.10.5-3+hurd.1 No fix listed
debian/libssh(Debian:12) = 0.10.6-0+deb12u1 No fix listed
debian/libssh(Debian:13) < 0.11.2-1 0.11.2-1
debian/libssh(Debian:14) < 0.11.2-1 0.11.2-1
libssh >= 0.10.0, < 0.11.2 0.11.2
redhat enterprise linux < 0:0.10.4-18.el9 0:0.10.4-18.el9
redhat enterprise linux All versions No fix listed
redhat rhel els = 6 No fix listed
redhat rhel els = 7 No fix listed
redhat openshift All versions No fix listed
alpine/libssh(Alpine:v3.22) >= 0.10.0, < 0.11.2-r0 0.11.2-r0
alpine/libssh(Alpine:v3.23) >= 0.10.0, < 0.11.2-r0 0.11.2-r0
alpine/libssh(Alpine:v3.24) >= 0.10.0, < 0.11.2-r0 0.11.2-r0
ubuntu/libssh(Ubuntu:24.04) < 0.10.6-2ubuntu0.1 0.10.6-2ubuntu0.1
redhat openshift container platform = 4.0 No fix listed
redhat enterprise linux = 6.0 No fix listed
redhat enterprise linux = 7.0 No fix listed
redhat enterprise linux = 8.0 No fix listed
redhat enterprise linux = 9.0 No fix listed
redhat enterprise linux = 10.0 No fix listed

References