CVE-2025-5987 HIGH

CVE-2025-5987: Libssh: invalid return code for chacha20 poly1305 with openssl backend

Vendor Red Hat
Product Red Hat Enterprise Linux 6
Weakness CWE-393
Published July 7, 2025
Last update March 20, 2026

CVSS base score

8.1/10
Attack vector Network
Attack complexity High
Privileges required None
User interaction None
Confidentiality High
Integrity High

CVSS vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

What the vulnerability does

01Description

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.

Key dates

02Disclosure timeline

July 7, 2025 CVE published
March 20, 2026 Record updated