CVE-2023-47115
Label Studio XSS Vulnerability on Avatar Upload
Check your servers for CVE-2023-47115
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-47115 affects label-studio, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Label Studio is an a popular open source data labeling tool. Versions prior to 1.9.2 have a cross-site scripting (XSS) vulnerability that could be exploited when an authenticated user uploads a crafted image file for their avatar that gets rendered as a HTML file on the website. Executing arbitrary JavaScript could result in an attacker performing malicious actions on Label Studio users if they visit the crafted avatar image. For an example, an attacker can craft a JavaScript payload that adds a new Django Super Administrator user if a Django administrator visits the image.
The file `users/functions.py` lines 18-49 show that the only verification check is that the file is an image by extracting the dimensions from the file. Label Studio serves avatar images using Django's built-in `serve` view, which is not secure for production use according to Django's documentation. The issue with the Django `serve` view is that it determines the `Content-Type` of the response by the file extension in the URL path. Therefore, an attacker can upload an image that contains malicious HTML code and name the file with a `.html` extension to be rendered as a HTML page. The only file extension validation is performed on the client-side, which can be easily bypassed.
Version 1.9.2 fixes this issue. Other remediation strategies include validating the file extension on the server side, not in client-side code; removing the use of Django's `serve` view and implement a secure controller for viewing uploaded avatar images; saving file content in the database rather than on the filesystem to mitigate against other file related vulnerabilities; and avoiding trusting user controlled inputs.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality low, integrity low, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.79%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 78.9% of all scored CVEs. Scores of 30 Nov 2026.
The assessment of CISA (SSVC, 8 May 2025):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-79 Improper Neutralization of Input During Web Page Generation
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| label-studio |
affected < 1.9.2
|
Is my server affected?
Find the installed version of label-studio and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i label-studio
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-47115 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-47115RHEL, Rocky, Alma, Fedora
rpm -q label-studio
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-47115Alpine
apk list --installed | grep -i label-studioWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-47115
trivy image --scanners vuln IMAGE | grep CVE-2023-47115
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/HumanSignal/label-studio/commit/a7a71e594f32ec4af8f3f800d5ccb8662e275da3 github.com
- https://docs.djangoproject.com/en/4.2/ref/views/#serving-files-in-development docs.djangoproject.com
- https://github.com/HumanSignal/label-studio/blob/1.8.2/label_studio/users/functions.py#L18-L49 github.com
- https://github.com/HumanSignal/label-studio/blob/1.8.2/label_studio/users/urls.py#L25-L26 github.com
Source: the record CVE-2023-47115 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse