{"answers":{"affected":"4 open source packages ship an affected version, including org.apache.sshd:sshd-common and org.apache.sshd:sshd-core. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-45047 exists.","fix":"Upgrade org.apache.sshd:sshd-common to 2.9.2 or later.","what":"CVE-2022-45047 is a critical unsafe deserialization vulnerability in Apache MINA SSHD, published on 16 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-45047 and fix it if it is affected.\n\nWhat it is: CVE-2022-45047 is a critical unsafe deserialization vulnerability in Apache MINA SSHD, published on 16 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-45047 exists.\n\nAffected packages and fixed versions:\n- org.apache.sshd:sshd-common (Maven): affected all versions; fixed in 2.9.2\n- org.apache.sshd:sshd-common (Maven): affected all versions; fixed in 2.9.2\n- org.apache.sshd:sshd-core (Maven): affected all versions; fixed in 2.9.2\n- org.apache.sshd:sshd-core (Maven): affected all versions; fixed in 2.9.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-45047/ (Markdown: https://insights.sbomify.com/CVE-2022-45047/index.md)","id":"CVE-2022-45047","markdown":"https://insights.sbomify.com/CVE-2022-45047/index.md","name":"CVE-2022-45047","record":{"aliases":["GHSA-fhw8-8j55-vwgq","MINI-c6p5-qw5r-fm4x","OESA-2022-2119","openSUSE-SU-2024:12511-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Java SSH library","requires_auth":"none","summary":"An attacker can execute arbitrary code if a developer uses the SimpleGeneratorHostKeyProvider class to load host keys via Java deserialization.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"sshd","vendor":"apache"}],"cvss":{"score":9.8,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"Class org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider in Apache MINA SSHD \u003c= 2.9.1 uses Java deserialization to load a serialized java.security.PrivateKey. The class is one of several implementations that an implementor using Apache MINA SSHD can choose for loading the host keys of an SSH server.","ecosystems":["Maven","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2023-04-07","github_poc":1,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-04-07T03:16:47Z","kind":"github_poc","ref":"https://github.com/hktalent/CVE-2022-45047","stars":2,"title":"POC,EXP,chatGPT for me"}],"tier":"weaponised"},"has_fix":true,"headline":"Apache MINA SSHD: Java unsafe deserialization vulnerability","id":"CVE-2022-45047","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"deserialization","year":"2022"},"n_packages":5,"n_references":2,"next":{"headline":"Apache Ranger: code execution vulnerability in policy expressions","id":"CVE-2022-45048"},"packages":[{"ecosystem":"Maven","fixed":["2.9.2"],"introduced":["0"],"last_affected":[],"package":"org.apache.sshd:sshd-common","purl":null,"source":"GHSA-fhw8-8j55-vwgq"},{"ecosystem":"Maven","fixed":["2.9.2"],"introduced":["0"],"last_affected":[],"package":"org.apache.sshd:sshd-common","purl":"pkg:maven/org.apache.sshd/sshd-common","source":"GHSA-fhw8-8j55-vwgq"},{"ecosystem":"Maven","fixed":["2.9.2"],"introduced":["0"],"last_affected":[],"package":"org.apache.sshd:sshd-core","purl":null,"source":"GHSA-fhw8-8j55-vwgq"},{"ecosystem":"Maven","fixed":["2.9.2"],"introduced":["0"],"last_affected":[],"package":"org.apache.sshd:sshd-core","purl":"pkg:maven/org.apache.sshd/sshd-core","source":"GHSA-fhw8-8j55-vwgq"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.9.2-1.1"],"introduced":["0"],"last_affected":[],"package":"apache-sshd","purl":"pkg:rpm/opensuse/apache-sshd\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12511-1"}],"prev":{"headline":"camel-ldap component allows LDAP Injection when using the filter option","id":"CVE-2022-45046"},"products":["Apache MINA SSHD"],"published":"2022-11-16","related":[{"cvss_score":6.5,"headline":"DoS/OOM leak vulnerability in Apache Mina SSHD Server","id":"CVE-2021-30129","kev_date_added":null,"published":"2021-07-12"},{"cvss_score":5,"headline":"Apache MINA SSHD: Information disclosure bugs with RootedFilesystem","id":"CVE-2023-35887","kev_date_added":null,"published":"2023-07-10"}],"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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-05-01","vendors":["Apache Software Foundation"]},"summary":"An attacker can execute arbitrary code if a developer uses the SimpleGeneratorHostKeyProvider class to load host keys via Java deserialization.","url":"https://insights.sbomify.com/CVE-2022-45047/"}