CVE-2022-21688
JSON

7.5high

Out-of-bounds Read in Onionshare

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.89% (higher than 60% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-x7wr-283h-5h2vPYSEC-2022-39

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. Affected versions of the desktop application were found to be vulnerable to denial of service via an undisclosed vulnerability in the QT image parsing. Roughly 20 bytes lead to 2GB memory consumption and this can be triggered multiple times. To be abused, this vulnerability requires rendering in the history tab, so some user interaction is required. An adversary with knowledge of the Onion service address in public mode or with authentication in private mode can perform a Denial of Service attack, which quickly results in out-of-memory for the server. This requires the desktop application with rendered history, therefore the impact is only elevated. This issue has been patched in version 2.5.

Affected

Product or packageVersionsReported by
onionshare onionshare< 2.5, before 2.5CVE List, NVD
onionshare-cli (PyPI)before 2.5GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

CWE-125

SSVC (CISA-ADP): exploitation none, automatable yes, 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. Affected versions of the desktop application were found to be vulnerable to denial of service via an undisclosed vulnerability in the QT image parsing. Roughly 20 bytes lead to 2GB memory consumption and this can be triggered multiple times. To be abused, this vulnerability requires rendering in the history tab, so some user interaction is required. An adversary with knowledge of the Onion service address in public mode or with authentication in private mode can perform a Denial of Service attack, which quickly results in out-of-memory for the server. This requires the desktop application with rendered history, therefore the impact is only elevated. This issue has been patched in version 2.5.

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-014
  • Vulnerability type: Out-of-bounds Read
  • Threat level: Elevated

Description:

The desktop application was found to be vulnerable to denial of service via an undisclosed vulnerability in the QT image parsing.

Technical description:

Prerequisites:

  • Onion address is known
  • Public service or authentication is valid
  • Desktop application is used
  • History is displayed

The rendering of images found in OTF-001 (page 25) could be elevated to a Denial of Service, which requires only very few bytes to be sent as a path parameter to any of the Onionshare functions. Roughly 20 bytes lead to 2GB memory consumption and this can be triggered multiple times. To be abused, this vulnerability requires rendering in the history tab, so some user interaction is required. The issue is in the process of disclosure to the QT security mailing list. More details will be provided after a fixed QT build has been deployed.

Impact:

An adversary with knowledge of the Onion service address in public mode or with authentication in private mode can perform a Denial of Service attack, which quickly results in out-of-memory for the server. This requires the desktop application with rendered history, therefore the impact is only elevated.

Recommendation:

  • Monitor for upstream fix
  • Fix OTF-001 (page 25) as a workaround
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. Se ha detectado que las versiones afectadas de la aplicación de escritorio son vulnerables a una denegación de servicio por medio de una vulnerabilidad no revelada en el análisis de imágenes QT. Aproximadamente 20 bytes conllevan a un consumo de memoria de 2GB y esto puede desencadenarse múltiples veces. Para ser abusada, esta vulnerabilidad requiere la renderización en la pestaña del historial, por lo que es requerido alguna interacción del usuario. Un adversario con conocimiento de la dirección del servicio de Onion en modo público o con autenticación en modo privado puede llevar a cabo un ataque de denegación de servicio, que rápidamente resulta en el agotamiento de la memoria del servidor. Esto requiere la aplicación de escritorio con el historial renderizado, por lo que el impacto es sólo elevado. Este problema ha sido parcheado en la versión 2.5

References

Sources

SourceRecordLicence
CVE ListCVE-2022-21688 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-x7wr-283h-5h2v changed 2024-10-08CC-BY-4.0
NVDCVE-2022-21688 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2022-39 changed 2023-11-08CC-BY-4.0