CVE-2025-5987
Libssh: invalid return code for chacha20 poly1305 with openssl backend
No exploitation reported by the sources we read.
- Published2025-07-07
- Fixed in0.11.2
- WeaknessCWE-393
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2025-07-0714:24CVE publishedCNA
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 0.x | ≥ 0.10.0, < 0.11.2 | 0.11.2 | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA19 products
As redhat, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- libsshother versions: not affectedAffected
- ≥ 0.10.0, < 0.11.2fixed in 0.11.2semver
- Red Hat Enterprise Linux 10other versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.11.1-5.el10_1
- Red Hat Enterprise Linux 10.0 Extended Update Supportother versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.11.1-4.el10_0.1
- Red Hat Enterprise Linux 9other versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.10.4-17.el9_7
- Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionsother versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.10.4-9.el9_2.2
- Red Hat Enterprise Linux 9.4 Extended Update Supportother versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.10.4-13.el9_4.2
13 more products in the CVE record.
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-11-05
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- libsshWolfiall versions · fixed in 0.11.3-r0
- libsshUbuntu:24.04:LTSall versions · fixed in 0.10.6-2ubuntu0.1
- libsshUbuntu:22.04:LTSall versions · fixed in 0.9.6-2ubuntu0.22.04.4
- libsshTuxCare:AlmaLinux:9.6all versions · fixed in 0.10.4-15.el9_6.tuxcare.els1and 2 other packages
- libsshTuxCare:AlmaLinux:9.2all versions · fixed in 0.10.4-8.el9.tuxcare.els6and 2 other packages
- libsshSUSE:Linux Micro 6.1all versions · fixed in 0.10.6-slfo.1.1_2.1
- libsshSUSE:Linux Micro 6.0all versions · fixed in 0.10.6-2.1
- libsshRocky Linux:10all versions · fixed in 0:0.11.1-5.el10_1
31 more package ranges on OSV.dev
Vendor advisories
libssh: Invalid return code for chacha20 poly1305 with OpenSSL backend
libssh2 as a component of Red Hat Enterprise Linux 6 · libssh2-devel as a component of Red Hat Enterprise Linux 6 · libssh2-docs as a component of Red Hat Enterprise Linux 6 · +6 more
Red Hat Security Advisory: OpenShift Container Platform 4.13.64 bug fix and security update
Red Hat Security Advisory: OpenShift Container Platform 4.15.61 bug fix and security update
Red Hat Security Advisory: OpenShift Container Platform 4.19.23 bug fix and security update
Red Hat Security Advisory: OpenShift Container Platform 4.18.32 bug fix and security update
Red Hat Security Advisory: OpenShift Container Platform 4.14.61 bug fix and security update
9 more advisories
Fix
- Update Libssh to 0.11.2
- Vendor fix Red Hat Product Security RHSA-2026:3415 · 1 productFor OpenShift Container Platform 4.13 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
- Vendor fix Red Hat Product Security RHSA-2026:1541 · 4 productsFor OpenShift Container Platform 4.15 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
- Vendor fix Red Hat Product Security RHSA-2026:1539 · 8 productsFor OpenShift Container Platform 4.19 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
- Vendor fix Red Hat Product Security RHSA-2026:0980 · 4 productsFor OpenShift Container Platform 4.18 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
- Vendor fix Red Hat Product Security RHSA-2026:0996 · 4 productsFor OpenShift Container Platform 4.14 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
- Vendor fix Red Hat Product Security RHSA-2026:0985 · 4 productsFor OpenShift Container Platform 4.16 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.redhat.com/en/documentation/openshift_container_platform/4.…
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2026-01-22
- CNACVSS 3.18.12026-11-05
- NVDCVSS 3.18.1read 2026-11-05
- CNAweakness (CWE)CWE-3932026-11-05
- FIRST EPSSEPSS score1.7 %2026-11-08
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-64794same flawAzure Linux · MIT
- AZL-64797same flawAzure Linux · MIT
- CGA-4fgm-6234-7qmmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-cw25-pwg9-4chhsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-qf84-4245-vmrmsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-w6r9-4r92-mwr2same flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2025-20227same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-3pvj-q7qj-89fgsame flawGitHub Advisory Database · CC-BY-4.0
- JLSEC-2025-332same flawJulia Security Advisories · CC-BY-4.0
- MINI-5r72-wp6m-mjvxsame flawMinimOS · LicenseRef-unstated
- MINI-r7cp-9fm8-f7g5same flawMinimOS · LicenseRef-unstated
- ALSA-2025:23483advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:23484advisory covering several CVEsAlmaLinux · MIT
- MGASA-2026-0189advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2025-2127advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-2131advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-2132advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2025:15243-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2025:23483advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:23484advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2026:0427advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2026:0428advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2026:0430advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2026:0431advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2025:23483advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2025:23484advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2025:20557-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2025:20596-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-7619-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2025-07-07
- Last Modified
- 2026-11-05
- NVD status
- Modified
- GitHub Advisory
- GHSA-3pvj-q7qj-89fg
Frequently asked questions
What is CVE-2025-5987?
Is CVE-2025-5987 actively exploited?
What is the CVSS score for CVE-2025-5987?
Running libssh? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
- CVE-2023-48795same product
- CVE-2021-3634same product
- CVE-2025-5318same productLibssh: out-of-bounds read in sftp_handle()
- CVE-2023-6918same product
- CVE-2023-1667same product
- CVE-2023-2283same product
- CVE-2025-5449same productLibssh: integer overflow in libssh sftp server packet length validation leading to denial of service
- CVE-2023-3603same product
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-3pvj-q7qj-89fg
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0