Read the docs
TI-2022-11786 Aliases CVE-2022-29245GHSA-72p8-v4hg-v45p

Weak private key generation in SSH.NET

Priority MEDIUM 62CWE-338Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

SSH.NET is a Secure Shell (SSH) library for .NET. In versions 2020.0.0 and 2020.0.1, during an `X25519` key exchange, the client’s private key is generated with `System.Random`. `System.Random` is not a cryptographically secure random number generator, it must therefore not be used for cryptographic purposes. When establishing an SSH connection to a remote host, during the X25519 key exchange, the private key is generated with a weak random number generator whose seed can be brute forced. This allows an attacker who is able to eavesdrop on the communications to decrypt them. Version 2020.0.2 contains a patch for this issue. As a workaround, one may disable support for `curve25519-sha256` and `[email protected]` key exchange algorithms.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.01478 74th percentileScored 2026-11-07
Public exploit Yes 2 exploit referencesTagged by NVD
Fix Fixed SSH.NET (sshnet): 2020.0.2SSH.NET (NuGet): 2020.0.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
sshnetSSH.NET2020.0.0 to before 2020.0.22020.0.2Patch availableCNA
—SSH.NET (NuGet)before 2020.0.22020.0.2Patch availableGHSA-72p8-v4hg-v45p
  • SSH.NET Vendorsshnet Affected 2020.0.0 to before 2020.0.2 Fixed in 2020.0.2 Patch available CNA
  • SSH.NET (NuGet) Vendor— Affected before 2020.0.2 Fixed in 2020.0.2 Patch available GHSA-72p8-v4hg-v45p

CPE configurations NVD · 3

CPEVersionsRoleVendor
cpe:2.3:a:ssh.net_project:ssh.net:2020.0.0:-:*:*:*:.net:*:*2020.0.0VulnerableSsh.net Project
cpe:2.3:a:ssh.net_project:ssh.net:2020.0.0:beta1:*:*:*:.net:*:*2020.0.0 beta1VulnerableSsh.net Project
cpe:2.3:a:ssh.net_project:ssh.net:2020.0.1:*:*:*:*:.net:*:*2020.0.1VulnerableSsh.net Project
  • cpe:2.3:a:ssh.net_project:ssh.net:2020.0.0:-:*:*:*:.net:*:* Versions 2020.0.0 Vulnerable ·Ssh.net Project
  • cpe:2.3:a:ssh.net_project:ssh.net:2020.0.0:beta1:*:*:*:.net:*:* Versions 2020.0.0 beta1 Vulnerable ·Ssh.net Project
  • cpe:2.3:a:ssh.net_project:ssh.net:2020.0.1:*:*:*:*:.net:*:* Versions 2020.0.1 Vulnerable ·Ssh.net Project

Remediation

  • Fix · CNA SSH.NET (sshnet) Fixed in 2020.0.2
  • Fix · GHSA-72p8-v4hg-v45p SSH.NET (NuGet) Fixed in 2020.0.2 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-29245
  2. 2026-10-03 Alias added: GHSA-72p8-v4hg-v45p

References

  • TI-2026-58836 SSH.NET: ScpClient allows server-side RCE via default SCP path handling CVSS 3.1HIGH 7.5
  • TI-2026-36068 SSH.NET: ScpClient Recursive Download Allows Arbitrary File Write via Server-Controlled SCP Filenames CVSS 3.1HIGH 7.1

Sources