GitHub advisory · PyPI
OnionShare follows symlinks in shared directories, allowing unintended disclosure of local files
Description
OnionShare CLI/Desktop 2.6.3 can follow symbolic links inside a selected Share or Website directory and serve the symlink target rather than limiting access to files physically contained in the selected directory. If a user shares a directory that contains attacker-supplied or otherwise untrusted symlinks, a remote recipient with access to the OnionShare service can read arbitrary local files readable by the OnionShare process that the symlink points to.
This affects the shipped onionshare-cli Python package and the desktop application because both call the same onionshare_cli.web file-indexing and streaming code.
Tested repository: https://github.com/onionshare/onionshare at commit 8cc75e1d7e88bd31f7276733449d412bf71c8999.
Affected product evidence:
cli/pyproject.toml declares onionshare_cli version 2.6.3.desktop/pyproject.toml declares onionshare version 2.6.3 and depends on onionshare_cli from ../cli.cli/setup.py publishes onionshare-cli and includes onionshare_cli.web plus templates/static resources.desktop/setup.py publishes onionshare and exposes both onionshare and onionshare-cli console scripts.Reachable default/common paths:
--receive, --website, or --chat flag is provided (cli/onionshare_cli/__init__.py:234-241) and accepts filesystem paths from CLI arguments (cli/onionshare_cli/__init__.py:184-189).--website (cli/onionshare_cli/__init__.py:55-59).self.web.website_mode.set_file_info(self.filenames) before starting (desktop/onionshare/tab/mode/website_mode/__init__.py:281-287). Desktop Share mode calls self.mode.web.share_mode.set_file_info(...) before serving (desktop/onionshare/tab/mode/share_mode/threads.py:42-49).Manual fix · PyPI
pip install --upgrade "onionshare-cli>=2.6.4"Sources