Vulnerability in Libssh
CVE-2025-5987
A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenSSL error code returned aliases with the SSH_OK code, resulting in libssh not properly detecting the error returned by the OpenSSL library. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.1 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.017 (77.2th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 77th percentile — 77.2% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.015 · newest: 0.017 · change: +0.002
Affected products
- Libssh
- Red Hat Enterprise Linux 10 — versions 0:0.11.1-5.el10_1
- Red Hat Enterprise Linux 10.0 Extended Update Support — versions 0:0.11.1-4.el10_0.1
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9 — versions 0:0.10.4-17.el9_7
- Red Hat Enterprise Linux 9.2 Update Services For SAP Solutions — versions 0:0.10.4-9.el9_2.2
- Red Hat Enterprise Linux 9.4 Extended Update Support — versions 0:0.10.4-13.el9_4.2
- Red Hat Enterprise Linux 9.6 Extended Update Support — versions 0:0.10.4-15.el9_6.1
Weakness classification (CWE)
Public proof-of-concept exploits
References
- access.redhat.com/errata/RHSA-2025:23483 (vendor-advisory)
- access.redhat.com/errata/RHSA-2025:23484 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0427 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0428 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0430 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0431 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0702 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0978 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0980 (vendor-advisory)
- access.redhat.com/errata/RHSA-2026:0985 (vendor-advisory)
Frequently asked questions
- What is CVE-2025-5987?
- CVE-2025-5987 is a high-severity vulnerability in Libssh, classified under CWE-393. CVSS score: 8.1/10. Published 2025-07-07.
- How severe is CVE-2025-5987?
- High severity. CVSS v3 base score is 8.1 out of 10.
- Is CVE-2025-5987 known to be exploited?
- 1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.