CVE-2022-21696: OnionShare-cli - Username Impersonation Vulnerability
Summary
CVE-2022-21696: 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
- onionshare · Debian:12
The same CVE-2022-21696 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
OnionShare is an open source tool that utilizes the Tor network to enable secure and anonymous file sharing, website hosting, and chat functionality. It provides a platform for users to communicate and share files while maintaining their privacy. The OnionShare-cli package is a command-line interface for OnionShare, allowing users to interact with its features through the terminal.
Vulnerability Detail
The vulnerability identified as CVE-2022-21696 affects OnionShare-cli. It allows an attacker with access to the chat environment to impersonate other participants by manipulating the username. By adding a whitespace character at the end of the name string, the attacker can change their username to match that of another chat participant. This impersonation can lead to various malicious activities, such as spreading misinformation, conducting phishing attacks, or causing confusion among participants. The vulnerability exists in versions of OnionShare-cli prior to version 2.5.
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
There is no specific workaround mentioned for this vulnerability. Users are advised to update to the latest version of OnionShare-cli as soon as possible.
Conclusion
The OnionShare-cli package is vulnerable to CVE-2022-21696, which allows an attacker to impersonate other chat participants by manipulating the username. To mitigate this vulnerability, users should update their OnionShare-cli package to version 2.5 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for onionshare-cli →
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 through the terminal.
The vulnerability allows an attacker to impersonate other chat participants by manipulating the username. This can lead to various malicious activities, such as spreading misinformation or conducting phishing attacks.
To fix this vulnerability, update your OnionShare-cli package to version 2.5 or later.
There is no specific workaround mentioned for this vulnerability. It is recommended to update to the latest version of OnionShare-cli.
References
Related vulnerabilities
Recent vulnerabilities recorded for onionshare-cli.