CVE-2025-5987

Libssh: invalid return code for chacha20 poly1305 with openssl backend

State
Published
Severity
8.1 High
Published
Jul 7, 2025
Updated
Oct 16, 2026
Reserved
Jun 10, 2025

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.18.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Hredhat

Weaknesses

  • CWE-393 Return of Wrong Status Code

Affected Products

ProductVersions
libssh
  • 0.10.0 to before 0.11.2Affected
Red Hat Enterprise Linux 10Red Hat
  • 0:0.11.1-5.el10_1 and laterNot affected
Red Hat Enterprise Linux 10.0 Extended Update SupportRed Hat
  • 0:0.11.1-4.el10_0.1 and laterNot affected
Red Hat Enterprise Linux 9Red Hat
  • 0:0.10.4-17.el9_7 and laterNot affected
Red Hat Enterprise Linux 9Red Hat
  • 0:0.10.4-17.el9_7 and laterNot affected
Red Hat Enterprise Linux 9.2 Update Services for SAP SolutionsRed Hat
  • 0:0.10.4-9.el9_2.2 and laterNot affected
Red Hat Enterprise Linux 9.4 Extended Update SupportRed Hat
  • 0:0.10.4-13.el9_4.2 and laterNot affected
Red Hat Enterprise Linux 9.6 Extended Update SupportRed Hat
  • 0:0.10.4-15.el9_6.1 and laterNot affected
Red Hat OpenShift Container Platform 4.13Red Hat
  • 413.92.202602240113-0 and laterNot affected
Red Hat OpenShift Container Platform 4.14Red Hat
  • 414.92.202601191325-0 and laterNot affected
Red Hat OpenShift Container Platform 4.15Red Hat
  • 415.92.202601271320-0 and laterNot affected
Red Hat OpenShift Container Platform 4.16Red Hat
  • 416.94.202601160124-0 and laterNot affected
Red Hat OpenShift Container Platform 4.17Red Hat
  • 417.94.202601120213-0 and laterNot affected
Red Hat OpenShift Container Platform 4.18Red Hat
  • 418.94.202601202224-0 and laterNot affected
Red Hat OpenShift Container Platform 4.19Red Hat
  • 4.19.9.6.202601260820-0 and laterNot affected
Red Hat OpenShift Container Platform 4.20Red Hat
  • 4.20.9.6.202601211057-0 and laterNot affected
Red Hat Enterprise Linux 6Red Hat
    Red Hat Enterprise Linux 7Red Hat
      Red Hat Enterprise Linux 8Red Hat
        Red Hat OpenShift Container Platform 4Red Hat

          References

          Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.