CVE-2025-5987

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.
References
Link Resource
https://access.redhat.com/security/cve/CVE-2025-5987 Third Party Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2376219 Issue Tracking Third Party Advisory
Configurations

Configuration 1 (hide)

cpe:2.3:a:libssh:libssh:-:*:*:*:*:*:*:*

History

22 Aug 2025, 13:11

Type Values Removed Values Added
References () https://access.redhat.com/security/cve/CVE-2025-5987 - () https://access.redhat.com/security/cve/CVE-2025-5987 - Third Party Advisory
References () https://bugzilla.redhat.com/show_bug.cgi?id=2376219 - () https://bugzilla.redhat.com/show_bug.cgi?id=2376219 - Issue Tracking, Third Party Advisory
CPE cpe:2.3:a:libssh:libssh:-:*:*:*:*:*:*:*
First Time Libssh libssh
Libssh

08 Jul 2025, 16:18

Type Values Removed Values Added
Summary
  • (es) Se detectó una falla en libssh al usar el cifrado ChaCha20 con la librería OpenSSL. Si un atacante logra agotar el espacio del montón, este error no se detecta y puede provocar que libssh use un contexto de cifrado parcialmente inicializado. Esto se debe a que el código de error de OpenSSL devolvió alias con el código SSH_OK, lo que impide que libssh detecte correctamente el error devuelto por la librería OpenSSL. Este problema puede provocar un comportamiento indefinido, como la confidencialidad e integridad de los datos comprometidas o fallos.

07 Jul 2025, 15:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-07 15:15

Updated : 2025-08-22 13:11


NVD link : CVE-2025-5987

Mitre link : CVE-2025-5987

CVE.ORG link : CVE-2025-5987


JSON object : View

Products Affected

libssh

  • libssh
CWE
CWE-393

Return of Wrong Status Code