CVE-2022-21690: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in onionshare 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.
AI Analysis
Technical Summary
CVE-2022-21690 is a cross-site scripting (XSS) vulnerability affecting versions of OnionShare prior to 2.5. OnionShare is an open-source application that enables secure and anonymous file sharing, website hosting, and chat over the Tor network. The vulnerability arises because the 'path' parameter in the requested URL is not properly sanitized before being passed to the Qt frontend. This parameter is used across various components to display server access history. Due to improper input neutralization, malicious input can be rendered as HTML4 subset content within the Qt RichText editor used by OnionShare's frontend. This allows an attacker to inject and execute arbitrary HTML or JavaScript code in the context of the OnionShare user interface. Exploitation requires that a user accesses a crafted URL containing the malicious 'path' parameter. The vulnerability does not require authentication but does require user interaction to visit the malicious URL. There are no known exploits in the wild, and no official patch links have been provided as of the publication date. The vulnerability is classified under CWE-79, which pertains to improper neutralization of input during web page generation, leading to XSS attacks. The severity is rated as medium by the source, reflecting the potential for code injection but limited by the need for user interaction and the specific application context.
Potential Impact
For European organizations using OnionShare, particularly those relying on it for secure and anonymous communication or file sharing, this vulnerability could lead to compromise of confidentiality and integrity. An attacker could execute arbitrary scripts in the context of the OnionShare frontend, potentially stealing sensitive information such as session tokens, or manipulating the user interface to perform phishing or social engineering attacks. Given OnionShare's use over the Tor network, this could also undermine anonymity guarantees if exploited to leak identifying information. However, the impact is somewhat mitigated by the requirement for user interaction and the niche user base of OnionShare. Organizations involved in privacy-sensitive sectors, such as human rights groups, journalists, or legal entities, may face higher risks if adversaries exploit this vulnerability to target their communications. The availability impact is minimal as the vulnerability does not directly affect system stability or cause denial of service.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade OnionShare to version 2.5 or later where the issue is resolved. If upgrading is not immediately possible, users should be educated to avoid clicking on suspicious or untrusted OnionShare URLs, especially those containing unusual or unexpected path parameters. Developers or administrators can implement additional input validation or sanitization at the network or application layer to filter out malicious payloads in URLs before they reach the frontend. Employing security controls such as Content Security Policy (CSP) headers, if applicable within the OnionShare environment, can help restrict script execution. Monitoring and logging access to OnionShare services for anomalous URL patterns may also aid in early detection of exploitation attempts. Finally, organizations should maintain awareness of updates from the OnionShare project and apply patches promptly once available.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland
CVE-2022-21690: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in onionshare onionshare
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 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.
AI-Powered Analysis
Technical Analysis
CVE-2022-21690 is a cross-site scripting (XSS) vulnerability affecting versions of OnionShare prior to 2.5. OnionShare is an open-source application that enables secure and anonymous file sharing, website hosting, and chat over the Tor network. The vulnerability arises because the 'path' parameter in the requested URL is not properly sanitized before being passed to the Qt frontend. This parameter is used across various components to display server access history. Due to improper input neutralization, malicious input can be rendered as HTML4 subset content within the Qt RichText editor used by OnionShare's frontend. This allows an attacker to inject and execute arbitrary HTML or JavaScript code in the context of the OnionShare user interface. Exploitation requires that a user accesses a crafted URL containing the malicious 'path' parameter. The vulnerability does not require authentication but does require user interaction to visit the malicious URL. There are no known exploits in the wild, and no official patch links have been provided as of the publication date. The vulnerability is classified under CWE-79, which pertains to improper neutralization of input during web page generation, leading to XSS attacks. The severity is rated as medium by the source, reflecting the potential for code injection but limited by the need for user interaction and the specific application context.
Potential Impact
For European organizations using OnionShare, particularly those relying on it for secure and anonymous communication or file sharing, this vulnerability could lead to compromise of confidentiality and integrity. An attacker could execute arbitrary scripts in the context of the OnionShare frontend, potentially stealing sensitive information such as session tokens, or manipulating the user interface to perform phishing or social engineering attacks. Given OnionShare's use over the Tor network, this could also undermine anonymity guarantees if exploited to leak identifying information. However, the impact is somewhat mitigated by the requirement for user interaction and the niche user base of OnionShare. Organizations involved in privacy-sensitive sectors, such as human rights groups, journalists, or legal entities, may face higher risks if adversaries exploit this vulnerability to target their communications. The availability impact is minimal as the vulnerability does not directly affect system stability or cause denial of service.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade OnionShare to version 2.5 or later where the issue is resolved. If upgrading is not immediately possible, users should be educated to avoid clicking on suspicious or untrusted OnionShare URLs, especially those containing unusual or unexpected path parameters. Developers or administrators can implement additional input validation or sanitization at the network or application layer to filter out malicious payloads in URLs before they reach the frontend. Employing security controls such as Content Security Policy (CSP) headers, if applicable within the OnionShare environment, can help restrict script execution. Monitoring and logging access to OnionShare services for anomalous URL patterns may also aid in early detection of exploitation attempts. Finally, organizations should maintain awareness of updates from the OnionShare project and apply patches promptly once available.
Affected Countries
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2021-11-16T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9848c4522896dcbf613e
Added to database: 5/21/2025, 9:09:28 AM
Last enriched: 6/22/2025, 4:08:46 AM
Last updated: 2/4/2026, 8:59:17 AM
Views: 35
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-1370: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in comprassibs SIBS woocommerce payment gateway
MediumCVE-2026-0816: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in gtlwpdev All push notification for WP
MediumCVE-2026-0743: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in orenhav WP Content Permission
MediumCVE-2026-0742: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in zealopensource Smart Appointment & Booking
MediumCVE-2026-0681: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in rtddev Extended Random Number Generator
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.