Skip to main content

SSH.NET CVE-2026-48798

| EUVDEUVD-2026-60945 HIGH
Path Traversal (CWE-22)
2026-08-12 https://github.com/sshnet/SSH.NET GHSA-q939-rpr3-3284
7.1
CVSS 3.1 · Vendor: https://github.com/sshnet/SSH.NET
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker controls or compromises SCP server
  2. Delivery
    Victim application initiates recursive ScpClient.Download()
  3. Exploit
    Server returns SCP records with traversal filenames (e.g., '../../../.ssh/authorized_keys')
  4. Execution
    SSH.NET client writes attacker content to resolved out-of-bounds path
  5. Impact
    Attacker-controlled file (e.g., authorized_keys) enables persistent access or privilege escalation

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim application to call ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) - the recursive directory download overload specifically - against a server the attacker controls or has compromised, or against a connection subject to man-in-the-middle interception. Single-file downloads and SFTP/SSH operations within the same library are not affected. If SSH host key verification is properly enforced (known_hosts or pinned fingerprint), the MITM vector is eliminated, leaving only the malicious-or-compromised-server scenario. The attack does not require any authentication against the client host; the CVSS PR:N reflects that the attacker's server role requires no client-side privileges. Exploitation is limited to the filesystem permissions of the process running the SSH.NET client.

Impact

The NVD-assigned CVSS 3.1 score of 7.1 (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L) reflects a network-reachable, unauthenticated attack requiring only that the victim initiate a recursive SCP download. The I:H metric is well-supported: arbitrary file write to locations like ~/.ssh/authorized_keys constitutes a complete integrity compromise of the client host. The UI:R requirement is a genuine friction point in interactive use, but in automated CI/CD pipelines or deployment scripts that pull artifacts via SCP, user interaction is effectively absent. No EPSS score was provided in the input data, and the vulnerability is not listed in CISA KEV, suggesting exploitation has not been observed at scale. The MITM vector requires network positioning (which would normally warrant AC:H), but the 'malicious server' case - where the victim has been directed to a server under attacker control - requires no such positioning and justifies AC:L for the overall risk envelope. Even a mid-sized development team whose CI pipelines download artifacts over SCP from a third-party host should treat this as urgent given the potential for supply-chain-style file overwrites. The absence of a confidentiality impact (C:N) is accurate since the attack is write-only.

Exploit ScenarioDerived

An attacker operates or compromises an SCP server that a target application connects to for artifact retrieval. When the SSH.NET client calls ScpClient.Download() for a remote directory, the attacker's server responds with SCP 'D' (directory) and 'C' (file) records containing names such as '../../../home/appuser/.ssh/authorized_keys'. The unpatched client writes the attacker-supplied content to that resolved path, adding the attacker's public key and enabling subsequent SSH login as the application user.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 12, 2026

Path traversal in SSH.NET's ScpClient.Download() enables a malicious, compromised, or man-in-the-middle SCP server to write arbitrary files anywhere the client process has write access during recursive directory downloads. All SSH.NET NuGet package versions up to and including 2025.1.0 are affected; the vulnerability is analogous to CVE-2019-6111 in OpenSSH but extends to directory traversal. No public exploit code or CISA KEV listing has been identified at time of analysis, though the integrity impact is high given the file-write primitive can overwrite SSH authorized keys, shell rc files, or application binaries.

RemediationAI

Upgrade SSH.NET to version 2026.0.0, which includes the fix at commit 600be0de543765995a189b5d7cd4efac5007f3ce (https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ce). This is confirmed as an upstream fix via the GitHub Security Advisory GHSA-q939-rpr3-3284. If an immediate upgrade is not feasible, a targeted workaround is to replace all uses of ScpClient.Download(string, DirectoryInfo) with SFTP-based downloads (SftpClient), which does not share the same unvalidated filename path - note this changes the protocol and may require server-side SFTP subsystem support. Alternatively, restrict which SCP servers the application is permitted to connect to via firewall or SSH known-hosts enforcement, reducing the MITM and malicious-server risk surface; this is a compensating control only and does not fix the underlying traversal flaw.

Affected VersionsENISA

SSH.NET < 2026.0.0

Affected Packages

nuget ssh.net fix: 2026.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in nuget

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SSH.NET (nuget/SSH.NET) is a managed .NET library providing SSH, SCP, and SFTP client functionality. The affected code path is ScpClient.InternalDownload(), which processes SCP protocol 'C' (file) and 'D' (directory) records returned by the remote server. Prior to the fix, the library accepted the server-supplied filename verbatim and combined it with the local destination path using standard path-join semantics, without checking for CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - 'Path Traversal'). A server could return a filename such as '../../../.ssh/authorized_keys' or an absolute path, and the client would write to that resolved location. The fix, introduced in commit 600be0de, adds a static EnsureValidLocalName() method that rejects any name that is empty, equals '.' or '..', or contains characters invalid in a local filename (including directory separators, which on Windows includes backslash - a legal Unix filename character that OpenSSH servers can transmit verbatim).

Know when SSH gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/sshnet/SSH.NET) PRIMARY 7.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
vuln.today AI 5.9 MEDIUM

Attacker must control or MITM the SCP server, a non-trivial prerequisite warranting AC:H; all other metrics align with the advisory.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/sshnet/SSH.NET).

CVSS VectorVendor: https://github.com/sshnet/SSH.NET

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

DescriptionCVE.org

Summary

ScpClient.Download(string directoryName, DirectoryInfo directoryInfo) writes files and directories using names returned by the remote SCP server during recursive downloads, with no validation that the resulting path stays inside the requested local directory. A malicious, compromised, or man-in-the-middle SCP server can return names containing ../ sequences (or absolute paths), causing the client to create directories and write/overwrite files anywhere the client process has access. This is similar to OpenSSH CVE-2019-6111, but with directory traversal capability.

Impact

A malicious/compromised/MITM SCP server can create or write files outside the intended download directory, anywhere the client process can write. Overwriting files such as ~/.ssh/authorized_keys, shell rc files, cron entries, or application binaries/config can lead to persistence, privilege escalation, or remote code execution on the client host. Requires the victim to perform a directory download from the attacker-controlled server.

Remediation

The fixed release ensures that remotely-supplied file and directory names are valid local names such that the constructed local path is contained within the given local directory, and throws ScpException when an invalid name is detected.

600be0de543765995a189b5d7cd4efac5007f3ce

Executive ViewAI

Why It Matters

SSH.NET NuGet package (versions up to 2025.1.0) contains a vulnerability that could allow an attacker controlling the network or SCP server to write arbitrary files on client systems during downloads, potentially compromising SSH credentials or application binaries. This affects organizations whose applications depend on this library, particularly those connecting to external servers or operating over untrusted networks.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 65% exploitable
Prevalence
Medium
popular .NET SSH/SCP library, widely used in enterprise automation
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in SSH

View all
CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2014-6278 HIGH POC
8.8 Sep 30

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2012-6066 CRITICAL POC
9.3 Dec 04

freeSSHd.exe in freeSSHd through 1.2.6 allows remote attackers to bypass authentication via a crafted session, as demons

CVE-2014-6277 CRITICAL POC
10.0 Sep 27

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi

CVE-2023-38408 CRITICAL POC
9.8 Jul 20

The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot

CVE-2023-25136 MEDIUM POC
6.5 Feb 03

OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. Rated medium se

CVE-2016-6210 MEDIUM POC
5.9 Feb 13

sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing, uses BLOWFISH hashing on a static

CVE-2015-5600 HIGH POC
8.1 Aug 03

The kbdint_next_device function in auth2-chall.c in sshd in OpenSSH through 6.9 does not properly restrict the processin

CVE-2016-6515 HIGH POC
7.5 Aug 07

The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password a

CVE-2024-6387 HIGH POC
8.1 Jul 01

Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to

CVE-2019-6111 MEDIUM POC
5.9 Jan 31

An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy