CVE-2025-5987

Name
CVE-2025-5987
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.
NVD Severity
unknown
Other trackers
Mailing lists
Exploits
Forges
GitHub (code, issues), Aports (code, issues)

References

Type URI
vdb-entry https://access.redhat.com/security/cve/CVE-2025-5987
issue-tracking https://bugzilla.redhat.com/show_bug.cgi?id=2376219

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:libssh:libssh:-:*:*:*:*:*:*:* libssh == None == -
cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:* libssh >= 0.10.0 < 0.11.2

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
libssh edge-community 0.11.2-r0 Natanael Copa <ncopa@alpinelinux.org> fixed
libssh edge-community 0.11.1-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
libssh edge-community 0.10.6-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
libssh 3.22-community 0.11.2-r0 Natanael Copa <ncopa@alpinelinux.org> fixed
libssh 3.22-community 0.11.1-r0 Natanael Copa <ncopa@alpinelinux.org> possibly vulnerable
libssh 3.22-community 0.10.6-r0 None possibly vulnerable