CVE-2026-48798 — Vulnerability in SSH.NET — CVE Details
SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.42%). Schedule for your next planned update.
Does your project use an affected SSH.NET version?
Paste your packages.lock.json to check it for CVE-2026-48798 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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, 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.
Advisory Timeline
- First published August 12, 2026 (106 days ago).
- Last revised August 18, 2026 — 6 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package SSH.NET --version 2026.0.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: NuGet (1).
| Package | Fixed In |
|---|---|
| SSH.NET NuGet · Affected: 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.
- CWE-22Path TraversalMITRE
- CWE-73
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
References
- https://github.com/sshnet/SSH.NET/security/advisories/GHSA-q939-rpr3-3284WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-48798ADVISORY
- https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ceWEB
- https://github.com/sshnet/SSH.NETPACKAGE
- https://github.com/sshnet/SSH.NET/releases/tag/2026.0.0WEB
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. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48798 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 28.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-102529HIGH
HtmlSanitizer: CSS Removal DoS
- CVE-2026-85756HIGH
SSH.NET: ScpClient allows server-side RCE via default SCP path handling
- CVE-2026-63184HIGH
Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion