# CVE-2025-5318: Libssh: out-of-bounds read in sftp_handle()

- Severity: Medium 5.4 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.03%, higher than 81% of CVEs (2026-12-01)
- Published: 2025-06-24T14:10:07.188Z
- Modified: 2026-11-05T16:17:21.080Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: redhat

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

(As written by CVE List.)

## Affected

- libssh: before 0.11.2 (not affected: from 0:0.11.1-4.el10_0 before *; from 0:0.11.1-4.el10_1 before *; from 0:0.9.6-15.el8_10 before *; from 0:0.9.0-4.el8_2.1 before *; from 0:0.9.4-2.el8_4.1 before *; from 0:0.9.6-4.el8_6.1 before *; from 0:0.9.6-13.el8_8.1 before *; from 0:0.10.4-15.el9_6 before *; from 0:0.10.4-15.el9_7 before *; from 0:0.9.6-3.el9_0.1 before *; from 0:0.10.4-9.el9_2.1 before *; from 0:0.10.4-13.el9_4.1 before *)
- openshift/ose-rhel-coreos-8: no versions given (not affected: from 412.86.202511191939-0 before *)
- openshift/ose-rhel-coreos-9: no versions given (not affected: from 413.92.202511261311-0 before *; from 414.92.202511122212-0 before *; from 415.92.202601271320-0 before *; from 416.94.202601071926-0 before *; from 417.94.202510282022-0 before *; from 418.94.202511041748-0 before *; from 4.19.9.6.202510281054-0 before *; from 4.20.9.6.202510290321-0 before *)
- rhaiis/vllm-cuda-rhel9: no versions given (not affected: from 3.2.2-1765379088 before *; from 1772160593 before *)
- rhaiis/vllm-rocm-rhel9: no versions given (not affected: from 3.2.2-1765379049 before *; from 1772160625 before *)
- rhaiis/model-opt-cuda-rhel9: no versions given (not affected: from 3.2.2-1764871796 before *)
- rhosdt/tempo-gateway-opa-rhel8: no versions given (not affected: from rhosdt-3.7-1762254546 before *)
- rhosdt/tempo-gateway-rhel8: no versions given (not affected: from rhosdt-3.7-1762254552 before *)
- rhosdt/tempo-jaeger-query-rhel8: no versions given (not affected: from rhosdt-3.7-1762255881 before *)
- rhosdt/tempo-query-rhel8: no versions given (not affected: from rhosdt-3.7-1762254530 before *)
- rhosdt/tempo-rhel8: no versions given (not affected: from rhosdt-3.7-1762254519 before *)
- rhosdt/tempo-rhel8-operator: no versions given (not affected: from rhosdt-3.7-1762254545 before *)
- redhat openshift_container_platform: 4.0
- redhat enterprise_linux: 8.0; 9.0; 10.0
- libssh libssh: before 0.11.2

## Every score

- redhat: 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`
- NVD: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://access.redhat.com/errata/RHSA-2025:18231> (third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:18275> (third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:18286> (third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19012> (third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19098> (third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19101> (third-party-advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19295> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19300> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19313> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19400> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19401> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19470> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19472> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19807> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:19864> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:20943> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:21013> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:21329> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:21829> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:22275> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:23078> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:23079> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2025:23080> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:0326> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:1541> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:3461> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:3462> (vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2025-5318> (third-party-advisory, vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2369131> (issue-tracking, third-party-advisory)
- <https://www.libssh.org/security/advisories/CVE-2025-5318.txt> (vendor-advisory)

## Sources

- CVE List: [CVE-2025-5318](https://www.cve.org/CVERecord?id=CVE-2025-5318), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2025-5318](https://nvd.nist.gov/vuln/detail/CVE-2025-5318), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2025-5318 · Whole record: https://cve.day/CVE-2025-5318.json · Rebuilt by cve.day 2026-11-25T22:58:59.569Z
