« List of all CVEs

CVE-2025-5987

Libssh: invalid return code for chacha20 poly1305 with openssl backend

Published: 7/7/2025 Last updated: 1/22/2026 Reserved: 6/10/2025

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.

CNA assigner: redhat (53f830b8-0a3f-465b-8143-3b8a9948e749) Requested by: n/a

Metrics

Version Score Severity Vector String
3.1 8.1 High CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Opam packages affected (1)

libssh

Products affected (18)

Product Vendor Version
Red Hat Enterprise Linux 9 Red Hat < 10.0.17763.6414
Red Hat Enterprise Linux 9 Red Hat < 10.0.17763.6414
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions Red Hat < 10.0.20348.2762
Red Hat Enterprise Linux 9.4 Extended Update Support Red Hat < 10.0.25398.1189
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat < 10.0.14393.7428
Red Hat Enterprise Linux 9 Red Hat <= *
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions Red Hat n/a
Red Hat Enterprise Linux 9.4 Extended Update Support Red Hat < 9.4.3
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat 3.4.0
Red Hat Enterprise Linux 8 Red Hat < 6.0.6003.22918
6.11
Red Hat Enterprise Linux 10 Red Hat < 6.11
Red Hat Enterprise Linux 10.0 Extended Update Support Red Hat <= 6.12.*
Red Hat Enterprise Linux 9 Red Hat <= 6.15.*
Red Hat Enterprise Linux 6 Red Hat < 10.0.14393.7428
Red Hat Enterprise Linux 7 Red Hat < 6.0.6003.22918
Red Hat OpenShift Container Platform 4.17 Red Hat <= 1.22.0
Red Hat OpenShift Container Platform 4 Red Hat < 6.0.6003.22918

References (17)