Description
sftp in OpenSSH before 10.4 does not properly constrain the location of downloaded files when "sftp server:/path ." is used with an attacker-controlled server.
Published: 2026-07-08
Score: 4.2 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the sftp client component of OpenSSH before version 10.4. When a user connects to an attacker‑controlled SFTP server and requests a file download using the syntax "sftp server:\/path .", the client does not properly constrain the target directory for the downloaded file. The server can supply a malicious file name that includes an arbitrary local path, allowing the client to write the file to any location on the local filesystem. This behavior is categorized by CWE‑22 and CWE‑23 and could result in the creation or overwrite of unintended files, potentially compromising data confidentiality or integrity.

Affected Systems

OpenBSD OpenSSH installations running any version earlier than 10.4 are affected. The issue is confined to the sftp client component and has been documented by the OpenSSH developers in the changelog for version 10.4.

Risk and Exploitability

The CVSS score of 4.2 indicates a moderate severity, while the EPSS score of < 1% signals a very low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires the victim client to initiate a the malicious file name, the client writes the file to the location specified by the server, potentially allowing the attacker to overwrite user or system files depending on the client's privileges. The attack vector is remote via the SFTP protocol, but the impact is local to the client machine.

Generated by OpenCVE AI on July 26, 2026 at 18:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenSSH to version 10.4 or later.
  • Configure the sftp client to use a restricted download directory that the user cannot write to.
  • Run the sftp client under a non‑privileged account with strict permission settings.
  • Implement file integrity monitoring or background checks to detect unexpected file creations or overwrites.

Generated by OpenCVE AI on July 26, 2026 at 18:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8533-1 OpenSSH vulnerabilities
History

Wed, 08 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Title openssh: OpenSSH: sftp client allows attacker to control downloaded file location
Weaknesses CWE-22
References
Metrics threat_severity

None

threat_severity

Moderate


Wed, 08 Jul 2026 01:00:00 +0000

Type Values Removed Values Added
Description sftp in OpenSSH before 10.4 does not properly constrain the location of downloaded files when "sftp server:/path ." is used with an attacker-controlled server.
First Time appeared Openbsd
Openbsd openssh
Weaknesses CWE-23
CPEs cpe:2.3:a:openbsd:openssh:*:*:*:*:*:*:*:*
Vendors & Products Openbsd
Openbsd openssh
References
Metrics cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-07-08T12:52:35.500Z

Reserved: 2026-07-08T00:04:49.591Z

Link: CVE-2026-59995

cve-icon Vulnrichment

Updated: 2026-07-08T12:52:31.698Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-08T00:04:49Z

Links: CVE-2026-59995 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T18:45:03Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-23

    Relative Path Traversal