CVE-2025-5351
published medium CVSS 3.1 · 6.5Libssh: double free vulnerability in libssh key export functions
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| libssh | — | libssh0.10.0 to < 0.11.2 · Other versions: unaffected | Affected | Not stated | redhat |
| Red Hat Enterprise Linux | 9 | libssh0:0.10.4-18.el9 and later · Other versions: affected | Unaffected | Not stated | redhat |
| Red Hat Enterprise Linux | 8, 10 | libssh | Affected | Not stated | redhat |
| Red Hat Enterprise Linux | 6, 7 | libssh2 | Unknown | Not stated | redhat |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1155 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 9 | libssh | Advisory build | 0.10.4-18.el9 | ALSA-2026:18683 |
| Alpine Linux | edge | libssh | Fixed | 0.11.2-r0 | Package fix record |
| Oracle Linux | 9 | libsshaarch64 | Advisory build | 0:0.10.4-18.el9 | ELSA-2026-18683 |
Show 79 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Red Hat | — | openshift/ose-rhel-coreos-8Red Hat OpenShift Container Platform 4 | Affected | Not stated | redhat |
| Red Hat | — | openshift/ose-rhel-coreos-9Red Hat OpenShift Container Platform 4 | Affected | Not stated | redhat |
| Red Hat Enterprise Linux | RHEL-9 | libsshaarch64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Ubuntu | noble | libssh | Advisory build | 0.10.6-2ubuntu0.1 | USN-7619-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-configaarch64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| Amazon Linux | AL2023 | libsshaarch64 | Listed in advisory | Not stated | ALAS2023-2025-1155 |
| Rocky Linux | 9 | libsshaarch64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Alpine Linux | v3.22 | libssh | Fixed | 0.11.2-r0 | Package fix record |
| Alpine Linux | v3.23 | libssh | Fixed | 0.11.2-r0 | Package fix record |
| Alpine Linux | v3.24 | libssh | Fixed | 0.11.2-r0 | Package fix record |
| Oracle Linux | 9 | libsshx86_64 | Advisory build | 0:0.10.4-18.el9 | ELSA-2026-18683 |
| Red Hat Enterprise Linux | RHEL-9 | libsshi686 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libsshppc64le | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libsshs390x | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libsshsrc | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libsshx86_64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| AlmaLinux | 9 | libssh-config | Advisory build | 0.10.4-18.el9 | ALSA-2026:18683 |
| AlmaLinux | 9 | libssh-devel | Advisory build | 0.10.4-18.el9 | ALSA-2026:18683 |
| Oracle Linux | 9 | libssh-configaarch64 | Advisory build | 0:0.10.4-18.el9 | ELSA-2026-18683 |
| Oracle Linux | 9 | libssh-configx86_64 | Advisory build | 0:0.10.4-18.el9 | ELSA-2026-18683 |
| Oracle Linux | 9 | libssh-develaarch64 | Advisory build | 0:0.10.4-18.el9 | ELSA-2026-18683 |
| Oracle Linux | 9 | libssh-develx86_64 | Advisory build | 0:0.10.4-18.el9 | ELSA-2026-18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-confignoarch | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debuginfoaarch64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debuginfoi686 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debuginfoppc64le | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debuginfos390x | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debuginfox86_64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debugsourceaarch64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debugsourcei686 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debugsourceppc64le | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debugsources390x | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-debugsourcex86_64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-develaarch64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-develi686 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-develppc64le | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-devels390x | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| Red Hat Enterprise Linux | RHEL-9 | libssh-develx86_64 | Advisory build | 0.10.4-18.el9 | RHSA-2026:18683 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-configppc64le | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-configs390x | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-configx86_64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-develaarch64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-develppc64le | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-devels390x | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh-develx86_64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4aarch64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4ppc64le | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4s390x | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4x86_64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4-32bitaarch64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4-32bitppc64le | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4-32bits390x | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libssh4-32bitx86_64 | Advisory build | 0.11.2-1.1 | OPENSUSE-SU-2025:15243-1 |
| Ubuntu | noble | libssh-4 | Advisory build | 0.10.6-2ubuntu0.1 | USN-7619-1 |
| Ubuntu | noble | libssh-gcrypt-4 | Advisory build | 0.10.6-2ubuntu0.1 | USN-7619-1 |
| Amazon Linux | AL2023 | libsshnoarch | Listed in advisory | Not stated | ALAS2023-2025-1155 |
| Amazon Linux | AL2023 | libsshsrc | Listed in advisory | Not stated | ALAS2023-2025-1155 |
| Amazon Linux | AL2023 | libsshx86_64 | Listed in advisory | Not stated | ALAS2023-2025-1155 |
| Rocky Linux | 9 | libsshi686 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libsshppc64le | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libsshs390x | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libsshsrc | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libsshx86_64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-confignoarch | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debuginfoaarch64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debuginfoi686 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debuginfoppc64le | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debuginfos390x | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debuginfox86_64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debugsourceaarch64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debugsourcei686 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debugsourceppc64le | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debugsources390x | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-debugsourcex86_64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-develaarch64 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-develi686 | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-develppc64le | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-devels390x | Listed in advisory | Not stated | RLSA-2026:18683 |
| Rocky Linux | 9 | libssh-develx86_64 | Listed in advisory | Not stated | RLSA-2026:18683 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- redhat · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| libssh | libssh | 0.10.0 to < 0.11.2 (affected · semver)Default: unaffected | redhat · cna |
| Red Hat | Red Hat Enterprise Linux 9 | 0:0.10.4-18.el9 and later (unaffected · rpm)Default: affected | redhat · cna |
| Red Hat | Red Hat Enterprise Linux 9 | 0:0.10.4-18.el9 and later (unaffected · rpm)Default: affected | redhat · cna |
| Red Hat | Red Hat Enterprise Linux 10 | Default: affected | redhat · cna |
| Red Hat | Red Hat Enterprise Linux 6 | Default: unknown | redhat · cna |
| Red Hat | Red Hat Enterprise Linux 7 | Default: unknown | redhat · cna |
| Red Hat | Red Hat Enterprise Linux 8 | Default: affected | redhat · cna |
| Red Hat | Red Hat OpenShift Container Platform 4 | Default: affected | redhat · cna |
| Red Hat | Red Hat OpenShift Container Platform 4 | Default: affected | redhat · cna |
Weaknesses
1- CWE-415 Double Free
References
3- RHSA-2026:18683 https://access.redhat.com/errata/RHSA-2026:18683
- https://access.redhat.com/security/cve/CVE-2025-5351
- RHBZ#2369367 https://bugzilla.redhat.com/show_bug.cgi?id=2369367
Provider assertions
2redhat · cna
Libssh: double free vulnerability in libssh key export functions
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 20d5934b4a107adf993d5f93d46196397228d3a06f4dff65106910638315f29d
- Ingested
- 24 Nov 2026, 10:53:20 UTC
- Source record
- Official CVE record