{"answers":{"affected":"4 open source packages ship an affected version, including github.com/drakkan/sftpgo/v2 and github.com/drakkan/sftpgo. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36071 exists.","fix":"Upgrade github.com/drakkan/sftpgo/v2 to 2.3.4 or later.","what":"CVE-2022-36071 is a high-severity authentication bypass vulnerability in drakkan sftpgo, published on 2 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-36071 and fix it if it is affected.\n\nWhat it is: CVE-2022-36071 is a high-severity authentication bypass vulnerability in drakkan sftpgo, published on 2 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36071 exists.\n\nAffected packages and fixed versions:\n- github.com/drakkan/sftpgo/v2 (Go): affected from 2.2.0; fixed in 2.3.4\n- github.com/drakkan/sftpgo/v2 (Go): affected from 2.2.0; fixed in 2.3.4\n- github.com/drakkan/sftpgo/v2 (Go): affected from 2.2.0; fixed in 2.3.4\n- github.com/drakkan/sftpgo (Go): affected all versions; no fix listed\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-36071/ (Markdown: https://insights.sbomify.com/CVE-2022-36071/index.md)","id":"CVE-2022-36071","markdown":"https://insights.sbomify.com/CVE-2022-36071/index.md","name":"CVE-2022-36071","record":{"aliases":["GHSA-54qx-8p8w-xhg8","GO-2022-0964"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["security_bypass","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"SFTP server","requires_auth":"low_privilege","summary":"Attackers with valid passwords can pre-generate recovery codes to bypass two-factor authentication in SFTPGo WebAdmin and WebClient.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"sftpgo","vendor":"sftpgo_project"}],"cvss":{"score":8.3,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-916","name":"Use of Password Hash With Insufficient Computational Effort"},{"id":"CWE-287","name":"Improper Authentication"}],"description":"SFTPGo is configurable SFTP server with optional HTTP/S, FTP/S and WebDAV support. SFTPGo WebAdmin and WebClient support login using TOTP (Time-based One Time Passwords) as a secondary authentication factor. Because TOTPs are often configured on mobile devices that can be lost, stolen or damaged, SFTPGo also supports recovery codes. These are a set of one time use codes that can be used instead of the TOTP. In SFTPGo versions from version 2.2.0 to 2.3.3 recovery codes can be generated before enabling two-factor authentication. An attacker who knows the user's password could potentially generate some recovery codes and then bypass two-factor authentication after it is enabled on the account at a later time. This issue has been fixed in version 2.3.4. Recovery codes can now only be generated after enabling two-factor authentication and are deleted after disabling it.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Recovery codes abuse in SFTPGo","id":"CVE-2022-36071","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":4,"n_references":2,"next":{"headline":"SilverwareGames.io used == for hashing instead of ===","id":"CVE-2022-36072"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/drakkan/sftpgo","purl":"pkg:golang/github.com/drakkan/sftpgo","source":"GO-2022-0964"},{"ecosystem":"Go","fixed":["2.3.4"],"introduced":["2.2.0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":null,"source":"GHSA-54qx-8p8w-xhg8"},{"ecosystem":"Go","fixed":["2.3.4"],"introduced":["2.2.0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":"pkg:golang/github.com/drakkan/sftpgo/v2","source":"GHSA-54qx-8p8w-xhg8"},{"ecosystem":"Go","fixed":["2.3.4"],"introduced":["2.2.0"],"last_affected":[],"package":"github.com/drakkan/sftpgo/v2","purl":"pkg:golang/github.com/drakkan/sftpgo/v2","source":"GO-2022-0964"}],"prev":{"headline":"Poetry's Untrusted Search Path can lead to Local Code Execution on Windows","id":"CVE-2022-36070"},"products":["sftpgo"],"published":"2022-09-02","related":[{"cvss_score":6.1,"headline":"XSS Vulnerabilities in WebClient","id":"CVE-2022-39220","kev_date_added":null,"published":"2022-09-20"},{"cvss_score":5.3,"headline":"SFTPGo has a Path Traversal and Permission Bypass via Path Normalization Discrepancy","id":"CVE-2026-30914","kev_date_added":null,"published":"2026-03-13"},{"cvss_score":5.3,"headline":"SFTPGo improperly sanitizes placeholders in group home directories/key prefixes","id":"CVE-2026-30915","kev_date_added":null,"published":"2026-03-13"}],"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":"Go Vulnerability Database","prefix":"GO"},{"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":"total"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["drakkan"]},"summary":"Attackers with valid passwords can pre-generate recovery codes to bypass two-factor authentication in SFTPGo WebAdmin and WebClient.","url":"https://insights.sbomify.com/CVE-2022-36071/"}