CVE-2025-5351

Libssh: double free vulnerability in libssh key export functions

CVE-2025-5351 is fixed in 7 products on 1 platform, first by libssh-4 0.10.6-2ubuntu0.1, released June 24, 2025. It is not reported as exploited. Patch Radar priority: Routine.

Routine
CVSS
6.5
Moderate
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0063
50th percentile

A flaw was found in the key export functionality of libssh. The issueoccurs in the internal function responsible for converting cryptographickeys into serialized formats. During error handling, a memory structure isfreed but not cleared, leading to a potential double free issue if anadditional failure occurs later in the function. This condition may resultin heap corruption or application instability in low-memory scenarios,posing a risk to system reliability where key export operations areperformed.

Where it's fixed

ProductFixed inFixReleased
Linux
libssh · Debian 12.15 (bookworm) 0.10.6-0+deb12u2 DEBIAN-CVE-2025-5351 Jul 4, 2025
libssh · Debian 13.5 (trixie) 0.11.2-1 DEBIAN-CVE-2025-5351 Jul 4, 2025
libssh · Debian 14 0.11.2-1 DEBIAN-CVE-2025-5351 Jul 4, 2025
libssh · RHEL 9 0:0.10.4-18.el9 RHSA-2026:18683 May 27, 2026
libssh · almalinux 9 0.10.4-18.el9 ALSA-2026:18683 May 19, 2026
libssh · amzn 2023 0.10.6-1.amzn2023.0.2 ALAS2023-2025-1155 Aug 18, 2025
libssh · ol 9 0:0.10.4-18.el9 ELSA-2026-18683 Jun 12, 2026
libssh · rocky 9 0:0.10.4-18.el9 RLSA-2026:18683 May 28, 2026
libssh-4 · Ubuntu 24.04.5 LTS (noble) 0.10.6-2ubuntu0.1 libssh-4 0.10.6-2ubuntu0.1 Jun 24, 2025
libssh-4 · Ubuntu 24.10 (oracular) 0.10.6-3ubuntu1.1 libssh-4 0.10.6-3ubuntu1.1 Jun 25, 2025
libssh-4 · Ubuntu 25.04 (plucky) 0.11.1-1ubuntu0.1 libssh-4 0.11.1-1ubuntu0.1 Jun 25, 2025
libssh-config · RHEL 9 0:0.10.4-18.el9 RHSA-2026:18683 May 27, 2026
libssh-config · almalinux 9 0.10.4-18.el9 ALSA-2026:18683 May 19, 2026
libssh-config · amzn 2023 0.10.6-1.amzn2023.0.2 ALAS2023-2025-1155 Aug 18, 2025
libssh-config · ol 9 0:0.10.4-18.el9 ELSA-2026-18683 Jun 12, 2026
libssh-debuginfo · amzn 2023 0.10.6-1.amzn2023.0.2 ALAS2023-2025-1155 Aug 18, 2025
libssh-debugsource · amzn 2023 0.10.6-1.amzn2023.0.2 ALAS2023-2025-1155 Aug 18, 2025
libssh-devel · RHEL 9 0:0.10.4-18.el9 RHSA-2026:18683 May 27, 2026
libssh-devel · almalinux 9 0.10.4-18.el9 ALSA-2026:18683 May 19, 2026
libssh-devel · amzn 2023 0.10.6-1.amzn2023.0.2 ALAS2023-2025-1155 Aug 18, 2025
libssh-devel · ol 9 0:0.10.4-18.el9 ELSA-2026-18683 Jun 12, 2026
libssh-gcrypt-4 · Ubuntu 24.04.5 LTS (noble) 0.10.6-2ubuntu0.1 libssh-gcrypt-4 0.10.6-2ubuntu0.1 Jun 24, 2025
libssh-gcrypt-4 · Ubuntu 24.10 (oracular) 0.10.6-3ubuntu1.1 libssh-gcrypt-4 0.10.6-3ubuntu1.1 Jun 25, 2025

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.