CVE-2025-5987

published 7 Jul 2025 · updated 5 Nov 2026

Libssh: invalid return code for chacha20 poly1305 with openssl backend

8.1HighCVSS 8.1EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 0.11.2.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Red HatEnterprise Linux
Red HatOpenShift Container Platform
libsshlibssh>=0.10.0 <0.11.20.11.2
>=0.10.0 <0.11.20.11.2

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Red Hat, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-5987 severity on Zeptric[![CVE-2025-5987](https://zeptric.io/badge/cve/CVE-2025-5987.svg)](https://zeptric.io/cve/CVE-2025-5987)