High severity · published Jul 7, 2025
CVE-2025-5987
Libssh: invalid return code for chacha20 poly1305 with openssl backend
8.1
CVSS
1.7%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)1.7% · higher than 77% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RH
Red Hat Enterprise Linux 10 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 10.0 Extended Update Support · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 6 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 7 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 9 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 9.4 Extended Update Support · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 9.6 Extended Update Support · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat OpenShift Container Platform 4 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat OpenShift Container Platform 4.13 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat OpenShift Container Platform 4.14 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat OpenShift Container Platform 4.15 · Red Hat
All versions, or not specified · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-5987
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-5987
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:23483
access.redhat.com
https://access.redhat.com/errata/RHSA-2025:23484
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:0427
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:0428
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:0430
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:0431
More from Red Hat Enterprise Linux 10
7.8
CVE-2026-31431
crypto: algif_aead - Revert to operating out-of-place
7.5
CVE-2026-34486
Apache Tomcat: Fix for CVE-2026-29146 allowed bypass of EncryptInterceptor
10.0
CVE-2026-46595
Invoking VerifiedPublicKeyCallback permissions skip enforcement in golang.org/x/crypto/ssh
10.0
CVE-2026-34078
Flatpak has a complete sandbox escape leading to host file access and code execution in the host context
10.0
CVE-2026-4692
Sandbox escape in the Responsive Design Mode component
