CVE-2025-5318
Libssh: out-of-bounds read in sftp_handle()
No exploitation reported by the sources we read.
- Published2025-06-24
- Fixed in0.11.2
- WeaknessCWE-125
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 the libssh library in versions less than 0.11.2. An out-of-bounds read can be triggered in the sftp_handle function due to an incorrect comparison check that permits the function to access memory beyond the valid handle list and to return an invalid pointer, which is used in further processing. This vulnerability allows an authenticated remote attacker to potentially read unintended memory regions, exposing sensitive information or affect service behavior.
Timeline
dates in UTC- 2025-06-2414:10CVE publishedCNA
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 0.11 | < 0.11.2 | 0.11.2 | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 8.0 | = 8.0 | no fix published | NVD |
| 9.0 | = 9.0 | no fix published | NVD |
| 10.0 | = 10.0 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 4.0 | = 4.0 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA37 products
As redhat, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- libsshother versions: not affectedAffected
- < 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-4.el10_0
- Red Hat Enterprise Linux 10other versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.11.1-4.el10_1
- Red Hat Enterprise Linux 8other versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.9.6-15.el8_10
- Red Hat Enterprise Linux 8.2 Advanced Update Supportother versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.9.0-4.el8_2.1
- Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportother versions: affected
package libsshhttps://access.redhat.com/downloads/content/package-browser/
Not affected ≥ 0:0.9.4-2.el8_4.1
31 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:Pro:20.04:LTSall versions · fixed in 0.9.3-2ubuntu2.5+esm1
- libsshUbuntu:Pro:18.04:LTSall versions · fixed in 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4
- libsshUbuntu:Pro:16.04:LTSall versions · fixed in 0.6.3-4.3ubuntu0.6+esm2
- 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:CentOS:8.5all versions · fixed in 0.9.4-3.el8.tuxcare.els5and 2 other packages
- libsshTuxCare:CentOS:8.4all versions · fixed in 0.9.4-3.el8.tuxcare.els5and 2 other packages
95 more package ranges on OSV.dev
Vendor advisories
libssh: out-of-bounds read in sftp_handle()
openshift/ose-rhel-coreos-9 as a component of Red Hat OpenShift Container Platform 4
Red Hat Security Advisory: Red Hat AI Inference Server 3.2.2 (ROCm)
Red Hat Security Advisory: Red Hat AI Inference Server 3.2.2 (CUDA)
Red Hat Security Advisory: OpenShift Container Platform 4.15.61 bug fix and security update
Red Hat Security Advisory: OpenShift Container Platform 4.16.55 bug fix and security update
Red Hat Security Advisory: Red Hat AI Inference Server Model Optimization Tools 3.2.2 (CUDA)
22 more advisories
Fix
- Update Libssh to 0.11.2
- Vendor fix Red Hat Product Security RHSA-2026:3462 · 1 productFor more information visit https://access.redhat.com/errata/RHSA-2026:3462
- Vendor fix Red Hat Product Security RHSA-2026:3461 · 2 productsFor more information visit https://access.redhat.com/errata/RHSA-2026:3461
- 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:0326 · 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.…
- Vendor fix Red Hat Product Security RHSA-2025:23080 · 2 productsFor more information visit https://access.redhat.com/errata/RHSA-2025:23080
- Vendor fix Red Hat Product Security RHSA-2025:23079 · 1 productFor more information visit https://access.redhat.com/errata/RHSA-2025:23079
Advisories and patches
- www.libssh.orgVendor Advisory
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-03-18
- CNACVSS 3.15.42026-11-05
- NVDCVSS 3.18.1read 2026-11-05
- CNAweakness (CWE)CWE-1252026-11-05
- FIRST EPSSEPSS score1.9 %2026-11-08
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-64346same flawAzure Linux · MIT
- AZL-64358same flawAzure Linux · MIT
- CGA-23vp-82j6-83p3same flawChainguard · CC-BY-NC-ND-4.0
- CGA-4rvc-7hxp-r6pgsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-5v9f-8h5p-gmj2same flawChainguard · CC-BY-NC-ND-4.0
- CGA-gqw7-f368-2cwqsame flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2025-23900same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-98qw-prqm-9f4psame flawGitHub Advisory Database · CC-BY-4.0
- JLSEC-2025-96same flawJulia Security Advisories · CC-BY-4.0
- MINI-v466-42qh-99qfsame flawMinimOS · LicenseRef-unstated
- ALSA-2025:18231advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:18275advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:18286advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:20943advisory covering several CVEsAlmaLinux · MIT
- ALSA-2025:21013advisory covering several CVEsAlmaLinux · MIT
- DLA-4385-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2026-0189advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2025-1707advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1804advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1805advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1806advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1807advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2025-1808advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2025:15243-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2025:18231advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:18275advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:18286advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19012advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19098advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19101advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19400advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19401advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19470advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:19472advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:20943advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2025:21013advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2025:18231advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2025:18275advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2025:18286advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2025:20943advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2025:02229-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2025:02278-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2025:02279-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2025:02281-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2025:02755-1advisory covering several CVEsSUSE · LicenseRef-unstated
- 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
- USN-7696-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- Published
- 2025-06-24
- Last Modified
- 2026-11-05
- NVD status
- Modified
- GitHub Advisory
- GHSA-98qw-prqm-9f4p
Frequently asked questions
What is CVE-2025-5318?
Is CVE-2025-5318 actively exploited?
What is the CVSS score for CVE-2025-5318?
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.
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-98qw-prqm-9f4p
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OpenCVE · OpenCVE terms of service · terms restrict redistribution
- 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