CVE-2022-29245

Description

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 `curve25519-sha256@libssh.org` key exchange algorithms.

Severity
MEDIUM
CVSS v3
6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N · source cna
Exploit chance (EPSS)
1.478%
chance of exploitation in the next 30 days
higher than 74.3% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 2
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationpoc
Automatableno
Technical impactpartial
Scored2025-04-22

Timeline

  1. 2022-05-31Published by the CNA16:35 UTC
  2. 2022-06-01GitHub advisory published (GHSA-72p8-v4hg-v45p)1 day after publication
  3. 2025-04-22CISA SSVC decision recorded1057 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-72p8-v4hg-v45p, affected packages:

PackageVulnerable versionsFixed in
NuGet SSH.NETbefore 2020.0.22020.0.2

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
ssh.net_project ssh.net2020.0.0no fix listed2020.0.1no fix listednot listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources