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

- Priority: **Routine**
- Reason: Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-07-04 · Modified: 2026-11-24
- Aliases: UBUNTU-CVE-2025-5351, DEBIAN-CVE-2025-5351, ALPINE-CVE-2025-5351
- Record: https://cvemate.com/vulnerability/CVE-2025-5351 · JSON: https://cvemate.com/vulnerability/CVE-2025-5351/json

## Description

```text
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.
```

## Signals

- CVSS: 6.5 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.808%, percentile 58.171%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine libssh (Alpine Linux): ≥ 0.10.0, \< 0.11.2-r0
- debian libssh (Debian): \< 0.10.6-0+deb12u2 \| \< 0.11.2-1
- ubuntu libssh (Ubuntu): \< 0.10.6-2ubuntu0.1
- libssh libssh: ≥ 0.10.0, \< 0.11.2
- redhat enterprise\_linux: 6.0 \| 7.0 \| 8.0 \| 9.0 \| 10.0
- redhat openshift\_container\_platform: 4.0

## References

- <https://access.redhat.com/errata/RHSA-2026:18683>
- <https://access.redhat.com/security/cve/CVE-2025-5351>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2369367>
- <https://ubuntu.com/security/CVE-2025-5351>
- <https://www.cve.org/CVERecord?id=CVE-2025-5351>
- <https://www.libssh.org/security/advisories/CVE-2025-5351.txt>
- <https://ubuntu.com/security/notices/USN-7619-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-5351>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-5351>
- <https://security.alpinelinux.org/vuln/CVE-2025-5351>

---

Data as of 2026-12-05T07:09:02.714Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
