{"id":"CVE-2022-36071","published":"2022-09-02T17:15:12Z","modified":"2025-04-22T17:24:43Z","title":"Recovery codes abuse in SFTPGo","vendor":"drakkan","product":"sftpgo","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00563,"percentile":0.4774,"provenance":"source"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"references":[{"url":"https://github.com/drakkan/sftpgo/security/advisories/GHSA-54qx-8p8w-xhg8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/drakkan/sftpgo/issues/965","tags":["x_refsource_MISC"]}],"priority":{"score":15.4,"factors":[{"name":"EPSS percentile","points":9.55},{"name":"CVSS severity","points":5.81}]},"vendorSlug":"drakkan","affectedVersions":[{"vendor":"drakkan","product":"sftpgo","versions":[">= 2.2.0, < 2.3.4"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-04-22T15:42:26.196720Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/drakkan/sftpgo/v2","vulnerableRanges":[">=2.2.0, <2.3.4"],"patched":["2.3.4"],"from":["GHSA-54qx-8p8w-xhg8","GO-2022-0964"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/drakkan/sftpgo","vulnerableRanges":["all versions"],"patched":[],"from":["GO-2022-0964"],"provenance":"source"}],"summary":{"text":"The SFTPGo WebAdmin and WebClient components allow recovery codes to be generated before two-factor authentication is enabled on an account, and this flaw affects versions 2.2.0 through 2.3.3. An attacker who is network-reachable and already knows the user's password, with no user interaction required, could generate recovery codes in advance and later use them to bypass two-factor authentication once it is enabled on that account.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:29:48Z"},"euvd":{"id":"EUVD-2022-6703","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-36071","published":"2022-09-02","fixed":"2.3.4","kev":false},{"cve":"CVE-2022-39220","published":"2022-09-20","fixed":"2.3.5","kev":false,"link":{"from":"CVE-2022-36071","to":"CVE-2022-39220","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/drakkan/sftpgo/v2","fromFixed":"2.3.4","toFixed":"2.3.5","daysApart":18}]}},{"cve":"CVE-2024-37897","published":"2024-06-20","fixed":"2.6.1","kev":false},{"cve":"CVE-2024-52309","published":"2024-11-21","fixed":"2.6.3","kev":false}],"package":"Go:github.com/drakkan/sftpgo/v2"}}