SSH.NET: ScpClient allows server-side RCE via default SCP path handling
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sshnet | SSH.NET | before 2026.0.0 | 2026.0.0 | Patch available | CNA |
| — | SSH.NET (NuGet) | before 2026.0.0 | 2026.0.0 | Patch available | GHSA-mggc-4xg6-vcxf |
- SSH.NET Vendorsshnet Affected before 2026.0.0 Fixed in 2026.0.0 Patch available CNA
- SSH.NET (NuGet) Vendor— Affected before 2026.0.0 Fixed in 2026.0.0 Patch available GHSA-mggc-4xg6-vcxf
Remediation
- Fix · CNA SSH.NET (sshnet) Fixed in 2026.0.0
- Fix · GHSA-mggc-4xg6-vcxf SSH.NET (NuGet) Fixed in 2026.0.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-85756
- 2026-10-03 Alias added: GHSA-mggc-4xg6-vcxf
References
More sshnet vulnerabilities
- TI-2026-36068 SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames CVSS 3.1HIGH 7.1
Sources
- CVE-2026-85756 · CVE Program
- CVE-2026-85756 · NVD
- FIRST EPSS
- GHSA-mggc-4xg6-vcxf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences