Return of Wrong Status Code Affecting libssh2 package, versions *


Severity

Recommended
0.0
medium
0
10

Based on Red Hat Enterprise Linux security rating.

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RHEL7-LIBSSH2-10609291
  • published4 Jul 2025
  • disclosed26 Apr 2025

Introduced: 26 Apr 2025

CVE-2025-5987  (opens in a new tab)
CWE-393  (opens in a new tab)

How to fix?

There is no fixed version for RHEL:7 libssh2.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libssh2 package and not the libssh2 package as distributed by RHEL. See How to fix? for RHEL:7 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1