CVE-2022-21690: OnionShare-CLI - Path Parameter Sanitization Vulnerability

onionshare-cli Updated 02 Oct 2025

Summary

18/01/2022
Yes i
Moderate
8.7

CVE-2022-21690: OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor network. Affects onionshare-cli versions < 2.5. Fixed in 2.5. How to fix ↓

Also tracked for

The same CVE-2022-21690 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

OnionShare is an open source tool that utilizes the Tor network to enable secure and anonymous file sharing, website hosting, and chat functionality. The OnionShare-CLI package, available on PyPI, is a command-line interface for OnionShare. It allows users to interact with OnionShare's features directly from the command line. This vulnerability affects versions of OnionShare-CLI prior to 2.5.

Vulnerability Detail

The vulnerability arises from the lack of sanitization of the path parameter in the requested URL before it is passed to the QT frontend. This unsanitized path is utilized by all components responsible for displaying the server access history. Consequently, it leads to the rendering of an HTML4 Subset (QT RichText editor) in the OnionShare frontend. This vulnerability can potentially be exploited by an attacker to execute arbitrary code or conduct cross-site scripting (XSS) attacks.

How To Fix

Latest published version: 2.7.0 as of 22 Oct 2026

pip install --upgrade "onionshare-cli==2.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.5

This is the first release that contains the fix.

pip install --upgrade "onionshare-cli==2.5"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid the exploitation of this vulnerability by refraining from accessing the server access history feature in OnionShare-CLI. By not utilizing this specific functionality, the risk of encountering the vulnerability is mitigated.

Conclusion

The path parameter sanitization vulnerability in OnionShare-CLI versions prior to 2.5 can potentially lead to the execution of arbitrary code or cross-site scripting attacks. It is crucial to update to the latest version of OnionShare-CLI to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for onionshare-cli →

Share this vulnerability

FAQ

OnionShare is an open source tool that enables secure and anonymous file sharing, website hosting, and chat functionality using the Tor network.

OnionShare-CLI is a command-line interface for OnionShare, allowing users to interact with its features directly from the command line.

This vulnerability can potentially allow an attacker to execute arbitrary code or conduct cross-site scripting (XSS) attacks.

To fix this vulnerability, update OnionShare-CLI to version 2.5 or later by running the command: pip install --upgrade onionshare-cli.

As a temporary workaround, avoid accessing the server access history feature in OnionShare-CLI to mitigate the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for onionshare-cli.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 2.7.0 as of 22 Oct 2026

pip install --upgrade "onionshare-cli==2.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.5

This is the first release that contains the fix.

pip install --upgrade "onionshare-cli==2.5"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback