« List of all CVEs

CVE-2025-5987

Libssh: invalid return code for chacha20 poly1305 with openssl backend

Published: 7/7/2025 Last updated: 3/5/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 (23)

Product Vendor Version
Red Hat Enterprise Linux 8 Red Hat < 10.0.26100.2894
Red Hat Enterprise Linux 10 Red Hat < https://aka.ms/OfficeSecurityReleases
Red Hat Enterprise Linux 10.0 Extended Update Support Red Hat < 16.96.25041326
Red Hat Enterprise Linux 9 Red Hat < 16.96.25041326
< 10.0.19044.5371
Red Hat Enterprise Linux 10 Red Hat < 10.0.19045.5371
Red Hat Enterprise Linux 10.0 Extended Update Support Red Hat < 10.0.22621.4751
Red Hat Enterprise Linux 9 Red Hat < 10.0.22631.4751
Red Hat Enterprise Linux 9 Red Hat < 10.0.22631.4751
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions Red Hat < 10.0.26100.2894
Red Hat Enterprise Linux 9.4 Extended Update Support Red Hat < 6.1.7601.27520
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat < 6.1.7601.27520
< https://aka.ms/OfficeSecurityReleases
Red Hat Enterprise Linux 7 Red Hat < 10.0.25398.1369
Red Hat Enterprise Linux 6 Red Hat < 10.0.20348.3091
Red Hat OpenShift Container Platform 4.16 Red Hat < 6.3.9600.22371
Red Hat OpenShift Container Platform 4.17 Red Hat < 10.0.14393.7699
Red Hat OpenShift Container Platform 4.18 Red Hat < 10.0.14393.7699
Red Hat OpenShift Container Platform 4.19 Red Hat < 10.0.17763.6775
Red Hat OpenShift Container Platform 4.20 Red Hat < 10.0.17763.6775
Red Hat OpenShift Container Platform 4.14 Red Hat < 6.2.9200.25273
Red Hat OpenShift Container Platform 4.13 Red Hat < 6.2.9200.25273
Red Hat OpenShift Container Platform 4.15 Red Hat < 6.3.9600.22371

References (32)