Libssh: incorrect return code handling in ssh_kdf() in libssh
Vulnerability 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.
Impact Analysis
Refer to official advisory for detailed impact metrics.
Remediation
Ensure systems are updated to the latest vendor-supplied patch levels.
Am I Vulnerable?
Launch our assessment wizard to check if your infrastructure is exposed to • CVE-2025-5372
Credits & Attribution
No credits recorded in the NVD database.
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
More from libssh
View All →Affected Vendor
libssh
View all reports →Affected Software
Timeline
CVSS Vectors
Weaknesses (CWE)
MITRE ATT&CK TTPs
No associated TTPs found for this vulnerability.