Libssh: double free vulnerability in libssh key export functions
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 2 fixed, 5 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-415 and the CVSS impact.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| libssh | libssh | 0.10.0 to before 0.11.2 | 0.11.2 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 9 | — | 0.10.4-18.el9 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 9 | — | 0.10.4-18.el9 | Patch available | CNA |
| Red Hat | Red Hat Enterprise Linux 10 | — | — | No fix listed | CNA |
| Red Hat | Red Hat Enterprise Linux 6 | — | — | No fix listed | CNA |
| Red Hat | Red Hat Enterprise Linux 7 | — | — | No fix listed | CNA |
| Red Hat | Red Hat Enterprise Linux 8 | — | — | No fix listed | CNA |
| Red Hat | Red Hat OpenShift Container Platform 4 | — | — | No fix listed | CNA |
| Red Hat | Red Hat OpenShift Container Platform 4 | — | — | No fix listed | CNA |
- libssh Vendorlibssh Affected 0.10.0 to before 0.11.2 Fixed in 0.11.2 Patch available CNA
- Red Hat Enterprise Linux 9 VendorRed Hat Affected — Fixed in 0.10.4-18.el9 Patch available CNA
- Red Hat Enterprise Linux 9 VendorRed Hat Affected — Fixed in 0.10.4-18.el9 Patch available CNA
- Red Hat Enterprise Linux 10 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat Enterprise Linux 6 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat Enterprise Linux 7 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat Enterprise Linux 8 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat OpenShift Container Platform 4 VendorRed Hat Affected — Fixed in — No fix listed CNA
- Red Hat OpenShift Container Platform 4 VendorRed Hat Affected — Fixed in — No fix listed CNA
CPE configurations NVD · 7
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:* | 0.10.0 to before 0.11.2 | Vulnerable | libssh |
| cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:* | 4.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:6.0:*:*:*:*:*:*:* | 6.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Red Hat |
- cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:* Versions 0.10.0 to before 0.11.2 Vulnerable ·libssh
- cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:* Versions 4.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Red Hat
Remediation
- Fix · CNA libssh (libssh) Fixed in 0.11.2
Red Hat 1 advisory
- RHSA-2026:18683 Released 2026-05-19 · Red Hat rating Moderatelibssh security update
- Red Hat Enterprise Linux AppStream (v. 9) libssh-devel-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 in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
libssh 0.11.2
2 records Highest priority Priority LOW 2 LOW
Other records, highest priority first
- TI-2025-04824 Libssh: incorrect return code handling in ssh_kdf() in libsshPriority LOW 39
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2026:18683 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2026:18683 |
Timeline
- 2026-10-02 Threatist record created from CVE-2025-5351
- 2026-10-03 Alias added: GHSA-pfqf-mv4p-9j4r
- 2026-11-07 EPSS moved to the 50th–90th percentile
References
More Libssh vulnerabilities
- TI-2018-07745 Improper authentication in [UNKNOWN] libssh CVSS 3.0CRITICAL 9.1
- TI-2023-26623 The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6… CVSS 3.1MEDIUM 5.9
- TI-2012-03902 Multiple integer overflows in libssh before 0.5.3 allow remote attackers to cause a… CVSS 2.0HIGH 7.5
- TI-2019-11093 OS command injection in Red Hat libssh CVSS 3.1HIGH 8.8
- TI-2026-00732 Libssh: libssh: denial of service via zero-length input in ssh_get_hexa() CVSS 3.1HIGH 8.2
- TI-2012-03900 Multiple buffer overflows in libssh before 0.5.3 allow remote attackers to cause a denial… CVSS 2.0HIGH 7.5
Sources
- CVE-2025-5351 · CVE Program
- CVE-2025-5351 · NVD
- FIRST EPSS
- GHSA-pfqf-mv4p-9j4r · GitHub Advisory Database · CC BY 4.0
- CVE-2025-5351 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences