6.3medium
Path traversal in Onionshare
- Severity
- 6.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.20% (higher than 69% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jgm9-xpfj-4fq6PYSEC-2022-44
Description
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
| Product or package | Versions | Reported by |
|---|---|---|
| onionshare onionshare | < 2.5, from 2.3 before 2.5 | CVE List, NVD |
| onionshare-cli (PyPI) | from 2.3 before 2.5, before 2.5 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N |
| GitHub | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/C:P/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Between September 26, 2021 and October 8, 2021, Radically Open Security conducted a penetration test of OnionShare 2.4, funded by the Open Technology Fund's Red Team lab. This is an issue from that penetration test.
- Vulnerability ID: OTF-013
- Vulnerability type: Improper Hardening
- Threat level: Low
Description:
The filesystem restriction could be hardened and should only allow for pre-defined subfolders.
Technical description:
The Flatpak and Snap configurations allow for read-only access on the whole home folder. The relevant lines in the configuration files are onionshare/snap/snapcraft.yaml#L20 and onionshare/flatpak/org.onionshare.OnionShare.yaml#L19 , respectively.
The encapsulation of filesystem access via these mechanisms should be restricted to pre-defined folders and not allow for access to (configuration) files outside the Onionshare-specific folders.
Sadly Snap does not allow for further restriction to specific folders and therefore cannot be further hardened. By default both frameworks disallow access to hidden folders and therefore reduce the potential impact.
Impact:
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.
Recommendation:
- Reduce read access in Flatpak configuration.
NVD (es)
OnionShare es una herramienta de código abierto que permite compartir archivos, alojar sitios web y chatear con amigos de forma segura y anónima usando la red Tor. En las versiones afectadas, un adversario con una primitiva que permita el acceso al sistema de archivos desde el contexto del proceso de Onionshare puede acceder a los archivos confidenciales de toda la carpeta de inicio del usuario. Esto podría conllevar a un filtrado de datos confidenciales. Debido a la exclusión automática de las carpetas ocultas, el impacto es reducido. Esto puede mitigarse mediante el uso de la versión flatpak
References
| https://github.com/onionshare/onionshare/releases/tag/v2.5 | release-notes, third-party-advisory, web | |
| https://github.com/onionshare/onionshare/security/advisories/GHSA-jgm9-xpfj-4fq6 | advisory, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-21693 | advisory | |
| https://github.com/onionshare/onionshare | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/onionshare-cli/PYSEC-2022-44.yaml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-21693 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jgm9-xpfj-4fq6 changed 2024-10-07 | CC-BY-4.0 |
| NVD | CVE-2022-21693 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2022-44 changed 2023-11-08 | CC-BY-4.0 |