CVE-2025-5372Libssh: incorrect return code handling in ssh_kdf() in libssh
- 5.0MediumCVSS base score
- 0.51%Exploitation in 30 daysEPSS · top 56% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By redhat
- 35 days later
· 35 days later
Published
- 16 months later
· 16 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium5.0 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.51% · top 56% of all CVEs (12 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.0.
Affected products
- affected < 0.11.2
Red Hat · Red Hat Enterprise Linux 8
- unaffected 0:0.9.6-16.el8_10 – < *
Red Hat · Red Hat Enterprise Linux 8
- unaffected 0:0.9.6-16.el8_10 – < *
Red Hat · Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
- unaffected 0:0.9.4-2.el8_4.2 – < *
Red Hat · Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On
- unaffected 0:0.9.4-2.el8_4.2 – < *
Red Hat · Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
- unaffected 0:0.9.6-4.el8_6.2 – < *
Red Hat · Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On
- unaffected 0:0.9.6-4.el8_6.2 – < *
Red Hat · Red Hat Enterprise Linux 8.8 Telecommunications Update Service
- unaffected 0:0.9.6-13.el8_8.2 – < *
Red Hat · Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
- unaffected 0:0.9.6-13.el8_8.2 – < *
Red Hat · Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions
- unaffected 0:0.9.6-3.el9_0.2 – < *
Red Hat · Red Hat Enterprise Linux 10
All versions: unaffected
Red Hat · Red Hat Enterprise Linux 6
All versions: unknown
Red Hat · Red Hat Enterprise Linux 7
All versions: unknown
Red Hat · Red Hat Enterprise Linux 9
All versions: affected
Red Hat · Red Hat OpenShift Container Platform 4
All versions: affected
Red Hat · Red Hat OpenShift Container Platform 4
All versions: unaffected
What to do
Workaround: To mitigate this issue, administrators should ensure that libssh is built against OpenSSL version 3.0 or later. This change eliminates the return code mismatch and prevents the erroneous use of uninitialized key material. It is also strongly recommended to apply vendor supplied patches or update to the latest libssh security release as soon as possible.
References
References7
- RHSA-2025:21977 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2025:23024 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:20610 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:24349 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2026:25911 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2025-5372 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2369388 (opens in a new tab)issue-trackingx_refsource_REDHAT
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2025-19931 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2025-5372)Record last updated .