OS Command Injection in SSH.NET (CVE-2026-85756)
Summary
OS command injection in SSH.NET (CVE-2026-85756). Successful exploitation can lead to full system takeover. Exploitable via ScpClient.RemotePathTransformation. Mitigation: upgrade to 2026.0.0 or later.
Original description
The description as published by the source.
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 t…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-85756 has been found in SSH.NET.
Attackers can target a specific entry point like ScpClient.RemotePathTransformation over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 7.5/10.
What to do: upgrade SSH.NET to 2026.0.0 or later.
If unsure, ask your IT team or search "SSH.NET CVE-2026-85756" on the vendor's site.
CVE-2026-85756 (SSH.NET) — CWE-78 / CVSS v3 7.5
Attack vector: remote (network-reachable) / no user interaction
Attack surface: ScpClient.RemotePathTransformation / RemotePathTransformation.DoubleQuote / IRemotePathTransformation / RemotePathTransformation.ShellQuote
Patched: 2026.0.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
OS command injection (CWE-78) exists in SSH.NET. Attackers reach the vulnerable code path via ScpClient.RemotePathTransformation.
Check the vendor advisory for the affected versions of SSH.NET. Attack surface: ScpClient.RemotePathTransformation / RemotePathTransformation.DoubleQuote / IRemotePathTransformation / RemotePathTransformation.ShellQuote.
Severity: High (CVSS 7.5/10). Successful exploitation can lead to full system takeover.
Update to 2026.0.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'SSH.NET' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'SSH.NET' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
SSH.NETを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade SSH.NET to 2026.0.0ステージング環境で 2026.0.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com