CVE-2025-5318
Libssh: out-of-bounds read in sftp_handle()
Check your servers for CVE-2025-5318
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-5318 affects libssh, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality low, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.91%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 80.3% of all scored CVEs. Scores of 29 Nov 2026.
The assessment of CISA (SSVC, 18 Mar 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-125 Out-of-bounds Read
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
libssh
package
libssh |
affected before 0.11.2
Other versions: unaffected
|
|
Red Hat Enterprise Linux 10
package
libssh |
unaffected 0:0.11.1-4.el10_0 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 10
package
libssh |
unaffected 0:0.11.1-4.el10_1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8
package
libssh |
unaffected 0:0.9.6-15.el8_10 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8
package
libssh |
unaffected 0:0.9.6-15.el8_10 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.2 Advanced Update Support
package
libssh |
unaffected 0:0.9.0-4.el8_2.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
package
libssh |
unaffected 0:0.9.4-2.el8_4.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On
package
libssh |
unaffected 0:0.9.4-2.el8_4.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
package
libssh |
unaffected 0:0.9.6-4.el8_6.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.6 Telecommunications Update Service
package
libssh |
unaffected 0:0.9.6-4.el8_6.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
package
libssh |
unaffected 0:0.9.6-4.el8_6.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.8 Telecommunications Update Service
package
libssh |
unaffected 0:0.9.6-13.el8_8.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
package
libssh |
unaffected 0:0.9.6-13.el8_8.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9
package
libssh |
unaffected 0:0.10.4-15.el9_6 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9
package
libssh |
unaffected 0:0.10.4-15.el9_7 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9
package
libssh |
unaffected 0:0.10.4-15.el9_6 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9
package
libssh |
unaffected 0:0.10.4-15.el9_7 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions
package
libssh |
unaffected 0:0.9.6-3.el9_0.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions
package
libssh |
unaffected 0:0.10.4-9.el9_2.1 and later
Other versions: affected
|
|
Red Hat Enterprise Linux 9.4 Extended Update Support
package
libssh |
unaffected 0:0.10.4-13.el9_4.1 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.12
package
openshift/ose-rhel-coreos-8 |
unaffected 412.86.202511191939-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.13
package
openshift/ose-rhel-coreos-9 |
unaffected 413.92.202511261311-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.14
package
openshift/ose-rhel-coreos-9 |
unaffected 414.92.202511122212-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.15
package
openshift/ose-rhel-coreos-9 |
unaffected 415.92.202601271320-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.16
package
openshift/ose-rhel-coreos-9 |
unaffected 416.94.202601071926-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.17
package
openshift/ose-rhel-coreos-9 |
unaffected 417.94.202510282022-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.18
package
openshift/ose-rhel-coreos-9 |
unaffected 418.94.202511041748-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.19
package
openshift/ose-rhel-coreos-9 |
unaffected 4.19.9.6.202510281054-0 and later
Other versions: affected
|
|
Red Hat OpenShift Container Platform 4.20
package
openshift/ose-rhel-coreos-9 |
unaffected 4.20.9.6.202510290321-0 and later
Other versions: affected
|
|
Red Hat AI Inference Server 3.2
package
rhaiis/vllm-cuda-rhel9 |
unaffected 3.2.2-1765379088 and later
Other versions: affected
|
|
Red Hat AI Inference Server 3.2
package
rhaiis/vllm-rocm-rhel9 |
unaffected 3.2.2-1765379049 and later
Other versions: affected
|
|
Red Hat AI Inference Server 3.2
package
rhaiis/model-opt-cuda-rhel9 |
unaffected 3.2.2-1764871796 and later
Other versions: affected
|
|
Red Hat AI Inference Server 3.2
package
rhaiis/vllm-cuda-rhel9 |
unaffected 1772160593 and later
Other versions: affected
|
|
Red Hat AI Inference Server 3.2
package
rhaiis/vllm-rocm-rhel9 |
unaffected 1772160625 and later
Other versions: affected
|
|
Red Hat OpenShift distributed tracing 3.7.0
package
rhosdt/tempo-gateway-opa-rhel8 |
unaffected rhosdt-3.7-1762254546 and later
Other versions: affected
|
|
Red Hat OpenShift distributed tracing 3.7.0
package
rhosdt/tempo-gateway-rhel8 |
unaffected rhosdt-3.7-1762254552 and later
Other versions: affected
|
|
Red Hat OpenShift distributed tracing 3.7.0
package
rhosdt/tempo-jaeger-query-rhel8 |
unaffected rhosdt-3.7-1762255881 and later
Other versions: affected
|
|
Red Hat OpenShift distributed tracing 3.7.0
package
rhosdt/tempo-query-rhel8 |
unaffected rhosdt-3.7-1762254530 and later
Other versions: affected
|
|
Red Hat OpenShift distributed tracing 3.7.0
package
rhosdt/tempo-rhel8 |
unaffected rhosdt-3.7-1762254519 and later
Other versions: affected
|
|
Red Hat OpenShift distributed tracing 3.7.0
package
rhosdt/tempo-rhel8-operator |
unaffected rhosdt-3.7-1762254545 and later
Other versions: affected
|
Is my server affected?
Find the installed version of libssh and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i libssh
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-5318 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-5318RHEL, Rocky, Alma, Fedora
rpm -q libssh
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-5318Alpine
apk list --installed | grep -i libsshWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-5318
trivy image --scanners vuln IMAGE | grep CVE-2025-5318
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- RHSA-2025:18231 access.redhat.com · vendor advisory
- RHSA-2025:18275 access.redhat.com · vendor advisory
- RHSA-2025:18286 access.redhat.com · vendor advisory
- RHSA-2025:19012 access.redhat.com · vendor advisory
- RHSA-2025:19098 access.redhat.com · vendor advisory
- RHSA-2025:19101 access.redhat.com · vendor advisory
- RHSA-2025:19295 access.redhat.com · vendor advisory
- RHSA-2025:19300 access.redhat.com · vendor advisory
- RHSA-2025:19313 access.redhat.com · vendor advisory
- RHSA-2025:19400 access.redhat.com · vendor advisory
- RHSA-2025:19401 access.redhat.com · vendor advisory
- RHSA-2025:19470 access.redhat.com · vendor advisory
17 more
- RHSA-2025:19472 access.redhat.com · vendor advisory
- RHSA-2025:19807 access.redhat.com · vendor advisory
- RHSA-2025:19864 access.redhat.com · vendor advisory
- RHSA-2025:20943 access.redhat.com · vendor advisory
- RHSA-2025:21013 access.redhat.com · vendor advisory
- RHSA-2025:21329 access.redhat.com · vendor advisory
- RHSA-2025:21829 access.redhat.com · vendor advisory
- RHSA-2025:22275 access.redhat.com · vendor advisory
- RHSA-2025:23078 access.redhat.com · vendor advisory
- RHSA-2025:23079 access.redhat.com · vendor advisory
- RHSA-2025:23080 access.redhat.com · vendor advisory
- RHSA-2026:0326 access.redhat.com · vendor advisory
- RHSA-2026:1541 access.redhat.com · vendor advisory
- RHSA-2026:3461 access.redhat.com · vendor advisory
- RHSA-2026:3462 access.redhat.com · vendor advisory
- https://access.redhat.com/security/cve/CVE-2025-5318 access.redhat.com · vdb entry
- RHBZ#2369131 bugzilla.redhat.com · issue tracking
Other references
Source: the record CVE-2025-5318 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse