CVE-2025-5351
Libssh: double free vulnerability in libssh key export functions
CVSS Score
6.5
EPSS Score
0.0%
EPSS Percentile
0th
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.
| CWE | CWE-415 |
| Vendor | libssh |
| Product | libssh |
| Published | Jul 4, 2025 |
| Last Updated | Jan 8, 2026 |
Stay Ahead of the Next One
Get instant alerts for libssh libssh
Be the first to know when new medium vulnerabilities affecting libssh libssh are published โ delivered to Slack, Telegram or Discord.
Get Free Alerts โ
Free ยท No credit card ยท 60 sec setup
CVSS v3 Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Affected Versions
libssh / libssh
0.10.0 < 0.11.2
Red Hat / Red Hat Enterprise Linux 10
All versions affected Red Hat / Red Hat Enterprise Linux 6
All versions affected Red Hat / Red Hat Enterprise Linux 7
All versions affected Red Hat / Red Hat Enterprise Linux 8
All versions affected Red Hat / Red Hat Enterprise Linux 9
All versions affected Red Hat / Red Hat OpenShift Container Platform 4
All versions affected References
Credits
Red Hat would like to thank Ronald Crane for reporting this issue.