Cloudanix VulnDB

CVE-2022-21693

Medium · 6.3

CVSS

6.3

EPSS

1.2%

Published

Jan 18, 2022

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

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.

Chainable
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

  1. Obtain code execution or file-access primitive inside the OnionShare process
  2. Construct path traversal sequences targeting non-hidden files
  3. 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