{"id":"CVE-2022-21696","aliases":["GHSA-68vr-8f46-vc9f","PYSEC-2022-47"],"url":"https://o3.security/vulnerability/CVE-2022-21696","summary":"Username spoofing in OnionShare","details":"Between September 26, 2021 and October 8, 2021, [Radically Open Security](https://www.radicallyopensecurity.com/) conducted a penetration test of OnionShare 2.4, funded by the Open Technology Fund's [Red Team lab](https://www.opentech.fund/labs/red-team-lab/). This is an issue from that penetration test.\n\n- Vulnerability ID: OTF-005\n- Vulnerability type: Improper Input Sanitization\n- Threat level: Low\n\n## Description:\n\nIt is possible to change the username to that of another chat participant with an additional space character at the end of the name string.\n\n## Technical description:\n\nAssumed users in Chat:\n\n- Alice\n- Bob\n- Mallory\n\n1. Mallory renames to `Alice `.\n2. Mallory sends message as `Alice `.\n3. Alice and Bob receive a message from Mallory disguised as `Alice `, which is hard to distinguish from the `Alice`\nin the web interface.\n\n![otf-005-a](https://user-images.githubusercontent.com/156128/140666112-8febd4d8-6761-41aa-955c-48be76f3c657.png)\n![otf-005-b](https://user-images.githubusercontent.com/156128/140666113-1713ddf7-cef6-4dac-b718-9af1dc4ffdcd.png)\n\nOther (invisible) whitespace characters were found to be working as well.\n\n## Impact:\n\nAn 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.\n\n## Recommendation:\n\n- Remove non-visible characters from the username","published":"2022-01-18T19:55:10Z","modified":"2026-08-12T03:51:26.603752108Z","cvss":{"score":4.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"onionshare-cli","fixedVersion":"2.5"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/onionshare/onionshare/releases/tag/v2.5"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21696.json"},{"type":"ADVISORY","url":"https://github.com/onionshare/onionshare/security/advisories/GHSA-68vr-8f46-vc9f"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21696"},{"type":"PACKAGE","url":"https://github.com/onionshare/onionshare"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/onionshare-cli/PYSEC-2022-47.yaml"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:26.603752108Z"}}