GHSA-q939-rpr3-3284

Suggest an improvement
Source
https://github.com/advisories/GHSA-q939-rpr3-3284
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-q939-rpr3-3284/GHSA-q939-rpr3-3284.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-q939-rpr3-3284
Aliases
Published
2026-08-12T15:19:10Z
Modified
2026-08-18T18:15:08Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L CVSS Calculator
Summary
SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-22",
        "CWE-73"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-12T15:19:10Z",
    "nvd_published_at":  "2026-08-18T15:16:54Z",
    "severity":  "HIGH"
}
References

Affected packages

NuGet / SSH.NET

Package

Name
SSH.NET
View open source insights on deps.dev
Purl
pkg:nuget/SSH.NET

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2026.0.0

Affected versions

2011.*
2011.7.29
2011.9.28
2011.12.7
2012.*
2012.3.9
2012.12.3
2012.20.12
2012.21.12
2013.*
2013.1.8
2013.1.27
2013.4.7
2014.*
2014.4.6-beta1
2014.4.6-beta2
2016.*
2016.0.0-beta1
2016.0.0-beta2
2016.0.0-beta3
2016.0.0
2016.1.0-beta1
2016.1.0-beta2
2016.1.0-beta3
2016.1.0-beta4
2016.1.0
2020.*
2020.0.0-beta1
2020.0.0
2020.0.1
2020.0.2
2023.*
2023.0.0
2023.0.1
2024.*
2024.0.0
2024.1.0
2024.2.0
2025.*
2025.0.0
2025.1.0

Database specific

last_known_affected_version_range
"<= 2025.1.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-q939-rpr3-3284/GHSA-q939-rpr3-3284.json"