« List of all CVEs

CVE-2025-5987

Libssh: invalid return code for chacha20 poly1305 with openssl backend

Published: 7/7/2025 Last updated: 3/20/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
< 10.0.17763.6893
Red Hat Enterprise Linux 10 Red Hat < 10.0.19044.5371
Red Hat Enterprise Linux 10.0 Extended Update Support Red Hat < 10.0.26100.3775
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions Red Hat < 10.0.14393.7699
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat < 16.103.25110922
Red Hat Enterprise Linux 8 Red Hat < 10.0.17763.6893
Red Hat Enterprise Linux 10 Red Hat < 10.0.10240.20947
Red Hat Enterprise Linux 9 Red Hat < 6.1.7601.27520
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat < 10.0.19044.5608
Red Hat Enterprise Linux 7 Red Hat < 10.0.14393.8066
Red Hat OpenShift Container Platform 4.17 Red Hat < 10.0.19044.5371
Red Hat OpenShift Container Platform 4.20 Red Hat < 6.1.7601.27820
Red Hat OpenShift Container Platform 4.13 Red Hat < 10.0.22631.5189
Red Hat OpenShift Container Platform 4.14 Red Hat < 10.0.19045.5371
Red Hat OpenShift Container Platform 4.16 Red Hat < 6.1.7601.27520
Red Hat OpenShift Container Platform 4.17 Red Hat < 10.0.17763.6775
Red Hat OpenShift Container Platform 4.14 Red Hat < 10.0.26100.4652
Red Hat OpenShift Container Platform 4.18 Red Hat < 10.0.26100.4061

References (34)