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.
How to fix
- libssh libssh0.11.2 or later
- access.redhat.com/errata/RHSA-2025:23483
- access.redhat.com/errata/RHSA-2025:23484
- access.redhat.com/errata/RHSA-2026:0427
- access.redhat.com/errata/RHSA-2026:0428
- access.redhat.com/errata/RHSA-2026:0430
- access.redhat.com/errata/RHSA-2026:0431
- access.redhat.com/errata/RHSA-2026:0702
- access.redhat.com/errata/RHSA-2026:0978
- access.redhat.com/errata/RHSA-2026:0980
- access.redhat.com/errata/RHSA-2026:0985
- access.redhat.com/errata/RHSA-2026:0996
- access.redhat.com/errata/RHSA-2026:1539
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| libssh libssh | 0.10.0 ≤ v < 0.11.2 | 0.11.2 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.