Double Free in Libssh
CVE-2025-5351
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.
Vulnerability class: Double Free
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.5 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS 0.006, 50.8th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Libssh — versions 0.10.0
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Openshift Container Platform 4
- Red Hat Enterprise Linux — versions 6.0, 7.0, 8.0
- Red Hat Openshift Container Platform — versions 4.0
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 1 other repository (8-cm/kube-dump). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- access.redhat.com/security/cve/CVE-2025-5351 (Third Party Advisory, vdb-entry)
- bugzilla.redhat.com/show_bug.cgi (issue-tracking, Third Party Advisory, Issue Tracking)
- access.redhat.com/errata/RHSA-2026:18683 (vendor-advisory)