CVE-2022-21693
JSON

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 packageVersionsReported by
onionshare onionshare< 2.5, from 2.3 before 2.5CVE List, NVD
onionshare-cli (PyPI)from 2.3 before 2.5, before 2.5GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M6.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
GitHub6.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:N/A:N

Classification

CWE-22

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

Sources

SourceRecordLicence
CVE ListCVE-2022-21693 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-jgm9-xpfj-4fq6 changed 2024-10-07CC-BY-4.0
NVDCVE-2022-21693 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2022-44 changed 2023-11-08CC-BY-4.0