CVE-2025-5987

HIGHCVSS 8.1/10EPSS 1.44%

Last modified

CVE-2025-5987 is a high-severity vulnerability rated 8.1/10 on the CVSS scale. 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. EPSS estimates a 1.44% chance of exploitation in the next 30 days.

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.

Metrics

CVSS 3.1
8.1/10

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

EPSS Probability
1.44%

69.8th percentile

Probability of exploitation in the next 30 days. Learn more

Weakness Enumeration

Affected Software

VendorProductVersions
LibsshLibssh>= 0.10.0, < 0.11.2

References

Timeline

Published
Last Modified
Status
Modified

Frequently Asked Questions

What is 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. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.
How severe is CVE-2025-5987?
CVE-2025-5987 has a CVSS score of 8.1/10 (HIGH severity). The EPSS model estimates a 1.44% probability of exploitation in the next 30 days.
How do I fix CVE-2025-5987?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

Are you affected by CVE-2025-5987?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST