Skip to main content
Network Thinking Solutions Logo

CVE-2025-5987

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.

All CVEs
CVE-2025-5987Published 7/7/2025

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.

Vendor advisory
CVSS 3.18.1High

Overview

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.

Published
7/7/2025
Last modified
11/23/2026
CVE assigner
redhat
NVD analysis
Modified

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
libssh
libssh
≥ 0.10.0, < 0.11.2

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

access.redhat.com/errata/RHSA-2025:23483vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2025:23484vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0427vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0428vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0430vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0431vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0702vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0978vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0980vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0985vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0996vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:1539vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:1541vendor-advisory · x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:3415vendor-advisory · x_refsource_REDHAT

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

8.1 · High CVSS 3.1

Scored by redhat

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

8.1 · High CVSS 3.1

Scored by secalert@redhat.com

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

8.1 · High CVSS 3.1

Scored by nvd@nist.gov

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Related weaknesses

Sources & references

access.redhat.com/errata/RHSA-2025:23483
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2025:23484
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0427
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0428
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0430
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0431
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0702
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0978
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0980
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0985
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:0996
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:1539
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:1541
vendor-advisory
x_refsource_REDHAT
access.redhat.com/errata/RHSA-2026:3415
vendor-advisory
x_refsource_REDHAT
access.redhat.com/security/cve/CVE-2025-5987
vdb-entry
x_refsource_REDHAT
Third Party Advisory
bugzilla.redhat.com/show_bug.cgi?id=2376219
issue-tracking
x_refsource_REDHAT
Issue Tracking
Third Party Advisory

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.