CVE-2026-48798: SSH.NET ScpClient Recursive Download Allows Arbitrary Vulnerability
HIGHCVE-2026-48798 is a HIGH (CVSS 7.1) scpclient recursive download allows arbitrary vulnerability (CWE-73: External Control of File Name or Path) affecting SSH.NET libraries in the NuGet ecosystem. The issue involves scpclient recursive download allows arbitrary file write via server-controlled scp filenames. Remediation is available by upgrading affected packages to version 2026.0.0.
CVE-2026-48798 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L).
How to Fix CVE-2026-48798
To remediate this vulnerability, upgrade all affected SSH.NET dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade SSH.NET to 2026.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for SSH.NET
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-48798, inspect your project dependencies for SSH.NET:
inspect dependencies for SSH.NET
Analyze the terminal output to locate any version of SSH.NET in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In SSH.NET, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48798 Affected SSH.NET Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
SSH.NET
|
NuGet |
< 2026.0.0
|
2026.0.0
|
References
Frequently Asked Questions
What is CVE-2026-48798?
Which SSH.NET versions are affected?
What version fixes CVE-2026-48798?
Is SSH.NET affected?
What is the CVSS score of CVE-2026-48798?
What CWE is associated with CVE-2026-48798?
How can I check NuGet dependencies for CVE-2026-48798?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q939-rpr3-3284",
"modified" : "2026-08-18T18:05:07Z",
"published" : "2026-08-12T15:19:10Z",
"aliases" : [ "CVE-2026-48798" ],
"summary" : "SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames",
"details" : "## Summary\n\n`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](https://github.com/advisories/GHSA-jr78-hfw4-xp7g), but with directory traversal capability.\n\n## Impact\n\nA 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.\n\n## Remediation\n\nThe 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.\n\n[600be0de543765995a189b5d7cd4efac5007f3ce](https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ce)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "SSH.NET"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2026.0.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2025.1.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sshnet/SSH.NET/security/advisories/GHSA-q939-rpr3-3284"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48798"
}, {
"type" : "WEB",
"url" : "https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ce"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sshnet/SSH.NET"
}, {
"type" : "WEB",
"url" : "https://github.com/sshnet/SSH.NET/releases/tag/2026.0.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-73" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-12T15:19:10Z",
"nvd_published_at" : "2026-08-18T15:16:54Z"
}
}