4.7medium
Label Studio vulnerable to Cross-site Scripting if `<Choices>` or `<Labels>` are used in labeling config
- Severity
- 4.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.20% (higher than 83% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6xv9-957j-qfhgPYSEC-2024-249
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| HumanSignal label-studio | < 1.11.0 | CVE List |
| humansignal label_studio | before 1.11.0 | CVE List, NVD |
| label-studio (PyPI) | before 1.11.0, before 5df9ae3828b98652e9fa290a19f4deedf51ef6c8 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N |
| GitHub | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| PyPA Advisory Database | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
### 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.
NVD (es)
### Resumen En todas las versiones de Label Studio anteriores a la 1.11.0, los datos importados mediante la función de carga de archivos no se desinfectan adecuadamente antes de procesarse dentro de [`Choices`](https://labelstud.io/tags/choices) o [`Labels`](https://labelstud.io/tags/labels), lo que genera una vulnerabilidad XSS. ### Detalles Necesita permiso para utilizar la función "importación de datos". Esto fue reproducido en Label Studio 1.10.1. ### PoC 1. Cree un proyecto.  2. Cargue un archivo que contenga la carga útil usando la función "Cargar archivos" .   Los siguientes son los contenidos de los archivos utilizados en el PoC ``` { "data": { " Prompt": "imagen del universo de labelstudio", "images": [ { "value": "id123#0", "style": "margin: 5px", "html": "" } ] } } ``` 3. Seleccione la plantilla de etiquetado de generación de texto a imagen de Clasificación y puntuación 4. ¡Seleccione una tarea! [4 Seleccione una tarea](https://github.com/HumanSignal/label-studio/assets/3943358/71856b7a-2b1f-44ea-99ab-fc48bc20caa7) 5. ¡Compruebe que el script se esté ejecutando! [5 Compruebe que el script se esté ejecutando](https://github.com/ HumanSignal/label-studio/assets/3943358/e396ae7b-a591-4db7-afe9-5bab30b48cb9) ### Impacto Se pueden inyectar scripts maliciosos en el código y, cuando se vinculan con vulnerabilidades como CSRF, pueden causar un daño aún mayor. En particular, puede convertirse en una fuente de nuevos ataques, especialmente cuando se vincula a la ingeniería social.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-26152 changed 2024-08-14 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6xv9-957j-qfhg changed 2026-06-10 | CC-BY-4.0 |
| NVD | CVE-2024-26152 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2024-249 changed 2026-06-10 | CC-BY-4.0 |