Skip to content

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

HighCVSS 7.5 EPSS 0.62%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total

Description

SSH.NET is a Secure Shell (SSH) library for .NET. Prior to 2026.0.0, ScpClient places caller-supplied remote paths into the command used to run scp on the server, and the default RemotePathTransformation.DoubleQuote transformation cannot safely quote every remote command interpreter. When an application passes an attacker-controlled path to a shell-based server, shell metacharacters not neutralized by the active IRemotePathTransformation can execute commands as the authenticated SSH user. Exploitation requires a shell-based server and a path crafted for that shell's parsing rules; non-shell servers and paths fully neutralized by the selected transformation are not affected. RemotePathTransformation.ShellQuote is available for POSIX shells, while SftpClient avoids a remote shell entirely. This issue is fixed in version 2026.0.0.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
nuget SSH.NET(NuGet) < 2026.0.0; = 2011.7.29; = 2011.9.28; = 2011.12.7 +29 more 2026.0.0 Fixed
sshnet SSH.NET = < 2026.0.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
nuget SSH.NET(NuGet) < 2026.0.0 2026.0.0
nuget SSH.NET(NuGet) = 2011.12.7 No fix listed
nuget SSH.NET(NuGet) = 2011.7.29 No fix listed
nuget SSH.NET(NuGet) = 2011.9.28 No fix listed
nuget SSH.NET(NuGet) = 2012.12.3 No fix listed
nuget SSH.NET(NuGet) = 2012.20.12 No fix listed
nuget SSH.NET(NuGet) = 2012.21.12 No fix listed
nuget SSH.NET(NuGet) = 2012.3.9 No fix listed
nuget SSH.NET(NuGet) = 2013.1.27 No fix listed
nuget SSH.NET(NuGet) = 2013.1.8 No fix listed
nuget SSH.NET(NuGet) = 2013.4.7 No fix listed
nuget SSH.NET(NuGet) = 2014.4.6-beta1 No fix listed
nuget SSH.NET(NuGet) = 2014.4.6-beta2 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0-beta1 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0-beta2 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0-beta3 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta1 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta2 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta3 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta4 No fix listed
nuget SSH.NET(NuGet) = 2020.0.0 No fix listed
nuget SSH.NET(NuGet) = 2020.0.0-beta1 No fix listed
nuget SSH.NET(NuGet) = 2020.0.1 No fix listed
Show 9 more
ProductAffected versionsFixed in
nuget SSH.NET(NuGet) = 2020.0.2 No fix listed
nuget SSH.NET(NuGet) = 2023.0.0 No fix listed
nuget SSH.NET(NuGet) = 2023.0.1 No fix listed
nuget SSH.NET(NuGet) = 2024.0.0 No fix listed
nuget SSH.NET(NuGet) = 2024.1.0 No fix listed
nuget SSH.NET(NuGet) = 2024.2.0 No fix listed
nuget SSH.NET(NuGet) = 2025.0.0 No fix listed
nuget SSH.NET(NuGet) = 2025.1.0 No fix listed
sshnet SSH.NET = < 2026.0.0 No fix listed

References