Stack-based buffer overflow in libssh - CVE-2026-15370

 

Stack-based buffer overflow in libssh - CVE-2026-15370

Published: July 27, 2026


Vulnerability identifier: #VU139525
CSH Severity: Medium
CVSS v4: 7.1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-15370
CWE-ID: CWE-121
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to execute arbitrary code.

The vulnerability exists due to stack-based buffer overflow in the sftp server longname field construction when listing an attacker-controlled directory with long filenames. A local user can cause a user to list a crafted directory to execute arbitrary code.

User interaction is required to list files in an attacker-controlled directory on a filesystem that allows long filenames.


Affected software

libssh
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for ARM 64
Ubuntu
libssh (Ubuntu package)
libssh (Red Hat package)

How to mitigate CVE-2026-15370

Install security update from vendor's website.

libssh - addressed in versions 0.11.5, 0.12.1
libssh (Ubuntu package) - addressed in versions 0.9.6-2ubuntu0.22.04.8, 0.10.6-2ubuntu0.5, 0.11.3-1ubuntu2.1
libssh (Red Hat package) - update to 0.12.0-3.el10_2

External References

Related Security Bulletins