CVE-2026-85756 — Vulnerability in SSH.NET — CVE Details
SSH.NET: ScpClient allows server-side RCE via default SCP path handling
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.62%). 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-85756 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
Default SCP remote-path handling places caller-supplied paths into the command that runs scp on the server. On a shell-based server that command is interpreted by a shell, so an attacker-influenced path that is not quoted to suit that shell can execute as a command as the authenticated SSH user. SSH.NET provides ScpClient.RemotePathTransformation to control escaping behaviour (defaulting to RemotePathTransformation.DoubleQuote) but cannot guarantee safety for arbitrary remote command interpreters. This is inherent to running scp over a remote shell (cf. CVE-2020-15778).
Impact
Command execution on the SSH server as the authenticated SSH user, when an application passes an attacker-influenced remote path to ScpClient against a shell-based server.
Exploitation depends on conditions beyond the attacker's control: the remote server must be shell-based, and the attacker-influenced path must be crafted to defeat the quoting applied by the transformation in effect — that is, to use metacharacters that it does not neutralise (for example $(...) or backticks, which survive the default double-quoting on a POSIX shell). A path that does not meet these escaping rules, or a non-shell-based server, does not result in command execution.
Remediation
The fixed release obsoletes the constructors that silently defaulted the path transformation and adds constructors that require an explicit IRemotePathTransformation, so callers are required to choose one that suits their server and trust environment. For POSIX shells, the library provides RemotePathTransformation.ShellQuote. The legacy default (RemotePathTransformation.DoubleQuote) is unchanged for backwards compatibility. SCP is considered legacy and SFTP, which does not involve a remote shell, is recommended where possible (via SftpClient).
Advisory Timeline
- First published September 17, 2026 (70 days ago).
- Last revised September 17, 2026 — 0 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-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/sshnet/SSH.NET/security/advisories/GHSA-mggc-4xg6-vcxfWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-85756ADVISORY
- https://github.com/sshnet/SSH.NET/commit/c66b9f8fb06c12e71761e58a577b1e796026310fWEB
- https://github.com/sshnet/SSH.NETPACKAGE
- https://github.com/sshnet/SSH.NET/releases/tag/2026.0.0WEB
Frequently Asked Questions
- What is CVE-2026-85756?
- SSH.NET: ScpClient allows server-side RCE via default SCP path handling. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2026-85756?
- CVE-2026-85756 affects SSH.NET. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-85756 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 43.8% 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-48798HIGH
SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames
- CVE-2026-63184HIGH
Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion