cve.bz

CVE-2025-5351 Double Free

6.5 mediumEPSS 0.6%Fix available

Medium (6.5). EPSS 0.6% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

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
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 51st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-07-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-415 Double Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

  • Red Hat Red Hat Enterprise Linux 9: fixed in 0:0.10.4-18.el9
  • Debian, Ubuntu, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux, Alpine, Azure Linux, Alpaquita: fixed package versions per release

Ask an AI about this CVE

Show the promptExplain CVE-2025-5351 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-5351?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-5351?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-5351 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
libsshfrom 0.10.0 before 0.11.2

Fixed in

ProductFixed in
Red Hat Enterprise Linux 90:0.10.4-18.el9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12libssh0.10.6-0+deb12u2DEBIAN-CVE-2025-5351
Debian13, 14libssh0.11.2-1DEBIAN-CVE-2025-5351
Ubuntu22.04:LTSlibssh0.9.6-2ubuntu0.22.04.4USN-7619-1
Ubuntu24.04:LTSlibssh0.10.6-2ubuntu0.1UBUNTU-CVE-2025-5351 USN-7619-1
Red Hatenterprise_linux:9::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.10.4-18.el9RHSA-2026:18683
Red Hatenterprise_linux:9::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.10.4-18.el9RHSA-2026:18683
SUSELinux Micro 6.0libssh0.10.6-2.1SUSE-SU-2025:20557-1
SUSELinux Micro 6.1libssh0.10.6-slfo.1.1_2.1SUSE-SU-2025:20596-1
openSUSETumbleweedlibssh0.11.2-1.1openSUSE-SU-2025:15243-1
AlmaLinux9libssh, libssh-devel, libssh-config0.10.4-18.el9ALSA-2026:18683
Rocky Linux9libssh0:0.10.4-18.el9RLSA-2026:18683
Alpinev3.22, v3.23, v3.24libssh0.11.2-r0ALPINE-CVE-2025-5351
Azure Linux2libssh0.10.6-2AZL-64653
Azure Linux3libssh0.10.6-2AZL-64659
Alpaquita23, 25, streamlibssh0.11.2-r0BELL-CVE-2025-5351

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The Red Hat Product Security team has rated the severity of this issue as Moderate. The vulnerability arises from a double free condition that is only exploitable under rare and constrained scenarios such as low memory environments. Furthermore, exploitation requires an authenticated user with access to key export functionality, limiting the scope and impact. Despite the restricted preconditions, the flaw still presents a stability concern for services utilizing libssh in sensitive environments.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. Administrators should apply vendor-supplied patches as soon as they become available.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9libssh-0:0.10.4-18.el9Fixed 2026-05-19RHSA-2026:18683
Red Hat Enterprise Linux 10libsshFix deferred
Red Hat Enterprise Linux 6libssh2Out of support scope
Red Hat Enterprise Linux 7libssh2Out of support scope
Red Hat Enterprise Linux 8libsshFix deferred
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Fix deferred
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-5351.

References

Check your stackJSON