Skip to content
Fencer Vulns
medium 6.5

CVE-2025-5351 json

Libssh: double free vulnerability in libssh key export functions

published 2025-07-04 16 mo ago modified 2026-11-05 3 d ago also EUVD-2025-19935 , JLSEC-2025-98

cvss
6.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 50%
public exploits
0
none known

Summary

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.

Patch / fix

  • julia libssh_jll 0.11.3+0
  • libssh libssh 0.11.2
  • Red Hat Red Hat Enterprise Linux 9 0:0.10.4-18.el9
  • libssh Debian 12 0.10.6-0+deb12u2
  • libssh Debian 14, Debian 13 0.11.2-1

debian advisories DEBIAN-CVE-2025-5351

  • libssh Ubuntu 24.04 LTS 0.10.6-2ubuntu0.1

ubuntu advisories UBUNTU-CVE-2025-5351

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • libssh RHEL 9 0.10.4-18.el9
  • libssh-config RHEL 9 0.10.4-18.el9

red hat advisories RHSA-2026:18683

  • libssh Linux Micro 6.1 0.10.6-slfo.1.1_2.1
  • libssh Linux Micro 6.0 0.10.6-2.1

suse advisories SUSE-SU-2025:20596-1SUSE-SU-2025:20557-1

  • libssh openSUSE Tumbleweed 0.11.2-1.1

opensuse advisories openSUSE-SU-2025:15243-1

  • libssh AlmaLinux 9 0.10.4-18.el9
  • libssh-config AlmaLinux 9 0.10.4-18.el9

almalinux advisories ALSA-2026:18683

  • libssh Rocky Linux 9 0.10.4-18.el9

rocky linux advisories RLSA-2026:18683

  • libssh Alpine 3.24, Alpine 3.23, Alpine 3.22 0.11.2-r0

alpine advisories ALPINE-CVE-2025-5351

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • libssh CBL-Mariner 2.0, Azure Linux 3.0 0.10.6-2

azure linux advisories AZL-64653AZL-64659

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-5351 updated cvss 6.5

libssh: Double Free Vulnerability in libssh Key Export Functions

  • Red Hat Enterprise Linux 6 libssh2 Red Hat Enterprise Linux 7 libssh2
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 libssh, libssh-config Red Hat Enterprise Linux 10 libssh Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    affected: workaround, no fix available “Fix deferred”
  • Red Hat Enterprise Linux AppStream (v. 9) libssh-devel 0.10.4-18.el9, libssh-debuginfo 0.10.4-18.el9, libssh-debugsource 0.10.4-18.el9 Red Hat Enterprise Linux BaseOS (v. 9) libssh 0.10.4-18.el9, libssh-config 0.10.4-18.el9
    fixed: vendor fix RHSA-2026:18683

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
16 mo ago

Exploit prediction

0.63% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
OSV 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
julia libssh_jll
<0.11.3+0
0.11.3+0

Affected products

  • libssh libssh
  • Red Hat Red Hat Enterprise Linux 9
  • Red Hat Red Hat Enterprise Linux 10
  • Red Hat Red Hat Enterprise Linux 6
  • Red Hat Red Hat Enterprise Linux 7
  • Red Hat Red Hat Enterprise Linux 8
  • Red Hat Red Hat OpenShift Container Platform 4

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.