Command Injection Affecting ssh.net package, versions [,2026.0.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.58% (47th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-SSHNET-19964072
  • published20 Sept 2026
  • disclosed17 Sept 2026
  • creditNadav0077

Introduced: 17 Sep 2026

NewCVE-2026-85756  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade SSH.NET to version 2026.0.0 or higher.

Overview

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism and with broad framework support.

Affected versions of this package are vulnerable to Command Injection through the default remote-path handling in ScpClient constructors and initialization in src/Renci.SshNet/ScpClient.cs. An attacker can execute commands on the SSH server as the authenticated SSH user by supplying a crafted remote path to an application that uses SCP against a shell-based server. The vulnerable code embeds caller-supplied remote paths into the server-side scp command using a default double-quote transformation, which does not safely neutralize all shell metacharacters. When an application passes attacker-influenced paths to ScpClient, the server-side shell interprets the path as command syntax instead of a literal file name, leading to remote code execution on the SSH server and corruption of SCP uploads or downloads.

CVSS Base Scores

version 4.0
version 3.1