Vulnerability Description
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.
CVSS Score
HIGH
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Libssh | Libssh | >= 0.10.0, < 0.11.2 |
Related Weaknesses (CWE)
References
- https://access.redhat.com/errata/RHSA-2025:23483
- https://access.redhat.com/errata/RHSA-2025:23484
- https://access.redhat.com/errata/RHSA-2026:0427
- https://access.redhat.com/errata/RHSA-2026:0428
- https://access.redhat.com/errata/RHSA-2026:0430
- https://access.redhat.com/errata/RHSA-2026:0431
- https://access.redhat.com/errata/RHSA-2026:0702
- https://access.redhat.com/errata/RHSA-2026:0978
- https://access.redhat.com/errata/RHSA-2026:0980
- https://access.redhat.com/errata/RHSA-2026:0985
- https://access.redhat.com/errata/RHSA-2026:0996
- https://access.redhat.com/errata/RHSA-2026:1539
- https://access.redhat.com/errata/RHSA-2026:1541
- https://access.redhat.com/errata/RHSA-2026:3415
- https://access.redhat.com/security/cve/CVE-2025-5987Third Party Advisory
FAQ
What is CVE-2025-5987?
CVE-2025-5987 is a vulnerability with a CVSS score of 8.1 (HIGH). 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 partiall...
How severe is CVE-2025-5987?
CVE-2025-5987 has been rated HIGH with a CVSS base score of 8.1/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2025-5987?
Check the references section above for vendor advisories and patch information. Affected products include: Libssh Libssh.