Description
SSH.NET is a Secure Shell (SSH) library for .NET. In 2025.1.0 and earlier, ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) trusts file and directory names returned by a remote SCP server and combines them with the requested local directory without containment validation, allowing a malicious, compromised, or man-in-the-middle server to use ../ sequences or absolute paths to create or overwrite files anywhere writable by the client process. This issue is fixed in version 2026.0.0.
Published: 2026-08-18
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the ScpClient.Download method of SSH.NET versions 2025.1.0 and earlier. This method trusts file and directory names supplied by the remote SCP server and concatenates them with the local destination path without validating that the resulting path remains within the intended directory. Consequently, a malicious or compromised SSH server can provide filenames containing directory traversal sequences such as ../ or absolute paths to cause the client to create, overwrite, or delete files anywhere that the client process has write permission. This results in an arbitrary file write condition that can compromise the confidentiality, integrity, and availability of the system.

Affected Systems

The affected product is SSH.NET, a .NET Secure Shell library, only in versions 2025.1.0 and earlier. The vulnerability is fixed in release 2026.0.0.

Risk and Exploitability

The overall CVSS score of 7.1 indicates a moderate to high impact severity. The EPSS score is not available, so the current likelihood of exploitation is unknown at this time, but the vulnerability is listed as not in the CISA KEV catalog. The attack vector is remote and relies on a malicious or man‑in‑the‑middle SSH server that the client trusts. An attacker controlling such a server can initiate a recursive download that writes arbitrary files on the client, assuming the client process has sufficient local permissions. The absence of containment checks means the threat is executable without additional privileges, making it a realistic risk for any application that performs SCP downloads with SSH.NET.

Generated by OpenCVE AI on August 18, 2026 at 16:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SSH.NET to 2026.0.0 or later, which adds the necessary containment checks.
  • If an upgrade is not immediately possible, implement application‑level validation to reject SCP filenames that contain ../ sequences or absolute paths before invoking ScpClient.Download.
  • Limit the local download directory to a dedicated, write‑protected workspace and run SCP operations with the minimal required permissions.

Generated by OpenCVE AI on August 18, 2026 at 16:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-q939-rpr3-3284 SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames
History

Fri, 21 Aug 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Sshnet
Sshnet ssh.net
Vendors & Products Sshnet
Sshnet ssh.net

Tue, 18 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 18 Aug 2026 15:15:00 +0000

Type Values Removed Values Added
Description SSH.NET is a Secure Shell (SSH) library for .NET. In 2025.1.0 and earlier, ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) trusts file and directory names returned by a remote SCP server and combines them with the requested local directory without containment validation, allowing a malicious, compromised, or man-in-the-middle server to use ../ sequences or absolute paths to create or overwrite files anywhere writable by the client process. This issue is fixed in version 2026.0.0.
Title SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames
Weaknesses CWE-22
CWE-73
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-18T15:28:45.711Z

Reserved: 2026-05-22T20:18:20.366Z

Link: CVE-2026-48798

cve-icon Vulnrichment

Updated: 2026-08-18T15:28:42.868Z

cve-icon NVD

Status : Received

Published: 2026-08-18T15:16:54.427

Modified: 2026-08-18T16:17:11.280

Link: CVE-2026-48798

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T21:18:45Z

Weaknesses
  • CWE-22

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

  • CWE-73

    External Control of File Name or Path