Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker controls or compromises SCP server
-
DeliveryVictim application initiates recursive ScpClient.Download()
-
ExploitServer returns SCP records with traversal filenames (e.g., '../../../.ssh/authorized_keys')
-
ExecutionSSH.NET client writes attacker content to resolved out-of-bounds path
-
ImpactAttacker-controlled file (e.g., authorized_keys) enables persistent access or privilege escalation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim application to call ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) - the recursive directory download overload specifically - against a server the attacker controls or has compromised, or against a connection subject to man-in-the-middle interception. Single-file downloads and SFTP/SSH operations within the same library are not affected. If SSH host key verification is properly enforced (known_hosts or pinned fingerprint), the MITM vector is eliminated, leaving only the malicious-or-compromised-server scenario. The attack does not require any authentication against the client host; the CVSS PR:N reflects that the attacker's server role requires no client-side privileges. Exploitation is limited to the filesystem permissions of the process running the SSH.NET client. |
| Impact | The NVD-assigned CVSS 3.1 score of 7.1 (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L) reflects a network-reachable, unauthenticated attack requiring only that the victim initiate a recursive SCP download. The I:H metric is well-supported: arbitrary file write to locations like ~/.ssh/authorized_keys constitutes a complete integrity compromise of the client host. The UI:R requirement is a genuine friction point in interactive use, but in automated CI/CD pipelines or deployment scripts that pull artifacts via SCP, user interaction is effectively absent. No EPSS score was provided in the input data, and the vulnerability is not listed in CISA KEV, suggesting exploitation has not been observed at scale. The MITM vector requires network positioning (which would normally warrant AC:H), but the 'malicious server' case - where the victim has been directed to a server under attacker control - requires no such positioning and justifies AC:L for the overall risk envelope. Even a mid-sized development team whose CI pipelines download artifacts over SCP from a third-party host should treat this as urgent given the potential for supply-chain-style file overwrites. The absence of a confidentiality impact (C:N) is accurate since the attack is write-only. |
| Exploit ScenarioDerived | An attacker operates or compromises an SCP server that a target application connects to for artifact retrieval. When the SSH.NET client calls ScpClient.Download() for a remote directory, the attacker's server responds with SCP 'D' (directory) and 'C' (file) records containing names such as '../../../home/appuser/.ssh/authorized_keys'. The unpatched client writes the attacker-supplied content to that resolved path, adding the attacker's public key and enabling subsequent SSH login as the application user. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 12, 2026
Path traversal in SSH.NET's ScpClient.Download() enables a malicious, compromised, or man-in-the-middle SCP server to write arbitrary files anywhere the client process has write access during recursive directory downloads. All SSH.NET NuGet package versions up to and including 2025.1.0 are affected; the vulnerability is analogous to CVE-2019-6111 in OpenSSH but extends to directory traversal. No public exploit code or CISA KEV listing has been identified at time of analysis, though the integrity impact is high given the file-write primitive can overwrite SSH authorized keys, shell rc files, or application binaries.
RemediationAI
Upgrade SSH.NET to version 2026.0.0, which includes the fix at commit 600be0de543765995a189b5d7cd4efac5007f3ce (https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ce). This is confirmed as an upstream fix via the GitHub Security Advisory GHSA-q939-rpr3-3284. If an immediate upgrade is not feasible, a targeted workaround is to replace all uses of ScpClient.Download(string, DirectoryInfo) with SFTP-based downloads (SftpClient), which does not share the same unvalidated filename path - note this changes the protocol and may require server-side SFTP subsystem support. Alternatively, restrict which SCP servers the application is permitted to connect to via firewall or SSH known-hosts enforcement, reducing the MITM and malicious-server risk surface; this is a compensating control only and does not fix the underlying traversal flaw.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in nuget
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SSH.NET (nuget/SSH.NET) is a managed .NET library providing SSH, SCP, and SFTP client functionality. The affected code path is ScpClient.InternalDownload(), which processes SCP protocol 'C' (file) and 'D' (directory) records returned by the remote server. Prior to the fix, the library accepted the server-supplied filename verbatim and combined it with the local destination path using standard path-join semantics, without checking for CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - 'Path Traversal'). A server could return a filename such as '../../../.ssh/authorized_keys' or an absolute path, and the client would write to that resolved location. The fix, introduced in commit 600be0de, adds a static EnsureValidLocalName() method that rejects any name that is empty, equals '.' or '..', or contains characters invalid in a local filename (including directory separators, which on Windows includes backslash - a legal Unix filename character that OpenSSH servers can transmit verbatim).
Know when SSH gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Attacker must control or MITM the SCP server, a non-trivial prerequisite warranting AC:H; all other metrics align with the advisory.
Primary rating from Vendor (https://github.com/sshnet/SSH.NET).
CVSS VectorVendor: https://github.com/sshnet/SSH.NET
DescriptionCVE.org
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.
Executive ViewAI
SSH.NET NuGet package (versions up to 2025.1.0) contains a vulnerability that could allow an attacker controlling the network or SCP server to write arbitrary files on client systems during downloads, potentially compromising SSH credentials or application binaries. This affects organizations whose applications depend on this library, particularly those connecting to external servers or operating over untrusted networks.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which
GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi
GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of
freeSSHd.exe in freeSSHd through 1.2.6 allows remote attackers to bypass authentication via a crafted session, as demons
GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi
The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot
OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. Rated medium se
sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing, uses BLOWFISH hashing on a static
The kbdint_next_device function in auth2-chall.c in sshd in OpenSSH through 6.9 does not properly restrict the processin
The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password a
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no
EUVD-2026-60945
GHSA-q939-rpr3-3284
NVD
CVE.org
EPSS
Exploit-DB