CVE-2022-21690
Cross-Site Scripting in Onionshare
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.7
Cross-Site Scripting in Onionshare
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
CVE-2022-21690- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2022-0181
8.7
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
EUVD-2022-0181- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-ch22-x2v3-v6vq
6.3
OTF-001: Improper Input Sanitation: The path parameter of the requested URL is not sanitized before being passed to the QT frontend
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-001
- Vulnerability type: Improper Input Sanitization
- Threat level: Elevated
Description:
The path parameter of the requested URL is not sanitized before being passed to the QT frontend.
Technical description:
The path parameter is not sanitized before being passed to the constructor of the QLabel.
https://doc.qt.io/qt-5/qlabel.html#details
Warning: When passing a QString to the constructor or calling setText(), make sure to sanitize your input, as QLabel tries to guess whether it displays the text as plain text or as rich text, a subset of HTML 4 markup. You may want to call setTextFormat() explicitly, e.g. in case you expect the text to be in plain format but cannot control the text source (for instance when displaying data loaded from the Web).
This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
In the following example an adversary injects a crafted image file into an Onionshare instance with receive mode and renders it in the history component of the Onionshare application.
The only requirement is another visit to the shared site with the following parameter attached to the path of the URL:
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAFElEQVQY02Nk+M+ABzAxMIxKYwIAQC0BEwZFOw4AAAAASUVORK5CYII=' />
This will be rendered as a green square in the history tab where the path value is supposed to be (the value itself is shown at the bottom of the page).
Possible scenarios where this could lead to remote code execution would be a 0-day in libpng or other internal image rendering (OTF-014 (page 12)) of the QT framework.
The QT documentation indicates that external files could be rendered, but we were unable to find a QT code path allowing for it.
Impact:
An adversary with knowledge of the Onion service address in public mode or with authentication in private mode can render arbitrary HTML (QT-HTML4 Subset) in the server desktop application. This requires the desktop application with rendered history, therefore the impact is only elevated.
Recommendation:
- Manually define the text format of the QLabel via
setTextFormat()
- Record
GHSA-ch22-x2v3-v6vq- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N - CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
8.7
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
CVE-2022-21690- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - CVSS 2.0
- 3.5 Low
AV:N/AC:M/Au:S/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
8.7
Cross-Site Scripting in Onionshare
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
CVE-2022-21690- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-21690
5.4
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
DEBIAN-CVE-2022-21690- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-03
Show 5 moreShow less
OSVGHSA-ch22-x2v3-v6vq
6.3
OTF-001: Improper Input Sanitation: The path parameter of the requested URL is not sanitized before being passed to the QT frontend
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-001
- Vulnerability type: Improper Input Sanitization
- Threat level: Elevated
Description:
The path parameter of the requested URL is not sanitized before being passed to the QT frontend.
Technical description:
The path parameter is not sanitized before being passed to the constructor of the QLabel.
https://doc.qt.io/qt-5/qlabel.html#details
Warning: When passing a QString to the constructor or calling setText(), make sure to sanitize your input, as QLabel tries to guess whether it displays the text as plain text or as rich text, a subset of HTML 4 markup. You may want to call setTextFormat() explicitly, e.g. in case you expect the text to be in plain format but cannot control the text source (for instance when displaying data loaded from the Web).
This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
In the following example an adversary injects a crafted image file into an Onionshare instance with receive mode and renders it in the history component of the Onionshare application.
The only requirement is another visit to the shared site with the following parameter attached to the path of the URL:
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAFElEQVQY02Nk+M+ABzAxMIxKYwIAQC0BEwZFOw4AAAAASUVORK5CYII=' />
This will be rendered as a green square in the history tab where the path value is supposed to be (the value itself is shown at the bottom of the page).
Possible scenarios where this could lead to remote code execution would be a 0-day in libpng or other internal image rendering (OTF-014 (page 12)) of the QT framework.
The QT documentation indicates that external files could be rendered, but we were unable to find a QT code path allowing for it.
Impact:
An adversary with knowledge of the Onion service address in public mode or with authentication in private mode can render arbitrary HTML (QT-HTML4 Subset) in the server desktop application. This requires the desktop application with rendered history, therefore the impact is only elevated.
Recommendation:
- Manually define the text format of the QLabel via
setTextFormat()
- Record
GHSA-ch22-x2v3-v6vq- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N - CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-21690
8.7
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
UBUNTU-CVE-2022-21690- CVSS 3.1
- 8.7 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N - CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11983-1 No score
python-onionshare-2.5-1.1 on GA media
These are all security issues fixed in the python-onionshare-2.5-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11983-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13635-1 No score
python3-onionshare-2.6-4.1 on GA media
These are all security issues fixed in the python3-onionshare-2.6-4.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13635-1- Updated
- 2026-11-02
OSVPYSEC-2022-41 No score
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 The path parameter of the requested URL is not sanitized before being passed to the QT frontend. This path is used in all components for displaying the server access history. This leads to a rendered HTML4 Subset (QT RichText editor) in the Onionshare frontend.
- Record
PYSEC-2022-41- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
onionshare-cliPyPI |
before 2.5 | 2.5 |
onionshareDebian:12 |
before 2.5-1 | 2.5-1 |
onionshareDebian:13 |
before 2.5-1 | 2.5-1 |
onionshareDebian:14 |
before 2.5-1 | 2.5-1 |
onionshare-cliPyPI |
before 2.5, plus listed versions 2.32.3.12.3.22.3.3 |
2.5 |
python-onionshareopenSUSE:Tumbleweed From an advisory covering 8 CVEs |
before 2.5-1.1 | 2.5-1.1 |
python3-onionshareopenSUSE:Tumbleweed From an advisory covering 11 CVEs |
before 2.6-4.1 | 2.6-4.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-21690 is a high vulnerability (CVSS 8.7) in Onionshare, published January 18, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.80%, the 56th percentile. Fixed in onionshare-cli 2.5.
References
github.com/onionshare/onionshare/releases/tag/v2.5
github.com/onionshare/onionshare/security/advisories/GHSA-ch22-x2v3-v6vq
nvd.nist.gov/vuln/detail/CVE-2022-21690
github.com/pypa/advisory-database/tree/main/vulns/onionshare-cli/PYSEC-2022-41.yaml
github.com/advisories/GHSA-ch22-x2v3-v6vq
github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21690.json
Show 15 moreShow less
security-tracker.debian.org/tracker/CVE-2022-21690
github.com/onionshare/onionshare
ubuntu.com/security/CVE-2022-21690
cve.org/CVERecord?id=CVE-2022-21690
suse.com/security/cve/CVE-2022-21688
suse.com/security/cve/CVE-2022-21690
suse.com/security/cve/CVE-2022-21691
suse.com/security/cve/CVE-2022-21692
suse.com/security/cve/CVE-2022-21693
suse.com/security/cve/CVE-2022-21694
suse.com/security/cve/CVE-2022-21695
suse.com/security/cve/CVE-2022-21696
suse.com/security/cve/CVE-2018-19960
suse.com/security/cve/CVE-2021-41867
suse.com/security/cve/CVE-2021-41868