CVE-2025-5372 Libssh: incorrect return code handling in ssh_kdf() in libssh
HighCVSS 8.8
EPSS 0.51%
- Published
- Updated
- Exploit status
- No public exploit known
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner libssh(CBL-Mariner:2.0) | < 0.10.6-2 | 0.10.6-2 |
| azure linux libssh(Azure Linux:3.0) | < 0.10.6-2 | 0.10.6-2 |
| debian/libssh(Debian:12) | < 0.10.6-0+deb12u2 | 0.10.6-0+deb12u2 |
| debian/libssh(Debian:12) | = 0.10.5-2 | No fix listed |
| debian/libssh(Debian:12) | = 0.10.5-3 | No fix listed |
| debian/libssh(Debian:12) | = 0.10.5-3+hurd.1 | No fix listed |
| debian/libssh(Debian:12) | = 0.10.6-0+deb12u1 | No fix listed |
| debian/libssh(Debian:13) | < 0.11.2-1 | 0.11.2-1 |
| debian/libssh(Debian:14) | < 0.11.2-1 | 0.11.2-1 |
| libssh | < 0.11.2 | 0.11.2 |
| redhat enterprise linux | < 0:0.9.6-16.el8_10 | 0:0.9.6-16.el8_10 |
| redhat rhel aus | < 0:0.9.4-2.el8_4.2 | 0:0.9.4-2.el8_4.2 |
| redhat rhel eus long life | < 0:0.9.4-2.el8_4.2 | 0:0.9.4-2.el8_4.2 |
| redhat rhel aus | < 0:0.9.6-4.el8_6.2 | 0:0.9.6-4.el8_6.2 |
| redhat rhel eus long life | < 0:0.9.6-4.el8_6.2 | 0:0.9.6-4.el8_6.2 |
| redhat rhel e4s | < 0:0.9.6-13.el8_8.2 | 0:0.9.6-13.el8_8.2 |
| redhat rhel tus | < 0:0.9.6-13.el8_8.2 | 0:0.9.6-13.el8_8.2 |
| redhat rhel e4s | < 0:0.9.6-3.el9_0.2 | 0:0.9.6-3.el9_0.2 |
| redhat enterprise linux | = 10 | No fix listed |
| redhat rhel els | = 6 | No fix listed |
| redhat rhel els | = 7 | No fix listed |
| redhat enterprise linux | All versions | No fix listed |
| redhat openshift | All versions | No fix listed |
| redhat openshift | = 4 | No fix listed |
| ubuntu/libssh(Ubuntu:22.04) | < 0.9.6-2ubuntu0.22.04.4 | 0.9.6-2ubuntu0.22.04.4 |
Show 10 more
| Product | Affected versions | Fixed in |
|---|---|---|
| alpine/libssh(Alpine:v3.22) | < 0.11.2-r0 | 0.11.2-r0 |
| alpine/libssh(Alpine:v3.23) | < 0.11.2-r0 | 0.11.2-r0 |
| alpine/libssh(Alpine:v3.24) | < 0.11.2-r0 | 0.11.2-r0 |
| ubuntu/libssh(Ubuntu:24.04) | < 0.10.6-2ubuntu0.1 | 0.10.6-2ubuntu0.1 |
| redhat openshift container platform | = 4.0 | No fix listed |
| redhat enterprise linux | = 6.0 | No fix listed |
| redhat enterprise linux | = 7.0 | No fix listed |
| redhat enterprise linux | = 8.0 | No fix listed |
| redhat enterprise linux | = 9.0 | No fix listed |
| redhat enterprise linux | = 10.0 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- Debian Security Tracker CVE-2025-5372 vendor-advisory
- RHSA-2025:21977 vendor-advisory
- RHSA-2025:23024 vendor-advisory
- RHSA-2026:20610 vendor-advisory
- RHSA-2026:24349 vendor-advisory
- RHSA-2026:25911 vendor-advisory
- access.redhat.com third-party-advisory vdb-entry
- RHBZ#2369388 issue-tracking third-party-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7619-1 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking