Libssh: invalid return code for chacha20 poly1305 with openssl backend
Summary
| CVE | CVE-2025-5987 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2025-07-07 15:15:28 UTC |
| Updated | 2026-06-30 11:16:26 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.1 HIGH from [email protected]
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS: 0.014400000 probability, percentile 0.699440000 (date 2026-07-02)
Problem Types: CWE-393 | CWE-393 Return of Wrong Status Code
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 8.1 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | [email protected] | Secondary | 8.1 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 8.1 | HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Red Hat | Red Hat Enterprise Linux 10 | unaffected 0:0.11.1-5.el10_1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 10.0 Extended Update Support | unaffected 0:0.11.1-4.el10_0.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:0.10.4-17.el9_7 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:0.10.4-17.el9_7 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.2 Update Services For SAP Solutions | unaffected 0:0.10.4-9.el9_2.2 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.4 Extended Update Support | unaffected 0:0.10.4-13.el9_4.2 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.6 Extended Update Support | unaffected 0:0.10.4-15.el9_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.13 | unaffected 413.92.202602240113-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.14 | unaffected 414.92.202601191325-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.15 | unaffected 415.92.202601271320-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.16 | unaffected 416.94.202601160124-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.17 | unaffected 417.94.202601120213-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.18 | unaffected 418.94.202601202224-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.19 | unaffected 4.19.9.6.202601260820-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.20 | unaffected 4.20.9.6.202601211057-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 6 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 7 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | Not specified | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| access.redhat.com/errata/RHSA-2026:0985 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:0427 | [email protected] | access.redhat.com | |
| www.libssh.org/security/advisories/CVE-2025-5987.txt | [email protected] | www.libssh.org | |
| access.redhat.com/errata/RHSA-2026:0431 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:0978 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:23484 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:0980 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:0702 | [email protected] | access.redhat.com | |
| bugzilla.redhat.com/show_bug.cgi | [email protected] | bugzilla.redhat.com | Issue Tracking, Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:0996 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:3415 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:0430 | [email protected] | access.redhat.com | |
| access.redhat.com/security/cve/CVE-2025-5987 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:0428 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:23483 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:1539 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:1541 | [email protected] | access.redhat.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2025-07-03T21:55:26.394Z | Reported to Red Hat. |
| CNA | 2025-04-26T00:00:00.000Z | Made public. |
There are currently no legacy QID mappings associated with this CVE.