Skip to content

CVE-2022-29245 Weak private key generation in SSH.NET

MediumCVSS 5.9 EPSS 1.5%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

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.

Upgrade path

3 packages: 1 fixed.

PackageAffectedFixed inStatus
nuget SSH.NET(NuGet) < 2020.0.2; = 2011.7.29; = 2011.9.28; = 2011.12.7 +21 more 2020.0.2 Fixed
ssh.net project ssh.net = 2020.0.0; = 2020.0.0-beta1; = 2020.0.1 No fix listed Versions listed
sshnet SSH.NET = >= 2020.0.0, < 2020.0.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
nuget SSH.NET(NuGet) < 2020.0.2 2020.0.2
nuget SSH.NET(NuGet) = 2011.12.7 No fix listed
nuget SSH.NET(NuGet) = 2011.7.29 No fix listed
nuget SSH.NET(NuGet) = 2011.9.28 No fix listed
nuget SSH.NET(NuGet) = 2012.12.3 No fix listed
nuget SSH.NET(NuGet) = 2012.20.12 No fix listed
nuget SSH.NET(NuGet) = 2012.21.12 No fix listed
nuget SSH.NET(NuGet) = 2012.3.9 No fix listed
nuget SSH.NET(NuGet) = 2013.1.27 No fix listed
nuget SSH.NET(NuGet) = 2013.1.8 No fix listed
nuget SSH.NET(NuGet) = 2013.4.7 No fix listed
nuget SSH.NET(NuGet) = 2014.4.6-beta1 No fix listed
nuget SSH.NET(NuGet) = 2014.4.6-beta2 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0-beta1 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0-beta2 No fix listed
nuget SSH.NET(NuGet) = 2016.0.0-beta3 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta1 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta2 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta3 No fix listed
nuget SSH.NET(NuGet) = 2016.1.0-beta4 No fix listed
nuget SSH.NET(NuGet) = 2020.0.0 No fix listed
nuget SSH.NET(NuGet) = 2020.0.0-beta1 No fix listed
nuget SSH.NET(NuGet) = 2020.0.1 No fix listed
Show 4 more
ProductAffected versionsFixed in
sshnet SSH.NET = >= 2020.0.0, < 2020.0.2 No fix listed
ssh.net project ssh.net = 2020.0.0 No fix listed
ssh.net project ssh.net = 2020.0.0-beta1 No fix listed
ssh.net project ssh.net = 2020.0.1 No fix listed

References