CVE-2022-39220 XSS Vulnerabilities in WebClient

Medium 6.1 Published Updated

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.

PackageAffectedFixed in
github.com/drakkan/sftpgo GoAll versionsNone
github.com/drakkan/sftpgo GoAll versions2.3.5
github.com/drakkan/sftpgo GoAll versions2.3.5
github.com/drakkan/sftpgo/v2 GoAll versions2.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.

Sources

Also known as GHSA-cf7g-cm7q-rq7f, GO-2022-1015.

Is CVE-2022-39220 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free