NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
.NET
.NET NuGet
Not in CISA KEV
HIGH severity

SSH.NET: ScpClient allows server-side RCE via default SCP path handlingGHSA-mggc-4xg6-vcxf

HIGHFix: sshnet/SSH.NET@c66b9f8

GHSA-mggc-4xg6-vcxf is a high-severity (CVSS 7.5) OS Command Injection vulnerability in SSH.NET. A fix is available for SSH.NET — see the affected versions and patch details below.

Also known asCVE-2026-85756
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 31, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-mggc-4xg6-vcxf.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs50th percentile — riskier than 50% of all scored CVEsHighest risk
0.12%0.45%0.78%1.12%0.6%0.6%Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
.NETSSH.NET

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.

Description

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).

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
.NETNuGetSSH.NETall versions2026.0.0dotnet add package SSH.NET --version 2026.0.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for SSH.NET, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update SSH.NET to 2026.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mggc-4xg6-vcxf is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

## 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). ## Imp
O3 Security · Impact-Aware SCA

Is GHSA-mggc-4xg6-vcxf in your dependencies?

Find it across NuGet, including transitive dependencies.

SSH.NET: ScpClient allows server-side RCE via default…