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

Weakness classification (CWE)

Public proof-of-concept exploits

References

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.