{"id":"GHSA-68vr-8f46-vc9f","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","aliases":["CVE-2022-21696","PYSEC-2022-47"],"modified":"2024-10-08T12:49:30.281942Z","published":"2022-01-21T23:20:14Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2022-01-19T19:41:55Z","nvd_published_at":"2022-01-18T20:15:00Z","cwe_ids":["CWE-20"],"severity":"MODERATE"},"references":[{"type":"WEB","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/onionshare/onionshare/releases/tag/v2.5"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/onionshare-cli/PYSEC-2022-47.yaml"}],"affected":[{"package":{"name":"onionshare-cli","ecosystem":"PyPI","purl":"pkg:pypi/onionshare-cli"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.3"},{"fixed":"2.5"}]}],"versions":["2.3","2.3.1","2.3.2","2.3.3"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/01/GHSA-68vr-8f46-vc9f/GHSA-68vr-8f46-vc9f.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}]}