CVE-2022-21696 — onionshare-cli
MEDIUMCVE-2022-21696 is a medium-severity (CVSS 4.3) Improper Input Validation vulnerability in onionshare-cli. A fix is available for onionshare-cli — see the affected versions and patch details below.
Username spoofing in OnionShare
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-21696.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2022-21696 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
onionshare-cliReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Between September 26, 2021 and October 8, 2021, Radically Open Security conducted a penetration test of OnionShare 2.4, funded by the Open Technology Fund's Red Team lab. This is an issue from that penetration test.
- Vulnerability ID: OTF-005
- Vulnerability type: Improper Input Sanitization
- Threat level: Low
Description:
It is possible to change the username to that of another chat participant with an additional space character at the end of the name string.
Technical description:
Assumed users in Chat:
- Alice
- Bob
- Mallory
- Mallory renames to
Alice. - Mallory sends message as
Alice. - Alice and Bob receive a message from Mallory disguised as
Alice, which is hard to distinguish from theAlicein the web interface.

Other (invisible) whitespace characters were found to be working as well.
Impact:
An adversary with access to the chat environment can use the rename feature to impersonate other participants by adding whitespace characters at the end of the username.
Recommendation:
- Remove non-visible characters from the username
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | onionshare-cli | ≥ 2.3&&< 2.5 | 2.5pip install --upgrade 'onionshare-cli==2.5' |
Affected Products
onionshareonionshareDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for onionshare-cli, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update onionshare-cli to 2.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21696 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2022-21696 in your dependencies?
Find it across PyPI, including transitive dependencies.