CVE-2025-5987 Libssh: invalid return code for chacha20 poly1305 with openssl backend
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.
Problem types: cwe_id: CWE-393
description: Return of Wrong Status Code
Affected products: default_status: unaffected
vendor: Red Hat
product: Red Hat Enterprise Linux 10
cpes: cpe:/o:redhat:enterprise_linux:10.1
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 10.0 Extended Update Support
cpes: cpe:/o:redhat:enterprise_linux_eus:10.0
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9
cpes: cpe:/o:redhat:enterprise_linux:9::baseos
cpe:/a:redhat:enterprise_linux:9::appstream
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9
cpes: cpe:/o:redhat:enterprise_linux:9::baseos
cpe:/a:redhat:enterprise_linux:9::appstream
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions
cpes: cpe:/o:redhat:rhel_e4s:9.2::baseos
cpe:/a:redhat:rhel_e4s:9.2::appstream
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9.4 Extended Update Support
cpes: cpe:/o:redhat:rhel_eus:9.4::baseos
cpe:/a:redhat:rhel_eus:9.4::appstream
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9.6 Extended Update Support
cpes: cpe:/o:redhat:rhel_eus:9.6::baseos
cpe:/a:redhat:rhel_eus:9.6::appstream
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.13
cpes: cpe:/a:redhat:openshift:4.13::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.14
cpes: cpe:/a:redhat:openshift:4.14::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.15
cpes: cpe:/a:redhat:openshift:4.15::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.16
cpes: cpe:/a:redhat:openshift:4.16::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.17
cpes: cpe:/a:redhat:openshift:4.17::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.18
cpes: cpe:/a:redhat:openshift:4.18::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.19
cpes: cpe:/a:redhat:openshift:4.19::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4.20
cpes: cpe:/a:redhat:openshift:4.20::el9
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 6
cpes: cpe:/o:redhat:enterprise_linux:6
default_status: unknown
vendor: Red Hat
product: Red Hat Enterprise Linux 7
cpes: cpe:/o:redhat:enterprise_linux:7
default_status: unknown
vendor: Red Hat
product: Red Hat Enterprise Linux 8
cpes: cpe:/o:redhat:enterprise_linux:8
default_status: unaffected
CVSS v3.1: attackComplexity: HIGH
attackVector: NETWORK
availabilityImpact: HIGH
baseScore: 8.1
baseSeverity: HIGH
confidentialityImpact: HIGH
integrityImpact: HIGH
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: NONE
vectorString: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
version: 3.1
Published: 2025-07-07T14:24:12.576Z