CVE-2022-39220 XSS Vulnerabilities in WebClient
Remote attackers can inject malicious scripts into the SFTPGo web client, potentially leading to code execution or account takeover.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-39220?
CVE-2022-39220 is a medium-severity cross-site scripting vulnerability in drakkan sftpgo, published on 20 Sep 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
SFTPGo is an SFTP server written in Go. Versions prior to 2.3.5 are subject to Cross-site scripting (XSS) vulnerabilities in the SFTPGo WebClient, allowing remote attackers to inject malicious code. This issue is patched in version 2.3.5. No known workarounds exist.
Weakness: CWE-79
Which versions are affected by CVE-2022-39220?
4 open source packages ship an affected version, including github.com/drakkan/sftpgo and github.com/drakkan/sftpgo/v2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/drakkan/sftpgo Go | All versions | None |
github.com/drakkan/sftpgo Go | All versions | 2.3.5 |
github.com/drakkan/sftpgo Go | All versions | 2.3.5 |
github.com/drakkan/sftpgo/v2 Go | All versions | 2.3.5 |
Products include Sftpgo Project Sftpgo.
How do I fix CVE-2022-39220?
Upgrade github.com/drakkan/sftpgo to 2.3.5 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-39220 being exploited?
There is no known exploitation of CVE-2022-39220 in the wild and no public exploit code.
Other vulnerabilities in drakkan sftpgo
Sources
Also known as GHSA-cf7g-cm7q-rq7f, GO-2022-1015.