CVE-2024-26152
Label Studio vulnerable to Cross-site Scripting if `<Choices>` or `<Labels>` are used in labeling config
Check your servers for CVE-2024-26152
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-2024-26152 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
### Summary On all Label Studio versions prior to 1.11.0, data imported via file upload feature is not properly sanitized prior to being rendered within a [`Choices`](https://labelstud.io/tags/choices) or [`Labels`](https://labelstud.io/tags/labels) tag, resulting in an XSS vulnerability.
### Details Need permission to use the "data import" function. This was reproduced on Label Studio 1.10.1.
### PoC
1. Create a project. 
2. Upload a file containing the payload using the "Upload Files" function.  
The following are the contents of the files used in the PoC ``` { "data": { "prompt": "labelstudio universe image", "images": [ { "value": "id123#0", "style": "margin: 5px", "html": "<img width='400' src='https://labelstud.io/_astro/images-tab.64279c16_ZaBSvC.avif' onload=alert(document.cookie)>" } ] } } ```
3. Select the text-to-image generation labeling template of Ranking and scoring  
4. Select a task 
5. Check that the script is running 
### Impact Malicious scripts can be injected into the code, and when linked with vulnerabilities such as CSRF, it can cause even greater damage. In particular, It can become a source of further attacks, especially when linked to social engineering.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
- 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 none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 2.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 83.0% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 23 Feb 2024):
- 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.11.0
|
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-2024-26152 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-26152RHEL, Rocky, Alma, Fedora
rpm -q label-studio
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-26152Alpine
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-2024-26152
trivy image --scanners vuln IMAGE | grep CVE-2024-26152
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/pull/5232 github.com
- https://github.com/HumanSignal/label-studio/commit/5df9ae3828b98652e9fa290a19f4deedf51ef6c8 github.com
- https://github.com/HumanSignal/label-studio/releases/tag/1.11.0 github.com
Source: the record CVE-2024-26152 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