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 e
CVSS
8.1
High
EPSS
1.4%
p70
KEV
—
Exploit Today
21
0-100
Published: Jul 7, 2025 · Last modified: Jun 30, 2026 · CWE-393
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.
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2025:23483
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2025:23484
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0427
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0428
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0430
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0431
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0702
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0978
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0980
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0985
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:0996
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:1539
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:1541
- access.redhat.comhttps://access.redhat.com/errata/RHSA-2026:3415
- access.redhat.comhttps://access.redhat.com/security/cve/CVE-2025-5987
- bugzilla.redhat.comhttps://bugzilla.redhat.com/show_bug.cgi?id=2376219
- www.libssh.orghttps://www.libssh.org/security/advisories/CVE-2025-5987.txt