Executive brief
OnionShare, a tool used for secure and anonymous file sharing and website hosting over the Tor network, was found to have a flaw in how it handles shared folders. If a user shares a folder that contains a symbolic link (a shortcut to another file), the application may follow that link and allow a remote recipient to download files from the user's computer that were never intended to be shared. This could lead to the exposure of sensitive local data if an attacker can influence the contents of a shared directory or if a user unknowingly shares a folder containing such links.
Technical details
A symbolic link (symlink) traversal vulnerability exists in OnionShare CLI and Desktop versions prior to 2.6.4. The root cause is located in `SendBaseModeWeb.set_file_info()` and `stream_individual_file()` within `cli/onionshare_cli/web/send_base_mode.py`, which fail to validate if a file is a symlink before indexing or streaming it. An attacker who can influence the contents of a directory shared by a victim (or a victim who unknowingly shares a directory containing untrusted symlinks) can cause the application to serve files from the local filesystem that are outside the shared root. Exploitation requires the attacker to have access to the OnionShare service (URL and private key) and for the victim to initiate the sharing session. The issue is resolved in version 2.6.4 by implementing canonical path checks and rejecting symlinks.
Affected products
- OnionShare OnionShare < 2.6.4
- OnionShare onionshare-cli < 2.6.4
Timeline
- 2026-05-30: patched: Fix committed to repository
- 2026-06-09: advisory: GitHub Security Advisory published
- 2026-07-31: disclosed: NVD publication date