« List of all CVEs

CVE-2025-5987

Libssh: invalid return code for chacha20 poly1305 with openssl backend

Published: 7/7/2025 Last updated: 6/30/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 (35)

Product Vendor Version
v11
Red Hat Enterprise Linux 10 Red Hat 2016
Red Hat Enterprise Linux 10.0 Extended Update Support Red Hat 2019
Red Hat Enterprise Linux 9 Red Hat 2013 Service Pack 1
Red Hat Enterprise Linux 9 Red Hat Android-11
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions Red Hat <=2.4.9.3
Red Hat Enterprise Linux 9.4 Extended Update Support Red Hat < 6.4.2
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat < 7.11
Red Hat Enterprise Linux 8 Red Hat FS5: before 5.3
N/A
Red Hat Enterprise Linux 9 Red Hat 10 Version 1709 for x64-based Systems
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions Red Hat 2008 for x64-based Systems Service Pack 2
Red Hat Enterprise Linux 9.4 Extended Update Support Red Hat n/a
Red Hat Enterprise Linux 9.6 Extended Update Support Red Hat < watchOS 6.2
Red Hat Enterprise Linux 8 Red Hat < 68.7
Red Hat Enterprise Linux 7 Red Hat All versions < V6.5
Red Hat Enterprise Linux 6 Red Hat FS4: before 4.11.2.1
Red Hat Enterprise Linux 7 Red Hat FS: before 5.3
Red Hat Enterprise Linux 6 Red Hat All versions < V6.5
Red Hat OpenShift Container Platform 4.20 Red Hat All versions < V6.5
Red Hat OpenShift Container Platform 4.13 Red Hat < 18.1R3-S10
Red Hat OpenShift Container Platform 4.14 Red Hat < 19.2R1-S5, 19.2R2
Red Hat OpenShift Container Platform 4.15 Red Hat 19.3-EVO
Red Hat OpenShift Container Platform 4.16 Red Hat 11.0.1
Red Hat OpenShift Container Platform 4.13 Red Hat < 7.20
Red Hat OpenShift Container Platform 4.14 Red Hat < 7.30
Red Hat OpenShift Container Platform 4.15 Red Hat < 7.31
Red Hat OpenShift Container Platform 4.16 Red Hat < 7.40
Red Hat OpenShift Container Platform 4.17 Red Hat < 7.50
Red Hat OpenShift Container Platform 4.18 Red Hat < 9
Red Hat OpenShift Container Platform 4.20 Red Hat FS3: before 3.9.8
Red Hat OpenShift Container Platform 4.19 Red Hat VMware View Planner 4.x prior to 4.6 Security Patch 1
Red Hat OpenShift Container Platform 4.17 Red Hat n/a
Red Hat OpenShift Container Platform 4.18 Red Hat All versions < V6.5
Red Hat OpenShift Container Platform 4.19 Red Hat All versions < V6.5

References (34)