VDB

CVE-2025-5987

CVE-2025-5987 PUBLISHED CVSS 8.1 HIGH

Libssh: invalid return code for chacha20 poly1305 with openssl backend

Reported by redhat · Published July 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. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
libsshWolfi0.11.3-r0
libssh-develAmazon Linux0.10.6-1.amzn2023.0.2
libsshAmazon Linux0.10.6-1.amzn2023.0.2

Risk scores

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

Affected products

VendorProductVersions
0.10.0
Red HatRed Hat Enterprise Linux 100:0.11.1-5.el10_1
Red HatRed Hat Enterprise Linux 10.0 Extended Update Support0:0.11.1-4.el10_0.1
Red HatRed Hat Enterprise Linux 90:0.10.4-17.el9_7
Red HatRed Hat Enterprise Linux 90:0.10.4-17.el9_7
Red HatRed Hat Enterprise Linux 9.2 Update Services for SAP Solutions0:0.10.4-9.el9_2.2
Red HatRed Hat Enterprise Linux 9.4 Extended Update Support0:0.10.4-13.el9_4.2
Red HatRed Hat Enterprise Linux 9.6 Extended Update Support0:0.10.4-15.el9_6.1
Red HatRed Hat OpenShift Container Platform 4.13413.92.202602240113-0
Red HatRed Hat OpenShift Container Platform 4.14414.92.202601191325-0
Red HatRed Hat OpenShift Container Platform 4.15415.92.202601271320-0
Red HatRed Hat OpenShift Container Platform 4.16416.94.202601160124-0
Red HatRed Hat OpenShift Container Platform 4.17417.94.202601120213-0
Red HatRed Hat OpenShift Container Platform 4.18418.94.202601202224-0
Red HatRed Hat OpenShift Container Platform 4.194.19.9.6.202601260820-0
Red HatRed Hat OpenShift Container Platform 4.204.20.9.6.202601211057-0
Red HatRed Hat Enterprise Linux 6
Red HatRed Hat Enterprise Linux 7
Red HatRed Hat Enterprise Linux 8
Red HatRed Hat OpenShift Container Platform 4

…and 37 more

Timeline

  • Jun 29, 2025 CVE Published
  • Jul 7, 2025 Coalition ESS Score (9 in total, the first dated here)
  • Jul 8, 2025 EPSS Score (30 in total, the first dated here)
  • Mar 17, 2026 Security Advisory (41 in total, the first dated here)
  • Oct 20, 2026 Distribution Patch (38 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-5987
vulnetix vdb fixes CVE-2025-5987

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-5987/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›