---
id: CVE-2025-5318
title: A flaw was found in the libssh library in versions less than 0.11.2
summary: >-
  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 hand…
severity: medium
cvss: 5.4
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N'
cwe:
  - CWE-125
vendor: redhat
product: openshift_container_platform
affected:
  - openshift_container_platform = 4.0
  - enterprise_linux = 8.0
  - enterprise_linux = 9.0
  - enterprise_linux = 10.0
  - libssh < 0.11.2
patched:
  - libssh 0.11.2
published: '2025-06-24'
updated: '2026-09-08'
sourceUpdated: '2026-09-08T15:18:39.210'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-5318'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2025:18231'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:18275'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:18286'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19012'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19098'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19101'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19295'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19300'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19313'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19400'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19401'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19470'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19472'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19807'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:19864'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:20943'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:21013'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:21329'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:21829'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:22275'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:23078'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:23079'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:23080'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:0326'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:1541'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:3461'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:3462'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2025-5318'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2369131'
    label: secalert@redhat.com
  - url: 'https://www.libssh.org/security/advisories/CVE-2025-5318.txt'
    label: secalert@redhat.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-5318.json
  - url: 'https://www.cve.org/CVERecord?id=CVE-2025-5318'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-5318'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-03-18T20:41:38.314148Z'
epss: 0.01714
epssPercentile: 0.76418
ingestedAt: '2026-06-29T13:24:34.382Z'
---

## Overview

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.

## Affected

- `openshift_container_platform = 4.0`
- `enterprise_linux = 8.0`
- `enterprise_linux = 9.0`
- `enterprise_linux = 10.0`
- `libssh < 0.11.2`

## Remediation

Upgrade past the affected range:

- `libssh 0.11.2`

## Vendor advisories

- **RHSA-2025:21829** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.12 · released 2025-11-27 · [advisory](https://access.redhat.com/errata/RHSA-2025:21829)
- **RHSA-2025:22275** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.13 · released 2025-12-05 · [advisory](https://access.redhat.com/errata/RHSA-2025:22275)
- **RHSA-2025:21329** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.14 · released 2025-11-20 · [advisory](https://access.redhat.com/errata/RHSA-2025:21329)
- **RHSA-2026:1541** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.15 · released 2026-02-05 · [advisory](https://access.redhat.com/errata/RHSA-2026:1541)
- **RHSA-2026:0326** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.16 · released 2026-01-15 · [advisory](https://access.redhat.com/errata/RHSA-2026:0326)
- **RHSA-2025:19313** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.17 · released 2025-11-05 · [advisory](https://access.redhat.com/errata/RHSA-2025:19313)
- **RHSA-2025:19864** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.18 · released 2025-11-17 · [advisory](https://access.redhat.com/errata/RHSA-2025:19864)
- **RHSA-2025:19300** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.19 · released 2025-11-05 · [advisory](https://access.redhat.com/errata/RHSA-2025:19300)
- **RHSA-2025:19295** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.20 · released 2025-11-05 · [advisory](https://access.redhat.com/errata/RHSA-2025:19295)
- **RHSA-2025:18231** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10) · released 2025-10-16 · [advisory](https://access.redhat.com/errata/RHSA-2025:18231)
- **RHSA-2025:21013** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10) · released 2025-11-11 · [advisory](https://access.redhat.com/errata/RHSA-2025:21013)
- **Red Hat VEX** · Moderate · affected: Red Hat OpenShift Container Platform 4 · no fix planned: Red Hat OpenShift Container Platform 4 · updated 2026-09-08 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-5318.json)
