---
id: CVE-2026-15370
title: A flaw was found in libssh
summary: >-
  A flaw was found in libssh. During SFTP server directory listing, the longname
  field is constructed with unsafe concatenation into a fixed-size stack buffer.
  When a client causes the server to list attacker-controlled filenames,
  sufficie…
severity: medium
cvss: 6.7
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-121
vendor: libssh
product: libssh
affected:
  - 'libssh >= 0.11.0, < 0.11.5'
  - libssh = 0.12.0
  - hardened_images
  - enterprise_linux = 10.0
  - enterprise_linux = 10.2
  - enterprise_linux_for_els = 10.2
  - enterprise_linux_for_eus = 10.2
  - enterprise_linux_for_ibm_z_systems = 10.0
  - enterprise_linux_for_ibm_z_systems = 10.2
  - enterprise_linux_for_ibm_z_systems_els = 10.2
  - enterprise_linux_for_ibm_z_systems_eus = 10.2
  - enterprise_linux_for_power_little_endian = 10.0
  - enterprise_linux_for_power_little_endian = 10.2
  - enterprise_linux_for_power_little_endian_els = 10.2
  - enterprise_linux_for_power_little_endian_eus = 10.2
patched:
  - libssh 0.11.5
published: '2026-07-21'
updated: '2026-09-22'
sourceUpdated: '2026-09-22T19:47:33.437'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-15370'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2026:47768'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:55855'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2026-15370'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2499049'
    label: secalert@redhat.com
tags:
  - nvd
epss: 0.00168
epssPercentile: 0.05355
ingestedAt: '2026-09-22T20:10:15.029Z'
---

## Overview

A flaw was found in libssh. During SFTP server directory listing, the longname field is constructed with unsafe concatenation into a fixed-size stack buffer. When a client causes the server to list attacker-controlled filenames, sufficiently long names can overflow that stack buffer and may lead to crashes or possible code execution on the server.

## Affected

- `libssh >= 0.11.0, < 0.11.5`
- `libssh = 0.12.0`
- `hardened_images`
- `enterprise_linux = 10.0`
- `enterprise_linux = 10.2`
- `enterprise_linux_for_els = 10.2`
- `enterprise_linux_for_eus = 10.2`
- `enterprise_linux_for_ibm_z_systems = 10.0`
- `enterprise_linux_for_ibm_z_systems = 10.2`
- `enterprise_linux_for_ibm_z_systems_els = 10.2`
- `enterprise_linux_for_ibm_z_systems_eus = 10.2`
- `enterprise_linux_for_power_little_endian = 10.0`
- `enterprise_linux_for_power_little_endian = 10.2`
- `enterprise_linux_for_power_little_endian_els = 10.2`
- `enterprise_linux_for_power_little_endian_eus = 10.2`

## Remediation

Upgrade past the affected range:

- `libssh 0.11.5`
