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
EPSS: 0.005 (40.3th percentile) — read the EPSS interpretation.
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.
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
- Redhat Enterprise_linux — versions 6.0, 7.0, 8.0
- Redhat Openshift_container_platform — versions 4.0
Weakness classification (CWE)
Public proof-of-concept exploits
References
- secalert@redhat.com (x_refsource_REDHAT, Third Party Advisory, vdb-entry)
- secalert@redhat.com (x_refsource_REDHAT, issue-tracking, Third Party Advisory, Issue Tracking)
- secalert@redhat.com (x_refsource_REDHAT, 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.