CVE-2022-21690 Cross-Site Scripting in Onionshare

High 8.7 Published Updated

Attackers can inject malicious scripts via URL paths in OnionShare's history view, potentially compromising user sessions or executing code.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-21690?

CVE-2022-21690 is a high-severity cross-site scripting vulnerability in onionshare, published on 18 Jan 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.

Weakness: CWE-79

Which versions are affected by CVE-2022-21690?

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

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

Products include Onionshare Onionshare.

How do I fix CVE-2022-21690?

Upgrade onionshare-cli to 2.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-21690 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-21690 exists.

Sources

Also known as DEBIAN-CVE-2022-21690, GHSA-ch22-x2v3-v6vq, PYSEC-2022-41.

Is CVE-2022-21690 in your software?

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

Check your SBOMs for free