{"answers":{"affected":"2 open source packages ship an affected version, including SSH.NET. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-29245 exists.","fix":"Upgrade SSH.NET to 2020.0.2 or later.","what":"CVE-2022-29245 is a medium-severity vulnerability in sshnet SSH.NET, published on 31 May 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-29245 and fix it if it is affected.\n\nWhat it is: CVE-2022-29245 is a medium-severity vulnerability in sshnet SSH.NET, published on 31 May 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-29245 exists.\n\nAffected packages and fixed versions:\n- SSH.NET (NuGet): affected all versions; fixed in 2020.0.2\n- SSH.NET (NuGet): affected all versions; fixed in 2020.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-29245/ (Markdown: https://insights.sbomify.com/CVE-2022-29245/index.md)","id":"CVE-2022-29245","markdown":"https://insights.sbomify.com/CVE-2022-29245/index.md","name":"CVE-2022-29245","record":{"aliases":["GHSA-72p8-v4hg-v45p"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"SSH.NET library","requires_auth":"none","summary":"Weak random number generation in SSH.NET allows attackers to decrypt SSH communications by brute-forcing private key seeds.","user_interaction":"required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ssh.net","vendor":"ssh.net_project"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-338","name":"Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)"}],"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.","ecosystems":["NuGet"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Weak private key generation in SSH.NET","id":"CVE-2022-29245","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"NuGet","product":null,"products":[],"type":"weak_cryptography","year":"2022"},"n_packages":2,"n_references":4,"next":{"headline":"Potential buffer overflow in function DFU upload in Azure RTOS USBX","id":"CVE-2022-29246"},"packages":[{"ecosystem":"NuGet","fixed":["2020.0.2"],"introduced":["0"],"last_affected":[],"package":"SSH.NET","purl":null,"source":"GHSA-72p8-v4hg-v45p"},{"ecosystem":"NuGet","fixed":["2020.0.2"],"introduced":["0"],"last_affected":[],"package":"SSH.NET","purl":"pkg:nuget/SSH.NET","source":"GHSA-72p8-v4hg-v45p"}],"prev":{"headline":"npm packing does not respect root-level ignore files in workspaces","id":"CVE-2022-29244"},"products":["SSH.NET"],"published":"2022-05-31","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["sshnet"]},"summary":"Weak random number generation in SSH.NET allows attackers to decrypt SSH communications by brute-forcing private key seeds.","url":"https://insights.sbomify.com/CVE-2022-29245/"}