Skip to content
Threat Brief

← All advisories

CVE-2025-5987

High 8.1No known exploitationFix status unknown

Libssh: invalid return code for chacha20 poly1305 with openssl backend

Record last updated

CVSS score

8.1

High on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

1.7%

Higher than 78% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

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.

Weakness: CWE-393

Patching and mitigation

Patch status
Unknown: no source documents a fix
Mitigation
A workaround for this issue is to disable the chacha20-poly1305@openssh.com cipher in applications using libssh when libssh is compiled with the OpenSSL backend, so the vulnerable ChaCha20-Poly1305 initialization path is not used. Alternatively, upgrade to a version of libssh containing the fix; upstream has released libssh 0.11.2 to correct this defect, and administrators are advised to upgrade or apply the upstream patch as soon as possible. Source (opens in a new tab)
Vendor guidance
access.redhat.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
Red HatRed Hat OpenShift Container Platform 4Not documentedNot documentedCVE Program
libsshlibsshfrom 0.10.0 before 0.11.20.11.2NIST NVD
Red HatRed Hat Enterprise Linux 10 (unaffected)0:0.11.1-5.el10_1Not documentedCVE Program
Red HatRed Hat Enterprise Linux 10.0 Extended Update Support (unaffected)0:0.11.1-4.el10_0.1Not documentedCVE Program
Red HatRed Hat Enterprise Linux 6 (status unknown)Not documentedNot documentedCVE Program
Red HatRed Hat Enterprise Linux 7 (status unknown)Not documentedNot documentedCVE Program
Red HatRed Hat Enterprise Linux 8 (status unknown)Not documentedNot documentedCVE Program
Red HatRed Hat Enterprise Linux 9 (unaffected)0:0.10.4-17.el9_7Not documentedCVE Program
Red HatRed Hat Enterprise Linux 9 (unaffected)0:0.10.4-17.el9_7Not documentedCVE Program
Red HatRed Hat Enterprise Linux 9.2 Update Services for SAP Solutions (unaffected)0:0.10.4-9.el9_2.2Not documentedCVE Program
Red HatRed Hat Enterprise Linux 9.4 Extended Update Support (unaffected)0:0.10.4-13.el9_4.2Not documentedCVE Program
Red HatRed Hat Enterprise Linux 9.6 Extended Update Support (unaffected)0:0.10.4-15.el9_6.1Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.13 (unaffected)413.92.202602240113-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.14 (unaffected)414.92.202601191325-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.15 (unaffected)415.92.202601271320-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.16 (unaffected)416.94.202601160124-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.17 (unaffected)417.94.202601120213-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.18 (unaffected)418.94.202601202224-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.19 (unaffected)4.19.9.6.202601260820-0Not documentedCVE Program
Red HatRed Hat OpenShift Container Platform 4.20 (unaffected)4.20.9.6.202601211057-0Not documentedCVE Program

Timeline

  1. Disclosure

    CVE record published by redhat

    Source: CVE Program (opens in a new tab)

Vendor guidance and references

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