Directory traversal in OpenSSH SFTP during recursive copy operations

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-106552?

CVE-2026-106552 is a vulnerability classified as Relative Path Traversal, affecting OpenSSH (affected versions: < 10.6). This vulnerability is rated Medium, with a CVSS score of 6.5. Current sources do not report this vulnerability as exploited.

Overview

Original source data

In sftp in OpenSSH before 10.6, a server can trigger directory traversal (causing files to be written to unintended locations) during a recursive copy operation.

Affected products and scope

OpenSSH before 10.6 is affected. The vulnerability is in the SFTP subsystem's client-side recursive copy logic. Deployments where OpenSSH is used only as a server (not performing recursive SFTP/SCP downloads from untrusted servers) are not at risk from this specific flaw. The fix is included in OpenSSH 10.6.

Technical details

The flaw is a relative path traversal (CWE-23) in the SFTP client-side handling of recursive copy operations. When the client downloads a directory tree from the server, it processes the directory entries returned by the server. A malicious server can supply entries with path components that escape the intended target directory (for example, using parent-directory references in entry names), causing the client to create or overwrite files outside the user-specified destination. The vulnerability is on the client side: it is the server that supplies the untrusted input.

Exploitability

The attack vector is network-based: the attacker operates a malicious SFTP server. No authentication is required on the attacker's side (they already control the server). However, user interaction is required: a user or automated process must initiate a recursive copy from that server. No public exploit or in-the-wild exploitation has been reported. The exploitability is low in practice because it requires the victim to perform a recursive transfer against a specific hostile endpoint.

Technical impact

An attacker who controls the SFTP server can write or overwrite files at arbitrary paths on the client machine, subject to the permissions of the user running the SFTP/SCP process. There is no confidentiality impact (no data is read or exfiltrated) and no availability impact (no crash or denial of service). The integrity impact is high in the sense that file contents can be placed or altered in arbitrary locations.

Business impact

An attacker who controls the remote server can manipulate where a client writes files during a recursive transfer. This can corrupt or overwrite files in unintended directories, disrupt local workflows, or plant files where a user or process later reads them. For organisations that use automated or scripted SFTP/SCP workflows, a malicious or compromised endpoint could silently corrupt data at the receiving end. The risk is medium: it requires a user or process to initiate a recursive copy against a hostile server, and the impact is limited to integrity rather than data exfiltration or service disruption.

Remediation

Upgrade OpenSSH to 10.6 or later. If an immediate upgrade is not possible, avoid performing recursive SFTP or SCP copy operations against untrusted or unverified servers. Restrict which hosts are allowed as sources for automated file transfer workflows.

Detection

Look for SFTP or SCP session logs showing recursive copy operations targeting newly introduced or untrusted remote hosts. File system monitoring can reveal unexpected file creation or modification in directories that do not correspond to normal transfer destinations, particularly during or shortly after an SFTP session. If your environment uses scripted SFTP workflows, audit the destination paths and compare them against what the scripts are expected to write.

Sources (8)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.