Skip to main content

libssh EUVDEUVD-2026-46169

| CVE-2026-15370 HIGH
Stack-based Buffer Overflow (CWE-121)
2026-07-21 secalert@redhat.com GHSA-6j7f-8jjp-mm8c
7.3
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to SFTP server
  2. Delivery
    Create file with overlong name
  3. Exploit
    Request directory listing
  4. Execution
    Overflow longname stack buffer
  5. Impact
    Crash service or execute code on server

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target to be running libssh in SFTP SERVER mode and the attacker to be able to influence filenames in a directory the server will list - i.e., write/upload access sufficient to create a sufficiently long filename, followed by a directory-listing (readdir/opendir) operation on that directory. Per the provided vector, exploitation needs low privileges (PR:L, i.e., an authenticated/authorized SFTP session) and a client-driven listing action (UI:R). Limiting factors: the SFTP server subsystem must be enabled (pure client uses of libssh are unaffected), the attacker must be permitted to create or name files in a listable path, and hardened builds with stack canaries/ASLR make reliable code execution difficult, more likely degrading the outcome to a server crash. Note the supplied vector's AV:L (local) is inconsistent with the network-facing SFTP scenario in the description and should be verified.

Impact

Signals are mixed and one is internally inconsistent, so this warrants careful triage rather than blind CVSS-driven urgency. The supplied CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:R, base 7.3) rates it HIGH with full C/I/A impact, yet the description clearly describes a network-reachable SFTP server being fed attacker-controlled filenames - an AV:L (local) rating conflicts with a network SFTP service and should be verified with the vendor; a network vector would raise real-world severity. EPSS is very low (0.10%, 1st percentile) and there is no KEV listing and no public exploit identified, so widespread opportunistic exploitation is not currently indicated. Practical exploitation for code execution against a hardened, stack-protected build (RHEL ships with stack canaries/FORTIFY) is non-trivial and would more likely yield a denial of service (server crash) than reliable RCE. Net: a genuine memory-safety bug worth patching promptly on any SFTP-server deployment, but not a fire-drill absent active exploitation.

Exploit ScenarioDerived

An attacker with legitimate or low-privileged SFTP access uploads (or names) a file whose filename is long enough to overflow the server's fixed-size longname buffer, then issues a directory-listing request for that folder. As the libssh server builds the listing it overruns the stack buffer, crashing the SFTP service and - on an unhardened build - potentially redirecting execution to attacker-controlled data. No public exploit is identified at time of analysis, and given AC:L the primary realistic outcome is denial of service.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Jul 30, 2026

Stack-based buffer overflow in libssh's SFTP server allows a connected client to crash the server or potentially execute code by placing files with overlong names into a directory the server subsequently lists. The flaw lives in how libssh builds the SFTP 'longname' field, concatenating attacker-influenced filenames into a fixed-size stack buffer without adequate bounds checking. There is no public exploit identified at time of analysis and EPSS is very low (0.10%), but the memory-corruption nature (CWE-121) and libssh's broad deployment make it worth prioritized patching.

Earlier versions of this analysis (1)
v1 Jul 21, 2026 - 09:31 CVSS 6.7

Stack-based buffer overflow in libssh's SFTP server directory listing code allows an attacker who can influence filenames in a listed directory to overflow a fixed-size stack buffer during longname field construction, potentially causing server crashes or code execution under the server process's privileges. Affected deployments are those running libssh in SFTP server mode where clients can trigger directory listings of attacker-influenced directories. No public exploit has been identified at time of analysis, and the vulnerability is not currently listed in CISA KEV.

RemediationAI

Patch available per Red Hat advisory RHSA-2026:47768 (https://access.redhat.com/errata/RHSA-2026:47768); on RHEL 10 and Red Hat hardened images, update the libssh packages to the fixed build and restart or redeploy services that link the library, then confirm no statically linked copies remain unpatched. An exact upstream libssh release version is not provided in the source data and should be confirmed against the libssh project release notes before pinning. Where immediate patching is not possible, compensating controls include restricting SFTP write access so untrusted users cannot create arbitrary filenames (this blocks the injection vector but breaks legitimate uploads), enforcing filename-length limits at the application or chroot layer, and limiting network exposure of the SFTP service to trusted networks/VPN (reduces reachable attack surface at the cost of remote-access convenience). Ensure stack protections (canaries, FORTIFY_SOURCE) are enabled to reduce crashes to non-exploitable failures rather than code execution.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

libssh is a widely used C implementation of the SSH2 protocol providing both client and server (including SFTP subsystem) functionality, embedded in many applications and Linux distributions. The vulnerability is a CWE-121 stack-based buffer overflow triggered in the SFTP server's directory-listing path: SFTP responses include a human-readable 'longname' string (an ls -l style line combining permissions, owner, size and the filename). libssh constructs this line via unsafe concatenation into a fixed-size stack buffer, so a filename long enough to exceed the buffer overwrites adjacent stack memory. CPE data confirms the affected component is libssh itself (cpe:2.3:a:libssh:libssh) as shipped in Red Hat Enterprise Linux 10.0 (cpe:2.3:o:redhat:enterprise_linux:10.0) and Red Hat hardened images.

Know when Libssh gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.3 HIGH
AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

SFTP is network-reachable (AV:N) and needs an authenticated session able to create/list files (PR:L); the attacker drives the listing themselves so UI:N, with memory corruption yielding full C/I/A.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 6.7 MEDIUM
AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Red Hat 6.7 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Analysis Updated
Jul 30, 2026 - 13:31 vuln.today
v2 - CVSS changed
Severity Changed
Jul 30, 2026 - 13:22 NVD
MEDIUM HIGH
CVSS changed
Jul 30, 2026 - 13:22 NVD
6.7 (MEDIUM) 7.3 (HIGH)

DescriptionNVD

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.

Executive ViewAI

Why It Matters

libssh SFTP services are exposed to a high-severity code-execution vulnerability (CVE-2026-15370) triggered by file upload operations, with no vendor patch currently available. Organizations using libssh for internal or external file transfer face both availability and compromise risk until patched. Immediate access controls and monitoring are essential.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict SFTP access to trusted clients via network segmentation and firewall rules; implement detailed audit logging of SFTP file operations to detect exploitation; disable SFTP on systems where operationally unnecessary; enforce strict file naming and upload size policies to prevent buffer overflow triggers; monitor libssh advisories for patch release. These controls reduce exposure but do not eliminate the vulnerability.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
High
libssh is a widely embedded SSH/SFTP library across Linux distros and applications
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)NVD

cpe:2.3:a:libssh:libssh:-:*:*:*:*:*:*:*
cpe:2.3:a:redhat:hardened_images:-:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*

More in Libssh

View all
CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2018-10933 CRITICAL POC
9.1 Oct 17

A vulnerability was found in libssh's server-side state machine before versions 0.7.6 and 0.8.4. Rated critical severity

CVE-2020-16135 MEDIUM POC
5.9 Jul 29

libssh 0.9.4 has a NULL pointer dereference in tftpserver.c if ssh_buffer_new returns NULL. Rated medium severity (CVSS

CVE-2012-4562 HIGH
7.5 Nov 30

Multiple integer overflows in libssh before 0.5.3 allow remote attackers to cause a denial of service (infinite loop or

CVE-2012-4560 HIGH
7.5 Nov 30

Multiple buffer overflows in libssh before 0.5.3 allow remote attackers to cause a denial of service (crash) or possibly

CVE-2025-5372 HIGH
8.8 Jul 04

Cryptographic key derivation failure in libssh versions prior to 0.11.2 (when built against OpenSSL older than 3.0) can

CVE-2019-14889 HIGH
8.8 Dec 10

A flaw was found with the libssh API function ssh_scp_new() in versions before 0.9.3 and before 0.8.8. Rated high severi

CVE-2025-5987 HIGH
8.1 Jul 07

A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library.

CVE-2015-3146 HIGH
7.5 Apr 13

The (1) SSH_MSG_NEWKEYS and (2) SSH_MSG_KEXDH_REPLY packet handlers in package_cb.c in libssh before 0.6.5 do not proper

CVE-2012-6063 HIGH
7.5 Nov 30

Double free vulnerability in the sftp_mkdir function in sftp.c in libssh before 0.5.3 allows remote attackers to cause a

CVE-2012-4559 MEDIUM
6.8 Nov 30

Multiple double free vulnerabilities in the (1) agent_sign_data function in agent.c, (2) channel_request function in cha

CVE-2016-0739 MEDIUM
5.9 Apr 13

libssh before 0.7.3 improperly truncates ephemeral secrets generated for the (1) diffie-hellman-group1 and (2) diffie-he

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected
SUSE Linux Enterprise Micro 5.4 Not-Affected
SUSE Linux Enterprise Micro 5.5 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy