# CVE-2025-5351: Libssh: double free vulnerability in libssh key export functions

- Severity: Medium 6.5 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.24%, higher than 69% of CVEs (2026-11-30)
- Published: 2025-07-04T08:16:47.122Z
- Modified: 2026-11-24T11:17:05.247Z
- Weaknesses: CWE-415
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

## Description

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.

(As written by CVE List.)

## Affected

- libssh: from 0.10.0 before 0.11.2 (not affected: from 0:0.10.4-18.el9 before *)
- libssh2: no versions given
- openshift/ose-rhel-coreos-8: no versions given
- openshift/ose-rhel-coreos-9: no versions given
- libssh libssh: from 0.10.0 before 0.11.2
- redhat openshift_container_platform: 4.0
- redhat enterprise_linux: 6.0; 7.0; 8.0; 9.0; 10.0

## Every score

- redhat: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://access.redhat.com/errata/RHSA-2026:18683> (vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2025-5351> (third-party-advisory, vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2369367> (issue-tracking, third-party-advisory)

## Sources

- CVE List: [CVE-2025-5351](https://www.cve.org/CVERecord?id=CVE-2025-5351), CVE Terms of Use, modified 2026-11-24
- NVD: [CVE-2025-5351](https://nvd.nist.gov/vuln/detail/CVE-2025-5351), Public domain, modified 2026-11-24

---

Page: https://cve.day/CVE-2025-5351 · Whole record: https://cve.day/CVE-2025-5351.json · Rebuilt by cve.day 2026-11-25T22:59:00.603Z
