CVE-2025-5987CWE-393

CVE-2025-5987

High · published July 7, 2025

CVSS v3.1
8.1
EPSS
2%
Percentile
77.4
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
8.1 · HIGH
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01730 · 77.4th percentile
Weakness
CWE-393 · Return of Wrong Status Code
Published
2025-07-07T19:15Z
Affected products (1)
ProductVersionsFixed in
libssh/libssh≥ 0.10.0, < 0.11.20.11.2
References (17)
EPSS history
Timeline
  • 07 JUL 14:24Z
    Libssh: invalid return code for chacha20 poly1305 with openssl backend
    cvelistv5