
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-48798 is a path traversal vulnerability in the SSH.NET library's ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) method that allows a malicious or man-in-the-middle SCP server to write files outside the intended local download directory. All versions of the NuGet package SSH.NET up to and including 2025.1.0 are affected; the issue is fixed in version 2026.0.0. The vulnerability was reported by Nadav0077 and igorpyan, published by Rob-Hague on August 9, 2026, and added to the GitHub Advisory Database on August 12, 2026. It carries a CVSS v3.1 base score of 7.1 (High) (GitHub Advisory, SSH.NET Advisory).
The root cause is the absence of input validation on server-supplied file and directory names during recursive SCP downloads, classified as CWE-22 (Path Traversal) and CWE-73 (External Control of File Name or Path). During a recursive download, the SCP protocol transmits C (file) and D (directory) records containing names that the client combines with the local destination path using Path.Combine(); without sanitization, names containing ../, absolute paths, drive qualifiers (e.g., C:\), or other path separators cause writes outside the intended directory. The fix introduces an EnsureValidLocalName() method that rejects any server-supplied name that is empty, equals . or .., or contains characters invalid in a local filename (using Path.GetInvalidFileNameChars(), which is platform-aware), throwing a ScpException on detection. This is analogous to OpenSSH CVE-2019-6111 but extends to directory traversal (GitHub Advisory, Fix Commit).
A successful exploit allows a malicious, compromised, or MITM SCP server to create directories and write or overwrite arbitrary files anywhere the client process has filesystem access. High-value targets include ~/.ssh/authorized_keys (enabling persistent unauthorized SSH access), shell RC files, cron entries, and application binaries or configuration files, any of which can lead to persistence, privilege escalation, or remote code execution on the client host. Confidentiality impact is rated None (the attacker writes files, not reads them), while integrity impact is High and availability impact is Low (SSH.NET Advisory).
Exploitation requires user interaction — specifically, a victim must initiate a directory download (ScpClient.Download) from an attacker-controlled or MITM'd SCP server — but requires no privileges on the attacker's side. No public proof-of-concept exploit code has been identified, and there is no evidence of in-the-wild exploitation at the time of disclosure. The CVE status is listed as Reserved, and it does not appear in the CISA Known Exploited Vulnerabilities catalog. No EPSS score is currently available (GitHub Advisory).
C (file) or D (directory) SCP protocol records whose name fields contain path traversal sequences such as ../, absolute paths like /tmp/evil, or on Windows, backslash sequences like ..\escaped\owned.txt.ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) to connect to the malicious server and initiate a recursive directory download.C0644 0 ../../../home/user/.ssh/authorized_keys\n followed by the attacker's public key as file content.~/.ssh/authorized_keys to enable passwordless SSH login) (GitHub Advisory, Fix Commit).~/.ssh/authorized_keys, ~/.bashrc, ~/.profile, /etc/cron.d/, or application binary/config directories; newly created directories with names matching traversal patterns.ScpException with the message "not a valid local name" (on patched versions, indicating an attempted exploit); SSH connection logs showing connections to unfamiliar or unexpected SCP server addresses.~/.ssh/authorized_keys) coinciding with SCP download activity from the affected application (SSH.NET Advisory).Upgrade the SSH.NET NuGet package to version 2026.0.0, which introduces the EnsureValidLocalName() validation guard that rejects any server-supplied name containing path traversal sequences before any local filesystem operation is performed. No configuration-based workaround is available for unpatched versions; the only safe mitigation is upgrading. As an interim measure, restrict use of ScpClient.Download with directory arguments to connections with fully trusted, verified SCP servers, and avoid connecting to untrusted or third-party SCP endpoints (GitHub Advisory, Fix Commit).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."