CVE-2025-5987 — Libssh: invalid return code for chacha20 poly1305 with openssl backend
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.
Who exploits it and how urgent it is
A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.
How the score was calculated
- EPSS 1.7% (30-day exploitation probability)+12
- Technical severity (high)+6
The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.
CISA SSVC assessment CISA
Three decision points CISA publishes for the CVEs it assesses (SSVC 2.0.3). A stakeholder decision, not a severity score.
Remediation
Fixes and mitigations documented by the sources — linked to the original advisory.
No fix documented by the sources we poll. That does not mean none exists: check the vendor advisory.
First 24 hours
Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.
- Identify exposed assets running the affected vendor/product/version combinations (Libssh Libssh, Red Hat Red Hat Enterprise Linux 10, Red Hat Red Hat Enterprise Linux 10.0 Extended Update Support…).
- The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
- No fix documented in the sources: reduce exposure and monitor the vendor advisory.
- Search available logs for exploit probes, errors and authentication anomalies.
Affected scope
Vendor, product and versions as the sources word them.
| Vendor | Product | Versions | Status | Source |
|---|---|---|---|---|
| Libssh | Libssh | ≥ 0.10.0 and < 0.11.2 | Vulnerable | NIST National Vulnerability Database |
| Red Hat | Red Hat Enterprise Linux 10 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat Enterprise Linux 10.0 Extended Update Support | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat Enterprise Linux 9 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat Enterprise Linux 9.4 Extended Update Support | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat Enterprise Linux 9.6 Extended Update Support | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.13 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.14 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.15 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.16 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.17 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.18 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.19 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Red Hat | Red Hat OpenShift Container Platform 4.20 | versions not specified by the source | Vulnerable | CVE Program (cve.org) e CISA ADP |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Every base score collected
Sources score independently and may disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Scored by |
|---|---|---|---|---|---|
| 8.1 | CVSS 3.1 | High | 2.2 | 5.9 | secalert@redhat.com via NIST National Vulnerability Database |
| 8.1 | CVSS 3.1 | High | 2.2 | 5.9 | nvd@nist.gov via NIST National Vulnerability Database |
| 8.1 | CVSS 3.1 | High | — | — | redhat via CVE Program (cve.org) e CISA ADP |
| 5.0 | CVSS 3.1 | Medium | — | — | GitHub, Inc. via GitHub Security Advisories |
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (score shown at the top: secalert@redhat.com) Weakness MITRE
Weakness class according to MITRE’s CWE catalog.
EPSS over time FIRST
Oct 15, 2026 → Oct 16, 2026 · 2 reading(s) · max 1.73%
Detection
Read off the CVSS vector and the weakness class. Starting points, not tested rules.
- Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
Timeline
What happened to this CVE, newest first.
- 2026
- Affected products added · red hat/red hat enterprise linux 10, red hat/red hat enterprise linux 10.0 extended update support, red hat/red hat ente
- SSVC assessment updated
- Record published
- Affected products added · libssh/libssh
- CVSS changed · 8.1
- Source status changed · → Modified
- Record created in this database
- 2025
- CVE published
Source activity
Repeated readings are counted rather than listed.
- 2× References added · Oct 16, 2026 – Oct 16, 2026
- 1× Official description updated · Oct 16, 2026 – Oct 16, 2026
References
19 on the record
- access.redhat.com/errata/RHSA-2025:23483
- www.libssh.org/security/advisories/CVE-2025-5987.txt
- access.redhat.com/errata/RHSA-2026:0978
- access.redhat.com/errata/RHSA-2026:0430
- access.redhat.com/errata/RHSA-2026:0702
- access.redhat.com/errata/RHSA-2026:0985
- access.redhat.com/security/cve/CVE-2025-5987
- access.redhat.com/errata/RHSA-2026:1541
- access.redhat.com/errata/RHSA-2026:0996
- bugzilla.redhat.com/show_bug.cgi
- access.redhat.com/errata/RHSA-2026:0427
- access.redhat.com/errata/RHSA-2025:23484
- access.redhat.com/errata/RHSA-2026:1539
- access.redhat.com/errata/RHSA-2026:0428
- access.redhat.com/errata/RHSA-2026:0431
- github.com/advisories/GHSA-3pvj-q7qj-89fg
- nvd.nist.gov/vuln/detail/CVE-2025-5987
- access.redhat.com/errata/RHSA-2026:0980
- access.redhat.com/errata/RHSA-2026:3415
Elsewhere on this site
Related CVEs (same products)
- Medium CVE-2026-89096 Nfs-utils: nfs-utils: denial of service via memory leak in rpc.statd 9h
- Medium CVE-2026-89085 Parted: parted: heap-based buffer overflow via crafted fat32 filesystem image 9h
- Medium CVE-2026-89088 Parted: parted: denial of service via heap buffer overflow during fat16 resize 9h
- Medium CVE-2026-111802 Nautilus: nautilus: arbitrary file deletion via trash symlink 9h
- Low CVE-2026-17591 Libarchive: libarchive: use-after-free via aliased mac metadata copy 9h
- Medium CVE-2026-62438 Gimp: gimp: paa integer overflow out-of-bounds read 10h
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No fixed version, patch or mitigation documented.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record
Text assembled only from the fields above — no additional claims.
What should defenders know first?
CVE-2025-5987 is "Libssh: invalid return code for chacha20 poly1305 with openssl backend", rated High. It affects Libssh (Libssh); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 8.1 describes technical severity. EPSS 1.73% estimates the probability of exploitation in 30 days; neither replaces your asset context. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.
Comments
Moderated technical discussion. Read the community guidelines.
No comments yet.
Sign in or create an account to comment and suggest corrections.