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 (45.1th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 45th percentile — 45.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.005 · newest: 0.006 · change: +0.000
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 Enterprise Linux 9 — versions 0:0.10.4-18.el9
- Red Hat In-Vehicle Operating System 1
- 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 proof-of-concept exploits
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)
Frequently asked questions
- What is CVE-2025-5351?
- CVE-2025-5351 is a medium-severity vulnerability in Libssh, classified under Double Free. CVSS score: 6.5/10. Published 2025-07-04.
- How severe is CVE-2025-5351?
- Medium severity. CVSS v3 base score is 6.5 out of 10.
- Is CVE-2025-5351 known to be exploited?
- 1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.