CVE-2026-48798: SSH.NET ScpClient Recursive Download Allows Arbitrary Vulnerability

HIGH
Advisory Identifier: GHSA-q939-rpr3-3284
CVSS 7.1
CWE-73 CWE-22
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-48798
GHSA Identifier GHSA-q939-rpr3-3284
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-73: External Control of File Name or Path
Affected Product SSH.NET
Package Ecosystem NuGet
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (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.

SSH.NET fixed: 2026.0.0
Upgrade SSH.NET to 2026.0.0
Verify Direct and Transitive Dependencies

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

## 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](https://github.com/advisories/GHSA-jr78-hfw4-xp7g), 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](https://github.com/sshnet/SSH.NET/commit/600be0de543765995a189b5d7cd4efac5007f3ce)

CVE-2026-48798 Affected SSH.NET Versions

1 component(s)
Fixed Versions:
2026.0.0
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?
CVE-2026-48798 is a security vulnerability in SSH.NET involving ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames under CWE-73: External Control of File Name or Path.
Which SSH.NET versions are affected?
Affected versions include releases prior to 2026.0.0 across affected packages: SSH.NET.
What version fixes CVE-2026-48798?
Upgrading to 2026.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is SSH.NET affected?
Yes, SSH.NET is affected in releases prior to 2026.0.0. Upgrade your dependency to 2026.0.0 or later.
What is the CVSS score of CVE-2026-48798?
CVE-2026-48798 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2026-48798?
CVE-2026-48798 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check NuGet dependencies for CVE-2026-48798?
Run the dependency tree command: 'inspect dependencies for SSH.NET'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}