CVE-2025-5987
highA flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library.
Vendor / product: Libssh — libssh
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:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Affected products
Weakness classification (CWE)
Source: NVD / CISA. “NVD-CWE-Other” and “NVD-CWE-noinfo” mean NVD could not assign a specific weakness.
Mitigation & advisories
No vendor advisory or patch reference tagged by NVD. Check the references below.
References
- https://access.redhat.com/errata/RHSA-2025:23483 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2025:23484 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0427 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0428 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0430 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0431 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0702 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0978 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0980 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0985 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:0996 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:1539 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:1541 secalert@redhat.com
- https://access.redhat.com/errata/RHSA-2026:3415 secalert@redhat.com
- https://access.redhat.com/security/cve/CVE-2025-5987 secalert@redhat.com
- https://bugzilla.redhat.com/show_bug.cgi?id=2376219 secalert@redhat.com
- https://www.libssh.org/security/advisories/CVE-2025-5987.txt secalert@redhat.com

