Libssh: out-of-bounds read in sftp_handle()
Summary
| CVE | CVE-2025-5318 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2025-06-24 14:15:30 UTC |
| Updated | 2026-06-30 11:16:24 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.1 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
EPSS: 0.023940000 probability, percentile 0.819460000 (date 2026-07-02)
Problem Types: CWE-125 | CWE-125 Out-of-bounds Read
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 8.1 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| 3.1 | [email protected] | Secondary | 8.1 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| 3.1 | CNA | CVSS | 8.1 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
NoneAvailability
HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Libssh | Libssh | All | All | All | All |
| Operating System | Redhat | Enterprise Linux | 10.0 | All | All | All |
| Operating System | Redhat | Enterprise Linux | 8.0 | All | All | All |
| Operating System | Redhat | Enterprise Linux | 9.0 | All | All | All |
| Application | Redhat | Openshift Container Platform | 4.0 | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Red Hat | Red Hat Enterprise Linux 10 | unaffected 0:0.11.1-4.el10_0 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 10 | unaffected 0:0.11.1-4.el10_1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | unaffected 0:0.9.6-15.el8_10 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | unaffected 0:0.9.6-15.el8_10 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.2 Advanced Update Support | unaffected 0:0.9.0-4.el8_2.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | unaffected 0:0.9.4-2.el8_4.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | unaffected 0:0.9.4-2.el8_4.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | unaffected 0:0.9.6-4.el8_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Telecommunications Update Service | unaffected 0:0.9.6-4.el8_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Update Services For SAP Solutions | unaffected 0:0.9.6-4.el8_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Telecommunications Update Service | unaffected 0:0.9.6-13.el8_8.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Update Services For SAP Solutions | unaffected 0:0.9.6-13.el8_8.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:0.10.4-15.el9_6 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:0.10.4-15.el9_7 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:0.10.4-15.el9_6 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:0.10.4-15.el9_7 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.0 Update Services For SAP Solutions | unaffected 0:0.9.6-3.el9_0.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.2 Update Services For SAP Solutions | unaffected 0:0.10.4-9.el9_2.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.4 Extended Update Support | unaffected 0:0.10.4-13.el9_4.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.12 | unaffected 412.86.202511191939-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.13 | unaffected 413.92.202511261311-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.14 | unaffected 414.92.202511122212-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.15 | unaffected 415.92.202601271320-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.16 | unaffected 416.94.202601071926-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.17 | unaffected 417.94.202510282022-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.18 | unaffected 418.94.202511041748-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.19 | unaffected 4.19.9.6.202510281054-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.20 | unaffected 4.20.9.6.202510290321-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.2 | unaffected 3.2.2-1765379088 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.2 | unaffected 3.2.2-1765379049 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.2 | unaffected 3.2.2-1764871796 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.2 | unaffected 1772160593 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.2 | unaffected 1772160625 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.7.1 | unaffected rhosdt-3.7-1762254546 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.7.1 | unaffected rhosdt-3.7-1762254552 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.7.1 | unaffected rhosdt-3.7-1762255881 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.7.1 | unaffected rhosdt-3.7-1762254530 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.7.1 | unaffected rhosdt-3.7-1762254519 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.7.1 | unaffected rhosdt-3.7-1762254545 * rpm | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| access.redhat.com/errata/RHSA-2025:19098 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:19400 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19470 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:20943 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19401 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:18286 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:19101 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:23080 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19313 | [email protected] | access.redhat.com | |
| bugzilla.redhat.com/show_bug.cgi | [email protected] | bugzilla.redhat.com | Issue Tracking, Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:19012 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:23079 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19472 | [email protected] | access.redhat.com | |
| access.redhat.com/security/cve/CVE-2025-5318 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:23078 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19807 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:22275 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:3461 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:21329 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:3462 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:18231 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:18275 | [email protected] | access.redhat.com | Third Party Advisory |
| access.redhat.com/errata/RHSA-2025:19295 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:21829 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:21013 | [email protected] | access.redhat.com | |
| www.libssh.org/security/advisories/CVE-2025-5318.txt | [email protected] | www.libssh.org | Vendor Advisory |
| access.redhat.com/errata/RHSA-2026:0326 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19864 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2025:19300 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:1541 | [email protected] | access.redhat.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Red Hat would like to thank Ronald Crane for reporting this issue. (en)
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2025-05-29T06:48:59.169Z | Reported to Red Hat. |
| CNA | 2025-06-24T00:00:00.000Z | Made public. |
Workarounds
CNA: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
There are currently no legacy QID mappings associated with this CVE.