CVE-2022-36071: CWE-287: Improper Authentication in drakkan sftpgo
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.
AI Analysis
Technical Summary
CVE-2022-36071 is a security vulnerability classified under CWE-287 (Improper Authentication) affecting the SFTPGo software, a configurable SFTP server that also supports HTTP/S, FTP/S, and WebDAV protocols. SFTPGo includes a WebAdmin and WebClient interface that supports two-factor authentication (2FA) using Time-based One Time Passwords (TOTP) as a secondary authentication factor. To mitigate risks associated with loss or damage of TOTP-configured devices, SFTPGo allows the use of recovery codes—one-time use codes that can bypass TOTP requirements. However, in versions 2.2.0 through 2.3.3, recovery codes could be generated before enabling 2FA on an account. This flaw enables an attacker who has obtained a user's password to generate recovery codes prior to 2FA activation and subsequently bypass the 2FA protection once it is enabled. This improper authentication mechanism undermines the security benefits of 2FA, effectively allowing attackers with password knowledge to circumvent the second authentication factor. The vulnerability was addressed in version 2.3.4, where recovery codes can only be generated after 2FA is enabled and are deleted upon disabling 2FA, closing the loophole. No known exploits have been reported in the wild to date. The vulnerability requires the attacker to know the user's password but does not require additional user interaction beyond that. The scope of affected systems includes any deployment of SFTPGo versions between 2.2.0 and 2.3.3 that have 2FA enabled or planned to be enabled. Given the nature of SFTPGo as a file transfer server, exploitation could lead to unauthorized access to sensitive files and data, compromising confidentiality and integrity of data transfers and stored files.
Potential Impact
For European organizations, this vulnerability poses a significant risk to the confidentiality and integrity of sensitive data managed via SFTPGo servers. Organizations relying on SFTPGo for secure file transfers, especially those in regulated sectors such as finance, healthcare, and government, could face unauthorized data access if attackers exploit this flaw. The bypass of 2FA reduces the effectiveness of multi-factor authentication, increasing the risk of account compromise through credential theft or phishing. This could lead to data breaches, intellectual property theft, or disruption of business operations. Additionally, compromised accounts could be used to distribute malware or ransomware within organizational networks. The vulnerability's impact is heightened in environments where password hygiene is weak or where password reuse is common. Since SFTPGo supports multiple protocols, the attack surface extends beyond SFTP to HTTP/S, FTP/S, and WebDAV interfaces, potentially broadening the scope of exploitation. While no active exploits are currently known, the presence of this vulnerability in production systems could invite targeted attacks, especially in high-value European sectors.
Mitigation Recommendations
European organizations using SFTPGo should immediately upgrade affected instances to version 2.3.4 or later, where the vulnerability is fixed. Beyond patching, organizations should audit user accounts to ensure that recovery codes were not generated prior to enabling 2FA and revoke any such codes if found. Implement strict password policies to reduce the risk of password compromise, including enforcing strong, unique passwords and regular password changes. Employ network segmentation and monitoring to detect unusual access patterns to SFTPGo servers. Enable logging and alerting for recovery code generation and 2FA configuration changes to detect potential abuse. Consider integrating SFTPGo authentication with centralized identity providers that support stronger authentication mechanisms and monitoring. For critical environments, consider additional compensating controls such as IP whitelisting, VPN access restrictions, or hardware-based 2FA tokens to reduce reliance on recovery codes. Finally, conduct user training to raise awareness about phishing and credential theft risks that could lead to password compromise.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Austria
CVE-2022-36071: CWE-287: Improper Authentication in drakkan sftpgo
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.
AI-Powered Analysis
Technical Analysis
CVE-2022-36071 is a security vulnerability classified under CWE-287 (Improper Authentication) affecting the SFTPGo software, a configurable SFTP server that also supports HTTP/S, FTP/S, and WebDAV protocols. SFTPGo includes a WebAdmin and WebClient interface that supports two-factor authentication (2FA) using Time-based One Time Passwords (TOTP) as a secondary authentication factor. To mitigate risks associated with loss or damage of TOTP-configured devices, SFTPGo allows the use of recovery codes—one-time use codes that can bypass TOTP requirements. However, in versions 2.2.0 through 2.3.3, recovery codes could be generated before enabling 2FA on an account. This flaw enables an attacker who has obtained a user's password to generate recovery codes prior to 2FA activation and subsequently bypass the 2FA protection once it is enabled. This improper authentication mechanism undermines the security benefits of 2FA, effectively allowing attackers with password knowledge to circumvent the second authentication factor. The vulnerability was addressed in version 2.3.4, where recovery codes can only be generated after 2FA is enabled and are deleted upon disabling 2FA, closing the loophole. No known exploits have been reported in the wild to date. The vulnerability requires the attacker to know the user's password but does not require additional user interaction beyond that. The scope of affected systems includes any deployment of SFTPGo versions between 2.2.0 and 2.3.3 that have 2FA enabled or planned to be enabled. Given the nature of SFTPGo as a file transfer server, exploitation could lead to unauthorized access to sensitive files and data, compromising confidentiality and integrity of data transfers and stored files.
Potential Impact
For European organizations, this vulnerability poses a significant risk to the confidentiality and integrity of sensitive data managed via SFTPGo servers. Organizations relying on SFTPGo for secure file transfers, especially those in regulated sectors such as finance, healthcare, and government, could face unauthorized data access if attackers exploit this flaw. The bypass of 2FA reduces the effectiveness of multi-factor authentication, increasing the risk of account compromise through credential theft or phishing. This could lead to data breaches, intellectual property theft, or disruption of business operations. Additionally, compromised accounts could be used to distribute malware or ransomware within organizational networks. The vulnerability's impact is heightened in environments where password hygiene is weak or where password reuse is common. Since SFTPGo supports multiple protocols, the attack surface extends beyond SFTP to HTTP/S, FTP/S, and WebDAV interfaces, potentially broadening the scope of exploitation. While no active exploits are currently known, the presence of this vulnerability in production systems could invite targeted attacks, especially in high-value European sectors.
Mitigation Recommendations
European organizations using SFTPGo should immediately upgrade affected instances to version 2.3.4 or later, where the vulnerability is fixed. Beyond patching, organizations should audit user accounts to ensure that recovery codes were not generated prior to enabling 2FA and revoke any such codes if found. Implement strict password policies to reduce the risk of password compromise, including enforcing strong, unique passwords and regular password changes. Employ network segmentation and monitoring to detect unusual access patterns to SFTPGo servers. Enable logging and alerting for recovery code generation and 2FA configuration changes to detect potential abuse. Consider integrating SFTPGo authentication with centralized identity providers that support stronger authentication mechanisms and monitoring. For critical environments, consider additional compensating controls such as IP whitelisting, VPN access restrictions, or hardware-based 2FA tokens to reduce reliance on recovery codes. Finally, conduct user training to raise awareness about phishing and credential theft risks that could lead to password compromise.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-07-15T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf6905
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 11:40:10 PM
Last updated: 8/18/2025, 11:34:10 PM
Views: 20
Related Threats
CVE-2025-9151: Improper Authorization in LiuYuYang01 ThriveX-Blog
MediumCVE-2025-8450: CWE-434 Unrestricted Upload of File with Dangerous Type in Fortra FileCatalyst
HighCVE-2025-55303: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
MediumCVE-2025-43737: CWE-79: Cross-site Scripting in Liferay Portal
MediumCVE-2025-31988: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in HCL Software Digital Experience
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.