CVE Vulnerabilities

CVE-2025-5318

Out-of-bounds Read

Published: Jun 24, 2025 | Modified: Jan 21, 2026
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
8.1 MODERATE
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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.

Weakness

The product reads data past the end, or before the beginning, of the intended buffer.

Affected Software

NameVendorStart VersionEnd Version
Openshift_container_platformRedhat4.0 (including)4.0 (including)
Enterprise_linuxRedhat8.0 (including)8.0 (including)
Enterprise_linuxRedhat9.0 (including)9.0 (including)
Enterprise_linuxRedhat10.0 (including)10.0 (including)
Red Hat Enterprise Linux 10RedHatlibssh-0:0.11.1-4.el10_0*
Red Hat Enterprise Linux 10RedHatlibssh-0:0.11.1-4.el10_1*
Red Hat Enterprise Linux 8RedHatlibssh-0:0.9.6-15.el8_10*
Red Hat Enterprise Linux 8RedHatlibssh-0:0.9.6-15.el8_10*
Red Hat Enterprise Linux 8.2 Advanced Update SupportRedHatlibssh-0:0.9.0-4.el8_2.1*
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportRedHatlibssh-0:0.9.4-2.el8_4.1*
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-OnRedHatlibssh-0:0.9.4-2.el8_4.1*
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update SupportRedHatlibssh-0:0.9.6-4.el8_6.1*
Red Hat Enterprise Linux 8.6 Telecommunications Update ServiceRedHatlibssh-0:0.9.6-4.el8_6.1*
Red Hat Enterprise Linux 8.6 Update Services for SAP SolutionsRedHatlibssh-0:0.9.6-4.el8_6.1*
Red Hat Enterprise Linux 8.8 Telecommunications Update ServiceRedHatlibssh-0:0.9.6-13.el8_8.1*
Red Hat Enterprise Linux 8.8 Update Services for SAP SolutionsRedHatlibssh-0:0.9.6-13.el8_8.1*
Red Hat Enterprise Linux 9RedHatlibssh-0:0.10.4-15.el9_6*
Red Hat Enterprise Linux 9RedHatlibssh-0:0.10.4-15.el9_7*
Red Hat Enterprise Linux 9RedHatlibssh-0:0.10.4-15.el9_6*
Red Hat Enterprise Linux 9RedHatlibssh-0:0.10.4-15.el9_7*
Red Hat Enterprise Linux 9.0 Update Services for SAP SolutionsRedHatlibssh-0:0.9.6-3.el9_0.1*
Red Hat Enterprise Linux 9.2 Update Services for SAP SolutionsRedHatlibssh-0:0.10.4-9.el9_2.1*
Red Hat Enterprise Linux 9.4 Extended Update SupportRedHatlibssh-0:0.10.4-13.el9_4.1*
Red Hat OpenShift Container Platform 4.12RedHatrhcos-412.86.202511191939-0*
Red Hat OpenShift Container Platform 4.13RedHatrhcos-413.92.202511261311-0*
Red Hat OpenShift Container Platform 4.14RedHatrhcos-414.92.202511122212-0*
Red Hat OpenShift Container Platform 4.16RedHatrhcos-416.94.202601071926-0*
Red Hat OpenShift Container Platform 4.17RedHatrhcos-417.94.202510282022-0*
Red Hat OpenShift Container Platform 4.18RedHatrhcos-418.94.202511041748-0*
Red Hat OpenShift Container Platform 4.19RedHatrhcos-4.19.9.6.202510281054-0*
Red Hat OpenShift Container Platform 4.20RedHatrhcos-4.20.9.6.202510290321-0*
Red Hat AI Inference Server 3.2RedHatrhaiis/vllm-cuda-rhel9:sha256:bddcf7ab6d576572b6d60822c313ffebcd9869e4fde93e32ac327821f93cf32b*
Red Hat AI Inference Server 3.2RedHatrhaiis/vllm-rocm-rhel9:sha256:7856bdb7ae0d643a7b9362c164d4d4fe3c0c7186f5fff73a7ae9835b3df52e57*
Red Hat AI Inference Server 3.2RedHatrhaiis/model-opt-cuda-rhel9:sha256:dce6b0ea03379bf06664a5200af8b5f5ae3fad13cdce6d21873843f22554800b*
Red Hat OpenShift distributed tracing 3.7.1RedHatrhosdt/tempo-gateway-opa-rhel8:sha256:3f12344a5c4c07de6355c07a70115b852a80559daf0c95aec586af96821b6b22*
Red Hat OpenShift distributed tracing 3.7.1RedHatrhosdt/tempo-gateway-rhel8:sha256:8ee1496c50ffa203204170d053e327fe9fcddf215c799cb96d2c0e74da1dc945*
Red Hat OpenShift distributed tracing 3.7.1RedHatrhosdt/tempo-jaeger-query-rhel8:sha256:dcbae88d4be5b004ff7473bcfbbd57946c773f7e77fc99da0b5b023310f55ddd*
Red Hat OpenShift distributed tracing 3.7.1RedHatrhosdt/tempo-query-rhel8:sha256:8ad291327a8410feb2d34afeb0d0c7f847a1cffc838883b65d71427b3f97670a*
Red Hat OpenShift distributed tracing 3.7.1RedHatrhosdt/tempo-rhel8:sha256:2c938cee177e95f78683ca721744a3dd3b12b1315a1f54893b450457bdd65a5f*
Red Hat OpenShift distributed tracing 3.7.1RedHatrhosdt/tempo-rhel8-operator:sha256:054f4ed9b24b1bc6fc885408d261d74fd2fc9f97ed8fc62f4a167e08d2a18eb3*
LibsshUbuntuesm-infra/bionic*
LibsshUbuntuesm-infra/focal*
LibsshUbuntuesm-infra/xenial*
LibsshUbuntujammy*
LibsshUbuntunoble*
LibsshUbuntuoracular*
LibsshUbuntuplucky*
LibsshUbuntuupstream*

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.

References