cve.bz

CVE-2025-5318 Out-of-bounds Read

5.4 mediumEPSS 2.0%Fix available

Medium (5.4). EPSS 2.0% estimated probability of exploitation activity in the next 30 days.

On this page
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 3.1

5.4 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
EPSS
2.0% (unchanged from 1.9% a week ago; 1.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 82nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-03-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-125 Out-of-bounds Read
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

  • Red Hat Red Hat Enterprise Linux 10: fixed in 0:0.11.1-4.el10_0
  • Red Hat Red Hat Enterprise Linux 10: fixed in 0:0.11.1-4.el10_1
  • Red Hat Red Hat Enterprise Linux 8: fixed in 0:0.9.6-15.el8_10
  • Red Hat Red Hat Enterprise Linux 8.2 Advanced Update Support: fixed in 0:0.9.0-4.el8_2.1
  • Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support: fixed in 0:0.9.4-2.el8_4.1
  • Red Hat Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On: fixed in 0:0.9.4-2.el8_4.1
  • Red Hat Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support: fixed in 0:0.9.6-4.el8_6.1
  • Red Hat Red Hat Enterprise Linux 8.6 Telecommunications Update Service: fixed in 0:0.9.6-4.el8_6.1
  • Debian, Ubuntu, Red Hat, SUSE, openSUSE, AlmaLinux, Rocky Linux, Alpine, Azure Linux, Alpaquita: fixed package versions per release
  • Vendor advisory: https://www.libssh.org/security/advisories/CVE-2025-5318.txt

Ask an AI about this CVE

Show the promptExplain CVE-2025-5318 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-5318?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-5318?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-5318 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

Fixed in

ProductFixed in
Red Hat Enterprise Linux 100:0.11.1-4.el10_0
Red Hat Enterprise Linux 100:0.11.1-4.el10_1
Red Hat Enterprise Linux 80:0.9.6-15.el8_10
Red Hat Enterprise Linux 8.2 Advanced Update Support0:0.9.0-4.el8_2.1
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support0:0.9.4-2.el8_4.1
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On0:0.9.4-2.el8_4.1
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support0:0.9.6-4.el8_6.1
Red Hat Enterprise Linux 8.6 Telecommunications Update Service0:0.9.6-4.el8_6.1
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions0:0.9.6-4.el8_6.1
Red Hat Enterprise Linux 8.8 Telecommunications Update Service0:0.9.6-13.el8_8.1
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions0:0.9.6-13.el8_8.1
Red Hat Enterprise Linux 90:0.10.4-15.el9_6
Red Hat Enterprise Linux 90:0.10.4-15.el9_7
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions0:0.9.6-3.el9_0.1
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions0:0.10.4-9.el9_2.1
Red Hat Enterprise Linux 9.4 Extended Update Support0:0.10.4-13.el9_4.1
Red Hat OpenShift Container Platform 4.12412.86.202511191939-0
Red Hat OpenShift Container Platform 4.13413.92.202511261311-0
Red Hat OpenShift Container Platform 4.14414.92.202511122212-0
Red Hat OpenShift Container Platform 4.15415.92.202601271320-0
Red Hat OpenShift Container Platform 4.16416.94.202601071926-0
Red Hat OpenShift Container Platform 4.17417.94.202510282022-0
Red Hat OpenShift Container Platform 4.18418.94.202511041748-0
Red Hat OpenShift Container Platform 4.194.19.9.6.202510281054-0
Red Hat OpenShift Container Platform 4.204.20.9.6.202510290321-0
Red Hat AI Inference Server 3.23.2.2-1765379088
Red Hat AI Inference Server 3.23.2.2-1765379049
Red Hat AI Inference Server 3.23.2.2-1764871796
Red Hat AI Inference Server 3.21772160593
Red Hat AI Inference Server 3.21772160625
Red Hat OpenShift distributed tracing 3.7.0rhosdt-3.7-1762254546
Red Hat OpenShift distributed tracing 3.7.0rhosdt-3.7-1762254552
Red Hat OpenShift distributed tracing 3.7.0rhosdt-3.7-1762255881
Red Hat OpenShift distributed tracing 3.7.0rhosdt-3.7-1762254530
Red Hat OpenShift distributed tracing 3.7.0rhosdt-3.7-1762254519
Red Hat OpenShift distributed tracing 3.7.0rhosdt-3.7-1762254545

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11libssh0.9.8-0+deb11u2DLA-4385-1
Debian12libssh0.10.6-0+deb12u2DEBIAN-CVE-2025-5318
Debian13, 14libssh0.11.2-1DEBIAN-CVE-2025-5318
Ubuntu22.04:LTSlibssh0.9.6-2ubuntu0.22.04.4UBUNTU-CVE-2025-5318 USN-7619-1
Ubuntu24.04:LTSlibssh0.10.6-2ubuntu0.1UBUNTU-CVE-2025-5318 USN-7619-1
UbuntuPro:16.04:LTSlibssh0.6.3-4.3ubuntu0.6+esm2UBUNTU-CVE-2025-5318 USN-7696-1
UbuntuPro:18.04:LTSlibssh0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4UBUNTU-CVE-2025-5318 USN-7696-1
UbuntuPro:20.04:LTSlibssh0.9.3-2ubuntu2.5+esm1UBUNTU-CVE-2025-5318 USN-7696-1
Red Hatenterprise_linux:8::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.6-15.el8_10RHSA-2025:18286
Red Hatenterprise_linux:8::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.6-15.el8_10RHSA-2025:18286
Red Hatenterprise_linux:9::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.10.4-15.el9_6RHSA-2025:18275
Red Hatenterprise_linux:9::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.10.4-15.el9_7RHSA-2025:20943
Red Hatenterprise_linux:9::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.10.4-15.el9_6RHSA-2025:18275
Red Hatenterprise_linux:9::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.10.4-15.el9_7RHSA-2025:20943
Red Hatenterprise_linux:10.0libssh, libssh-devel, libssh-config and 2 more0:0.11.1-4.el10_0RHSA-2025:18231
Red Hatenterprise_linux:10.1libssh, libssh-devel, libssh-config and 2 more0:0.11.1-4.el10_1RHSA-2025:21013
Red Hatrhel_aus:8.2::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.0-4.el8_2.1RHSA-2025:19400
Red Hatrhel_aus:8.2::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.0-4.el8_2.1RHSA-2025:19400
Red Hatrhel_aus:8.4::appstream, rhel_eus_long_life:8.4::appstreamlibssh-devel, libssh-debuginfo, libssh-debugsource0:0.9.4-2.el8_4.1RHSA-2025:19401
Red Hatrhel_aus:8.4::baseos, rhel_eus_long_life:8.4::baseoslibssh, libssh-config, libssh-debuginfo and 1 more0:0.9.4-2.el8_4.1RHSA-2025:19401
10 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Micro 5.1 and 3 morelibssh0.9.8-150200.13.9.1SUSE-SU-2025:02279-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 10 morelibssh0.9.8-150400.3.9.1SUSE-SU-2025:02278-1
SUSELinux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Basesystem 15 SP7libssh0.9.8-150600.11.3.1SUSE-SU-2025:02229-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5libssh0.6.3-12.15.1SUSE-SU-2025:02755-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5libssh0.9.8-3.15.1SUSE-SU-2025:02281-1
SUSELinux Micro 6.0libssh0.10.6-2.1SUSE-SU-2025:20557-1
SUSELinux Micro 6.1libssh0.10.6-slfo.1.1_2.1SUSE-SU-2025:20596-1
openSUSELeap 15.6libssh0.9.8-150600.11.3.1SUSE-SU-2025:02229-1
openSUSETumbleweedlibssh0.11.2-1.1openSUSE-SU-2025:15243-1
AlmaLinux8libssh, libssh-devel, libssh-config0.9.6-15.el8_10ALSA-2025:18286
AlmaLinux9libssh, libssh-devel, libssh-config0.10.4-15.el9_6ALSA-2025:18275
AlmaLinux9libssh, libssh-devel, libssh-config0.10.4-15.el9_7ALSA-2025:20943
AlmaLinux10libssh, libssh-devel, libssh-config0.11.1-4.el10_1ALSA-2025:21013
AlmaLinux10libssh-config0.11.1-4.el10_0ALSA-2025:18231
Rocky Linux8libssh0:0.9.6-15.el8_10RLSA-2025:18286
Rocky Linux9libssh0:0.10.4-15.el9_6RLSA-2025:18275 RLSA-2025:20943
Rocky Linux10libssh0:0.11.1-4.el10_0RLSA-2025:18231
Alpinev3.22, v3.23, v3.24libssh0.11.2-r0ALPINE-CVE-2025-5318
Azure Linux2libssh0.10.6-2AZL-64358
Azure Linux3libssh0.10.6-2AZL-64346
Alpaquita23, 25, streamlibssh0.11.2-r0BELL-CVE-2025-5318

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue requires an attacker with valid credentials to access a server, limiting the scope to legitimate users of the SFTP service. Due to this reason, this flaw has been rated with a Moderate severity.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10libssh-0:0.11.1-4.el10_0Fixed 2025-10-16RHSA-2025:18231
Red Hat Enterprise Linux 10libssh-0:0.11.1-4.el10_1Fixed 2025-11-11RHSA-2025:21013
Red Hat Enterprise Linux 8libssh-0:0.9.6-15.el8_10Fixed 2025-10-20RHSA-2025:18286
Red Hat Enterprise Linux 8.2 Advanced Update Supportlibssh-0:0.9.0-4.el8_2.1Fixed 2025-11-03RHSA-2025:19400
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportlibssh-0:0.9.4-2.el8_4.1Fixed 2025-11-03RHSA-2025:19401
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Onlibssh-0:0.9.4-2.el8_4.1Fixed 2025-11-03RHSA-2025:19401
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportlibssh-0:0.9.6-4.el8_6.1Fixed 2025-10-27RHSA-2025:19098
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicelibssh-0:0.9.6-4.el8_6.1Fixed 2025-10-27RHSA-2025:19098
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionslibssh-0:0.9.6-4.el8_6.1Fixed 2025-10-27RHSA-2025:19098
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicelibssh-0:0.9.6-13.el8_8.1Fixed 2025-10-27RHSA-2025:19101
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionslibssh-0:0.9.6-13.el8_8.1Fixed 2025-10-27RHSA-2025:19101
Red Hat Enterprise Linux 9libssh-0:0.10.4-15.el9_6Fixed 2025-10-16RHSA-2025:18275
Red Hat Enterprise Linux 9libssh-0:0.10.4-15.el9_7Fixed 2025-11-11RHSA-2025:20943
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutionslibssh-0:0.9.6-3.el9_0.1Fixed 2025-11-03RHSA-2025:19472
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionslibssh-0:0.10.4-9.el9_2.1Fixed 2025-11-03RHSA-2025:19470
Red Hat Enterprise Linux 9.4 Extended Update Supportlibssh-0:0.10.4-13.el9_4.1Fixed 2025-10-23RHSA-2025:19012
Red Hat OpenShift Container Platform 4.12openshift/ose-rhel-coreos-8:412.86.202511191939-0Fixed 2025-11-27RHSA-2025:21829
Red Hat OpenShift Container Platform 4.13openshift/ose-rhel-coreos-9:413.92.202511261311-0Fixed 2025-12-05RHSA-2025:22275
Red Hat OpenShift Container Platform 4.14openshift/ose-rhel-coreos-9:414.92.202511122212-0Fixed 2025-11-20RHSA-2025:21329
Red Hat OpenShift Container Platform 4.15openshift/ose-rhel-coreos-9:415.92.202601271320-0Fixed 2026-02-05RHSA-2026:1541
16 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-5318.

Attack patterns (CAPEC)

  • CAPEC-540 Overread Buffers Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON