Security Advisory

CVE-2026-15370: libssh SFTP Server Stack Overflow

Last updated:
  • CVE-2026-15370

CVE-2026-15370 is a stack buffer overflow in the SFTP server of libssh 0.11.0 to 0.11.4 and 0.12.0: listing a directory with long, attacker-chosen file names overflows the buffer used for the longname field. NVD scores it 7.3; libssh 0.11.5 and 0.12.1 fix it, and only products that run a libssh-based SFTP server are exposed.

Vulnerability summary

CVSS base score

7.3

High severity

EPSS score (FIRST)

0.2%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2026-15370 · Source: NVD

Affected components

ComponentCPEVersion range
libssh (SFTP server)cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*0.11.0 to before 0.11.5, and 0.12.0 (fixed in 0.11.5 and 0.12.1, released 2026-07-21)
OpenWrt packages feed, openwrt-25.12 branch: libsshcpe:/a:libssh:libssh0.11.3 with server and SFTP built in from 2025-11-09 until the 0.12.x updates of 2026-09-28

What does this mean for affected devices?

CVE-2026-15370 is a stack-based buffer overflow (CWE-121) in libssh's SFTP server. The libssh advisory explains that during directory listing the longname field was built "using unsafe strcat", so long file names "could cause stack buffer overflow and potential code execution on the server". The precondition is a user listing files in an attacker-controlled directory on a file system that allows long names, and the advisory lists no workaround. It affects libssh 0.11.0 to before 0.11.5 and before 0.12.1, and only the SFTP server component.

NVD scores it 7.3 (high) with vector CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H, while the libssh project and Red Hat give 6.7 (NVD). The local attack vector reflects that the attacker must place files where the SFTP server will list them. The fixes shipped in the libssh 0.12.1 and 0.11.5 security releases on 2026-07-21, along with other CVEs fixed in the same releases.

The firmware angle is OpenWrt's libssh package, which builds server and SFTP support in for every user of the library (WITH_SERVER and WITH_SFTP on in the package Makefile). The commit history of the openwrt-25.12 branch shows libssh 0.11.3, inside the affected range, from 2025-11-09 until the updates to 0.12.0, 0.12.1 and 0.12.2 landed on 2026-09-28. A device on that branch that serves SFTP through libssh, such as a NETCONF or file-transfer service, should be checked. Our libssh and libssh2 vulnerabilities in embedded firmware guide shows how to find the version and the compiled-in server and SFTP code.

The CVE is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0017, the 6th percentile, in the 2026-11-15 dataset (CISA KEV, FIRST EPSS). The Debian tracker shows trixie fixed in 0.11.5-0+deb13u1 (DSA-6410-1) and bookworm's 0.10.6 not affected because the vulnerable code arrived later.

Device makers should update to libssh 0.11.5, 0.12.1 or later, or apply the upstream fix commit, and keep SFTP services off untrusted interfaces. Our memory corruption fix guide covers replacing unbounded string concatenation and proving the fix landed.

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • SFTP server longname built with unsafe strcat; long file names can overflow a stack buffer; affects >= 0.11.0 < 0.11.5 and < 0.12.1; SFTP server only; no workaround. — libssh security advisory
  • NVD CVSS v3.1 7.3 (Primary); Red Hat 6.7; CWE-121; affected 0.11.0 to before 0.11.5 and 0.12.0. — NVD
  • libssh 0.12.1 and 0.11.5 security releases of 2026-07-21 fix CVE-2026-15370. — libssh release announcement
  • openwrt-25.12 branch: libssh bumped to 0.11.3 on 2025-11-09, updated to 0.12.0, 0.12.1 and 0.12.2 on 2026-09-28. — OpenWrt packages commit history (openwrt-25.12)
  • OpenWrt libssh package builds with WITH_SERVER and WITH_SFTP on. — OpenWrt packages: libssh Makefile
  • Not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.00168 (6th percentile), dataset 2026-11-15, read 2026-11-16. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. libssh security advisory CVE-2026-15370
  3. libssh 0.12.1 and 0.11.5 security releases
  4. OpenWrt packages: libssh Makefile history (openwrt-25.12)
  5. OpenWrt packages: libssh Makefile
  6. Debian Security Tracker
  7. CISA KEV
  8. FIRST EPSS

Frequently asked questions

Which products are exposed to CVE-2026-15370?

Only products that run an SFTP server built on libssh 0.11.0 to 0.11.4 or 0.12.0. The libssh advisory limits the flaw to the SFTP server component, so client-only uses of libssh are outside it (per the libssh advisory).

Why does NVD score CVE-2026-15370 higher than libssh does?

NVD rates it 7.3 with low attack complexity, while libssh and Red Hat rate it 6.7 with high complexity; both use a local attack vector because the attacker must place long file names where the server lists them (per NVD and the libssh advisory).

Did OpenWrt ship an affected libssh?

The openwrt-25.12 packages branch carried libssh 0.11.3, built with server and SFTP support, from 2025-11-09 until it moved to the 0.12 series on 2026-09-28 (per the OpenWrt packages repository).

Is CVE-2026-15370 known to be exploited?

It is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13), and FIRST EPSS gives it 0.0017, the 6th percentile, in the 2026-11-15 dataset (per CISA KEV and FIRST EPSS).