Return of Wrong Status Code in libssh - CVE-2025-5987

 

Return of Wrong Status Code in libssh - CVE-2025-5987

Published: September 12, 2025 / Updated: February 24, 2026


Vulnerability identifier: #VU115172
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2025-5987
CWE-ID: CWE-393
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: libssh
Affected software:
libssh

Detailed vulnerability description

The vulnerability allows a remote attacker to compromise the affected system.

The vulnerability exists due to incorrect handling of the wrong status code returned by the OpenSSL within the chacha20_poly1305_set_key() function when using the ChaCha20 cipher with the OpenSSL library. A remote attacker can force the library to partially initialize cipher context, leading to an undefined application's behavior.


How to mitigate CVE-2025-5987

Install updates from vendor's website.

Sources