# CVE-2025-5372: Libssh: incorrect return code handling in ssh\_kdf() in libssh

- Priority: **Routine**
- Reason: Not severe (CVSS 5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-07-04 · Modified: 2026-11-26
- Aliases: RHSA-2025:21977, RHSA-2025:23024, RHSA-2026:20610, RHSA-2026:24349, RHSA-2026:25911, UBUNTU-CVE-2025-5372, DEBIAN-CVE-2025-5372, ALPINE-CVE-2025-5372
- Record: https://cvemate.com/vulnerability/CVE-2025-5372 · JSON: https://cvemate.com/vulnerability/CVE-2025-5372/json

## Description

```text
A flaw was found in libssh versions built with OpenSSL versions older than 3.0, specifically in the ssh_kdf() function responsible for key derivation. Due to inconsistent interpretation of return values where OpenSSL uses 0 to indicate failure and libssh uses 0 for success—the function may mistakenly return a success status even when key derivation fails. This results in uninitialized cryptographic key buffers being used in subsequent communication, potentially compromising SSH sessions' confidentiality, integrity, and availability.
```

## Signals

- CVSS: 8.8 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.705%, percentile 54.734%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine libssh (Alpine Linux): \< 0.11.2-r0
- debian libssh (Debian): \< 0.10.6-0+deb12u2 \| \< 0.11.2-1
- ubuntu libssh (Ubuntu): All versions (No fix recorded) \| \< 0.9.6-2ubuntu0.22.04.4 \| \< 0.10.6-2ubuntu0.1
- libssh libssh: \< 0.11.2
- redhat enterprise\_linux: 6.0 \| 7.0 \| 8.0 \| 9.0 \| 10.0
- redhat openshift\_container\_platform: 4.0
- redhat libssh (Red Hat): \< 0:0.9.6-16.el8\_10 \| \< 0:0.9.6-3.el9\_0.2 \| \< 0:0.9.6-13.el8\_8.2 \| \< 0:0.9.4-2.el8\_4.2 \| \< 0:0.9.6-4.el8\_6.2
- redhat libssh-config (Red Hat): \< 0:0.9.6-16.el8\_10 \| \< 0:0.9.6-3.el9\_0.2 \| \< 0:0.9.6-13.el8\_8.2 \| \< 0:0.9.4-2.el8\_4.2 \| \< 0:0.9.6-4.el8\_6.2
- redhat libssh-debuginfo (Red Hat): \< 0:0.9.6-16.el8\_10 \| \< 0:0.9.6-3.el9\_0.2 \| \< 0:0.9.6-13.el8\_8.2 \| \< 0:0.9.4-2.el8\_4.2 \| \< 0:0.9.6-4.el8\_6.2
- redhat libssh-debugsource (Red Hat): \< 0:0.9.6-16.el8\_10 \| \< 0:0.9.6-3.el9\_0.2 \| \< 0:0.9.6-13.el8\_8.2 \| \< 0:0.9.4-2.el8\_4.2 \| \< 0:0.9.6-4.el8\_6.2
- redhat libssh-devel (Red Hat): \< 0:0.9.6-16.el8\_10 \| \< 0:0.9.6-3.el9\_0.2 \| \< 0:0.9.6-13.el8\_8.2 \| \< 0:0.9.4-2.el8\_4.2 \| \< 0:0.9.6-4.el8\_6.2

## References

- <https://access.redhat.com/errata/RHSA-2025:21977>
- <https://access.redhat.com/errata/RHSA-2025:23024>
- <https://access.redhat.com/errata/RHSA-2026:20610>
- <https://access.redhat.com/errata/RHSA-2026:24349>
- <https://access.redhat.com/errata/RHSA-2026:25911>
- <https://access.redhat.com/security/cve/CVE-2025-5372>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2369388>
- <https://access.redhat.com/security/updates/classification/#moderate>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2025/rhsa-2025_21977.json>
- <https://www.cve.org/CVERecord?id=CVE-2025-5372>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-5372>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2025/rhsa-2025_23024.json>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_20610.json>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_24349.json>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_25911.json>
- <https://ubuntu.com/security/CVE-2025-5372>
- <https://www.libssh.org/security/advisories/CVE-2025-5372.txt>
- <https://ubuntu.com/security/notices/USN-7619-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-5372>
- <https://security.alpinelinux.org/vuln/CVE-2025-5372>

---

Data as of 2026-12-05T09:58:09.280Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
