// For flags

CVE-2022-29245

Weak private key generation in SSH.NET

Severity Score

5.9
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

2
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

SSH.NET es una biblioteca de Secure Shell (SSH) para .NET. En versiones 2020.0.0 y 2020.0.1, durante un intercambio de claves "X25519", la clave privada del cliente se genera con "System.Random". "System.Random" no es un generador de números aleatorios criptográficamente seguro, por lo que no debe ser usado con fines criptográficos. Cuando es establecida una conexión SSH con un host remoto, durante el intercambio de claves X25519, la clave privada es generada con un generador de números aleatorios débil cuya semilla puede ser forzada. Esto permite que un atacante que sea capaz de espiar las comunicaciones las descifre. La versión 2020.0.2 contiene un parche para este problema. Como mitigación, puede deshabilitarse el soporte para los algoritmos de intercambio de claves "curve25519-sha256" y "curve25519-sha256@libssh.org"

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-04-13 CVE Reserved
  • 2022-05-31 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-08-03 First Exploit
  • 2024-08-22 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Ssh.net Project
Search vendor "Ssh.net Project"
Ssh.net
Search vendor "Ssh.net Project" for product "Ssh.net"
2020.0.0
Search vendor "Ssh.net Project" for product "Ssh.net" and version "2020.0.0"
.net
Affected
Ssh.net Project
Search vendor "Ssh.net Project"
Ssh.net
Search vendor "Ssh.net Project" for product "Ssh.net"
2020.0.0
Search vendor "Ssh.net Project" for product "Ssh.net" and version "2020.0.0"
beta1, .net
Affected
Ssh.net Project
Search vendor "Ssh.net Project"
Ssh.net
Search vendor "Ssh.net Project" for product "Ssh.net"
2020.0.1
Search vendor "Ssh.net Project" for product "Ssh.net" and version "2020.0.1"
.net
Affected