# CVE-2025-5372: Libssh: incorrect return code handling in ssh_kdf() in libssh

- Severity: Medium 5.0 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 54% of CVEs (2026-12-01)
- Published: 2025-07-04T06:01:27.954Z
- Modified: 2026-11-26T04:43:26.028Z
- Weaknesses: CWE-682
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: redhat

## Description

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.

(As written by CVE List.)

## Affected

- libssh: before 0.11.2 (not affected: from 0:0.9.6-16.el8_10 before *; from 0:0.9.4-2.el8_4.2 before *; from 0:0.9.6-4.el8_6.2 before *; from 0:0.9.6-13.el8_8.2 before *; from 0:0.9.6-3.el9_0.2 before *)
- libssh2: no versions given
- openshift/ose-rhel-coreos-8: no versions given
- openshift/ose-rhel-coreos-9: no versions given
- libssh libssh: before 0.11.2
- redhat openshift_container_platform: 4.0
- redhat enterprise_linux: 6.0; 7.0; 8.0; 9.0; 10.0

## Every score

- redhat: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://access.redhat.com/errata/RHSA-2025:21977> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:23024> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:20610> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:24349> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:25911> (vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2025-5372> (third-party-advisory, vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2369388> (issue-tracking, third-party-advisory)

## Sources

- CVE List: [CVE-2025-5372](https://www.cve.org/CVERecord?id=CVE-2025-5372), CVE Terms of Use, modified 2026-11-26
- NVD: [CVE-2025-5372](https://nvd.nist.gov/vuln/detail/CVE-2025-5372), Public domain, modified 2026-11-24

---

Page: https://cve.day/CVE-2025-5372 · Whole record: https://cve.day/CVE-2025-5372.json · Rebuilt by cve.day 2026-11-26T04:57:22.502Z
