CVE-2022-41947: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in dhis2 dhis2-core
DHIS 2 is an open source information system for data capture, management, validation, analytics and visualization. Through various features of DHIS2, an authenticated user may be able to upload a file which includes embedded javascript. The user could then potentially trick another authenticated user to open the malicious file in a browser which would trigger the javascript code, resulting in a cross-site scripting (XSS) attack. DHIS2 administrators should upgrade to the following hotfix releases: 2.36.12.1, 2.37.8.1, 2.38.2.1, 2.39.0.1. Users unable to upgrade may add the following simple CSP rule in your web proxy to the vulnerable endpoints: `script-src 'none'`. This workaround will prevent all javascript from running on those endpoints.
AI Analysis
Technical Summary
CVE-2022-41947 is a medium-severity cross-site scripting (XSS) vulnerability affecting the DHIS2 platform, specifically the dhis2-core component. DHIS2 is an open-source information system widely used for data capture, management, validation, analytics, and visualization, particularly in public health and development sectors. The vulnerability arises from improper neutralization of input during web page generation (CWE-79). Authenticated users can upload files containing embedded malicious JavaScript code. If another authenticated user opens such a file in a browser, the embedded script executes in the context of the DHIS2 web application, leading to an XSS attack. This can allow attackers to hijack user sessions, steal sensitive data, or perform actions on behalf of the victim user. The vulnerability affects multiple DHIS2 versions prior to the respective hotfix releases: 2.36.12.1, 2.37.8.1, 2.38.2.1, and 2.39.0.1. While no known exploits have been reported in the wild, the attack vector requires an attacker to be an authenticated user who can upload malicious files and then trick other authenticated users into opening them. Mitigation includes upgrading to the specified patched versions or, if upgrading is not immediately feasible, implementing a Content Security Policy (CSP) rule at the web proxy level to block all JavaScript execution on vulnerable endpoints by setting 'script-src 'none''. This workaround effectively prevents the execution of malicious scripts embedded in uploaded files, mitigating the risk of exploitation.
Potential Impact
For European organizations, especially those in public health, government, and NGOs that rely on DHIS2 for critical data management and analytics, this vulnerability poses a significant risk to confidentiality and integrity. Successful exploitation could lead to unauthorized access to sensitive health data, manipulation of analytics results, and potential disruption of data-driven decision-making processes. The attack requires authenticated access, which limits exposure to internal or trusted users, but insider threats or compromised credentials could be leveraged. The ability to execute arbitrary JavaScript in the context of the application could also facilitate session hijacking, credential theft, or lateral movement within the network. Given DHIS2's role in managing sensitive health and demographic data, such breaches could have regulatory and reputational consequences under GDPR and other data protection frameworks in Europe. Availability impact is limited but could occur indirectly if trust in the system is compromised or if administrators disable features to mitigate risk.
Mitigation Recommendations
1. Immediate upgrade to the fixed DHIS2 versions: 2.36.12.1, 2.37.8.1, 2.38.2.1, or 2.39.0.1 depending on the deployed version. 2. If upgrading is not immediately possible, implement a strict Content Security Policy (CSP) at the web proxy or application gateway level for vulnerable endpoints, specifically using 'script-src 'none'' to block all JavaScript execution. 3. Restrict file upload permissions to only trusted and necessary users to reduce the risk of malicious file uploads. 4. Implement monitoring and alerting for unusual file upload activity or access patterns within DHIS2. 5. Educate users to be cautious when opening files uploaded by others, even from authenticated users, to reduce social engineering risks. 6. Regularly audit and review user privileges and session management to minimize the risk of compromised accounts being used to exploit this vulnerability. 7. Consider additional web application firewall (WAF) rules to detect and block suspicious payloads in file uploads or requests to vulnerable endpoints.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Norway, Denmark, Finland, Belgium, Italy
CVE-2022-41947: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in dhis2 dhis2-core
Description
DHIS 2 is an open source information system for data capture, management, validation, analytics and visualization. Through various features of DHIS2, an authenticated user may be able to upload a file which includes embedded javascript. The user could then potentially trick another authenticated user to open the malicious file in a browser which would trigger the javascript code, resulting in a cross-site scripting (XSS) attack. DHIS2 administrators should upgrade to the following hotfix releases: 2.36.12.1, 2.37.8.1, 2.38.2.1, 2.39.0.1. Users unable to upgrade may add the following simple CSP rule in your web proxy to the vulnerable endpoints: `script-src 'none'`. This workaround will prevent all javascript from running on those endpoints.
AI-Powered Analysis
Technical Analysis
CVE-2022-41947 is a medium-severity cross-site scripting (XSS) vulnerability affecting the DHIS2 platform, specifically the dhis2-core component. DHIS2 is an open-source information system widely used for data capture, management, validation, analytics, and visualization, particularly in public health and development sectors. The vulnerability arises from improper neutralization of input during web page generation (CWE-79). Authenticated users can upload files containing embedded malicious JavaScript code. If another authenticated user opens such a file in a browser, the embedded script executes in the context of the DHIS2 web application, leading to an XSS attack. This can allow attackers to hijack user sessions, steal sensitive data, or perform actions on behalf of the victim user. The vulnerability affects multiple DHIS2 versions prior to the respective hotfix releases: 2.36.12.1, 2.37.8.1, 2.38.2.1, and 2.39.0.1. While no known exploits have been reported in the wild, the attack vector requires an attacker to be an authenticated user who can upload malicious files and then trick other authenticated users into opening them. Mitigation includes upgrading to the specified patched versions or, if upgrading is not immediately feasible, implementing a Content Security Policy (CSP) rule at the web proxy level to block all JavaScript execution on vulnerable endpoints by setting 'script-src 'none''. This workaround effectively prevents the execution of malicious scripts embedded in uploaded files, mitigating the risk of exploitation.
Potential Impact
For European organizations, especially those in public health, government, and NGOs that rely on DHIS2 for critical data management and analytics, this vulnerability poses a significant risk to confidentiality and integrity. Successful exploitation could lead to unauthorized access to sensitive health data, manipulation of analytics results, and potential disruption of data-driven decision-making processes. The attack requires authenticated access, which limits exposure to internal or trusted users, but insider threats or compromised credentials could be leveraged. The ability to execute arbitrary JavaScript in the context of the application could also facilitate session hijacking, credential theft, or lateral movement within the network. Given DHIS2's role in managing sensitive health and demographic data, such breaches could have regulatory and reputational consequences under GDPR and other data protection frameworks in Europe. Availability impact is limited but could occur indirectly if trust in the system is compromised or if administrators disable features to mitigate risk.
Mitigation Recommendations
1. Immediate upgrade to the fixed DHIS2 versions: 2.36.12.1, 2.37.8.1, 2.38.2.1, or 2.39.0.1 depending on the deployed version. 2. If upgrading is not immediately possible, implement a strict Content Security Policy (CSP) at the web proxy or application gateway level for vulnerable endpoints, specifically using 'script-src 'none'' to block all JavaScript execution. 3. Restrict file upload permissions to only trusted and necessary users to reduce the risk of malicious file uploads. 4. Implement monitoring and alerting for unusual file upload activity or access patterns within DHIS2. 5. Educate users to be cautious when opening files uploaded by others, even from authenticated users, to reduce social engineering risks. 6. Regularly audit and review user privileges and session management to minimize the risk of compromised accounts being used to exploit this vulnerability. 7. Consider additional web application firewall (WAF) rules to detect and block suspicious payloads in file uploads or requests to vulnerable endpoints.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-09-30T16:38:28.941Z
- Cisa Enriched
- true
Threat ID: 682d9846c4522896dcbf4d50
Added to database: 5/21/2025, 9:09:26 AM
Last enriched: 6/22/2025, 12:22:04 PM
Last updated: 8/15/2025, 12:11:28 PM
Views: 16
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.