Skip to main content
← All vulnerabilities
CVE-2022-29245GHSA-72P8-V4HG-V45P

Weak private key generation in SSH.NET

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2020.0.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

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

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • sshnet SSH.NET

    From 2020.0.0 · fixed in 2020.0.2

  • SSH.NETNuGet

    fixed in 2020.0.2

References 4

GitHub · sshnet/SSH.NET