CVE-2022-21693 Path traversal in Onionshare

Medium 6.3 Published Updated

An attacker with filesystem access can read sensitive files in the user home directory via path traversal in OnionShare.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-21693?

CVE-2022-21693 is a medium-severity path traversal vulnerability in onionshare, published on 18 Jan 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor network. In affected versions an adversary with a primitive that allows for filesystem access from the context of the Onionshare process can access sensitive files in the entire user home folder. This could lead to the leaking of sensitive data. Due to the automatic exclusion of hidden folders, the impact is reduced. This can be mitigated by usage of the flatpak release.

Weakness: CWE-22

Which versions are affected by CVE-2022-21693?

3 open source packages ship an affected version, including onionshare-cli. It affects 1 product.

PackageAffectedFixed in
onionshare-cli PyPIAll versions2.5
onionshare-cli PyPIFrom 2.32.5
onionshare-cli PyPIFrom 2.32.5

Products include Onionshare Onionshare.

How do I fix CVE-2022-21693?

Upgrade onionshare-cli to 2.5 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-21693 being exploited?

There is no known exploitation of CVE-2022-21693 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-21693, GHSA-jgm9-xpfj-4fq6, PYSEC-2022-44.

Is CVE-2022-21693 in your software?

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

Check your SBOMs for free