Loading...
Skip to main content

CVE-2026-48798 — Vulnerability in SSH.NET — CVE Details

HIGH

SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames

Published August 12, 2026Updated August 18, 2026Source: osv

Summary

## Summary `ScpClient.Download(string directoryName, DirectoryInfo directoryInfo)` writes files and directories using names returned by the remote SCP server during recursive downloads, with no validation that the resulting path stays inside the requested local directory. A malicious, compromised, or man-in-the-middle SCP server can return names containing `../` sequences (or absolute paths), causing the client to create directories and write/overwrite files anywhere the client process has access. This is similar to OpenSSH [CVE-2019-6111](https://github.com/advisories/GHSA-jr78-hfw4-xp7g), but with directory traversal capability. ## Impact A malicious/compromised/MITM SCP server can create or write files outside the intended download directory, anywhere the client process can write. Overwriting files such as ~/.ssh/authorized_keys, shell rc files, cron entries, or application binaries/config can lead to persistence, privilege escalation, or remote code execution on the client host. Requires the victim to perform a directory download from the attacker-controlled server. ## Remediation The fixed release ensures that remotely-supplied file and directory names are valid local names such that the constructed local path is contained within the given local directory, and throws `ScpException` when an invalid name is detected. [600be0de543765995a189b5d7cd4efac5007f3ce](https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ce)

Advisory Timeline

  • First published August 12, 2026 (61 days ago).
  • Last revised August 18, 2026 — 6 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update SSH.NET to 2026.0.0 or later
dotnet add package SSH.NET --version 2026.0.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: nuget (1).

PackageEcosystemAffectedFixed In
SSH.NET
nuget
2011.12.7, 2011.7.29, 2011.9.28, 2012.12.3 (+28 more)2026.0.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

Frequently Asked Questions

What is CVE-2026-48798?
SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.1/10).
How do I check if my project is affected by CVE-2026-48798?
CVE-2026-48798 affects SSH.NET. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48798 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.1

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-q939-rpr3-3284

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies