Skip to main content

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

HIGH

SSH.NET: ScpClient allows server-side RCE via default SCP path handling

Published September 17, 2026Updated September 17, 2026Source: OSV

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.

Check my packages.lock.json

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.

NuGet
Update SSH.NET to 2026.0.0 or later
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).

PackageFixed 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-78
    OS Command InjectionMITRE

CVSS Score Breakdown

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

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

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

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

CVSS Score
7.5

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.62%
EPSS percentile: 43.8

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

GHSA-mggc-4xg6-vcxf

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json