What’s Vulnerable › Vulnerabilities
CVE-2025-5318: Libssh: out-of-bounds read in sftp_handle()
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.8% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-06-24 · updated 2026-09-08
- Weakness: CWE-125
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.
Affected products
- libssh: before 0.11.2 — fixed in 0.11.2
- Red Hat Enterprise Linux: 8.0, 9.0, 10.0
- Red Hat OpenShift Container Platform 4.18: 4.0
How to fix
Upgrade to a fixed version: libssh 0.11.2. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/errata/RHSA-2025:18231
- https://access.redhat.com/errata/RHSA-2025:18275
- https://access.redhat.com/errata/RHSA-2025:18286
- https://access.redhat.com/errata/RHSA-2025:19012
- https://access.redhat.com/errata/RHSA-2025:19098
- https://access.redhat.com/errata/RHSA-2025:19101
- https://access.redhat.com/errata/RHSA-2025:19295
- https://access.redhat.com/errata/RHSA-2025:19300
- https://access.redhat.com/errata/RHSA-2025:19313
- https://access.redhat.com/errata/RHSA-2025:19400
- https://access.redhat.com/errata/RHSA-2025:19401
- https://access.redhat.com/errata/RHSA-2025:19470
Get alerted when CVE-2025-5318 or the next vulnerability affects your stack