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 package | Versions | Reported by |
|---|---|---|
| onionshare onionshare | < 2.5, before 2.5 | CVE List, NVD |
| onionshare-cli (PyPI) | before 2.5 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
Classification
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
| https://github.com/onionshare/onionshare/releases/tag/v2.5 | release-notes, third-party-advisory, web | |
| https://github.com/onionshare/onionshare/security/advisories/GHSA-x7wr-283h-5h2v | advisory, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-21688 | advisory | |
| https://github.com/onionshare/onionshare | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/onionshare-cli/PYSEC-2022-39.yaml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-21688 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x7wr-283h-5h2v changed 2024-10-08 | CC-BY-4.0 |
| NVD | CVE-2022-21688 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2022-39 changed 2023-11-08 | CC-BY-4.0 |