CVE-2022-21693
Medium · 6.3CVSS
6.3
EPSS
1.2%
Published
Jan 18, 2022
CISA due date
—
Cloudanix analysis
A bug in file-sharing software could let someone who already has limited access inside the program read private files stored in your home folder.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Data Exposure
- Component
- Application
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Path traversal flaw permits filesystem read access from the OnionShare process context to any non-hidden file within the entire user home directory.
Why it matters to the business
Attackers who already have limited code execution or file access inside the OnionShare process can obtain sensitive user documents and configuration files, increasing the chance of data exposure or follow-on compromise.
How an attack unfolds
An attacker who obtains a primitive allowing filesystem operations from within the running OnionShare process supplies crafted relative paths that bypass the intended directory restrictions and read arbitrary non-hidden files from the user's home folder.
How to fix it
Upgrade onionshare/onionshare (GIT) to commit 6642c25959f14daeb4a572798ccf4acd765d5795 or later; alternatively run the Flatpak release which isolates the application filesystem.
How to confirm the fix worked
Verify the installed commit hash or package version matches or exceeds the fixed revision; confirm that path traversal attempts outside the designated share directory are rejected.
Typical attack path
- Obtain code execution or file-access primitive inside the OnionShare process
- Construct path traversal sequences targeting non-hidden files
- Read and exfiltrate sensitive documents or credentials from the home directory
How to detect it
Review process file-access logs and audit trails for OnionShare attempting to open paths containing sequences such as ../ that reach outside its designated share directory; look for reads of common sensitive files (ssh keys, browser profiles, documents) shortly after OnionShare startup.
What your security team should do
- Apply the referenced commit or switch to the Flatpak package immediately
- Audit any deployments where OnionShare runs with broad home-directory access
- Monitor for unexpected file reads originating from the OnionShare process
The record
OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor network. In affected versions an adversary with a primitive that allows for filesystem access from the context of the Onionshare process can access sensitive files in the entire user home folder. This could lead to the leaking of sensitive data. Due to the automatic exclusion of hidden folders, the impact is reduced. This can be mitigated by usage of the flatpak release.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | onionshare-cli | 0 | 2.5 |
| PyPI | onionshare-cli | 2.3 | 2.5 |
| Debian:12 | onionshare | 0 | 2.5-1 |
| Debian:13 | onionshare | 0 | 2.5-1 |
| Debian:14 | onionshare | 0 | 2.5-1 |
| Ubuntu:20.04:LTS | onionshare | 0 | No fix |
| Ubuntu:22.04:LTS | onionshare | 0 | No fix |
| Ubuntu:22.04:LTS | onionshare | 0 | 2.2-3 |
| Ubuntu:24.04:LTS | onionshare | 0 | No fix |
| Ubuntu:24.04:LTS | onionshare | 0 | 2.6-6ubuntu1 |
| Ubuntu:24.10 | onionshare | 0 | No fix |
| Ubuntu:25.04 | onionshare | 0 | 2.6.3-1 |
| Ubuntu:Pro:16.04:LTS | onionshare | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | onionshare | 0 | No fix |
| openSUSE:Tumbleweed | python-onionshare | 0 | 2.5-1.1 |
| openSUSE:Tumbleweed | python3-onionshare | 0 | 2.6-4.1 |
| pypi | onionshare-cli | 2.3 | No fix |
Related vulnerabilities
- CVE-2026-54706 OnionShare is an open source tool that lets you securely and anonymously share files… Also affects python-onionshare
- CVE-2026-54707 OnionShare is an open source tool that lets you securely and anonymously share files… Also affects python-onionshare
- CVE-2026-81163 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')… CWE-22
- CVE-2026-112049 Vita3K before build 4187 contains a path traversal (zip slip) vulnerability in… CWE-22
- CVE-2026-112005 WhoDB 0.104.0 before 0.135.0 contains a path traversal vulnerability that allows remote… CWE-22
- CVE-2026-61702 OpenPrinting CUPS is an open source printing system for Linux and other Unix-like… CWE-22
- CVE-2026-104871 The Angular SSR is a server-rise rendering tool for Angular applications. CWE-22
- CVE-2026-102991 Mako is a template library written in Python. CWE-22