CVE-2024-26152: Label studio Cross-Site Scripting Vulnerability
MODERATECVE-2024-26152 is a MODERATE (CVSS 4.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Label studio libraries in the PyPI ecosystem. The issue involves label studio vulnerable to cross-site scripting if `<choices>` or `<labels>` are used in labeling config. Remediation is available by upgrading affected packages to version 1.11.0.
CVE-2024-26152 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N).
How to Fix CVE-2024-26152
To remediate this vulnerability, upgrade all affected Label studio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install label-studio>=1.11.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show label-studio
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-26152, inspect your installed packages using pip:
pip show label-studio
Analyze the terminal output to locate any version of Label studio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.0), your application is affected.
Note: The pip show label-studio command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Label studio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-26152 Affected Label studio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
label-studio
|
PyPI |
< 1.11.0
|
1.11.0
|
References
Frequently Asked Questions
What is CVE-2024-26152?
Which Label studio versions are affected?
What version fixes CVE-2024-26152?
Is label-studio affected?
What is the CVSS score of CVE-2024-26152?
What CWE is associated with CVE-2024-26152?
How can I check PyPI dependencies for CVE-2024-26152?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6xv9-957j-qfhg",
"modified" : "2025-05-19T20:45:07Z",
"published" : "2024-02-22T21:52:57Z",
"aliases" : [ "CVE-2024-26152" ],
"summary" : "Label Studio vulnerable to Cross-site Scripting if `<Choices>` or `<Labels>` are used in labeling config ",
"details" : "### Summary\nOn 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.\n\n### Details\nNeed permission to use the \"data import\" function. This was reproduced on Label Studio 1.10.1.\n\n### PoC\n\n1. Create a project.\n\n\n2. Upload a file containing the payload using the \"Upload Files\" function.\n\n\n\nThe following are the contents of the files used in the PoC\n```\n{\n \"data\": {\n \"prompt\": \"labelstudio universe image\",\n \"images\": [\n {\n \"value\": \"id123#0\",\n \"style\": \"margin: 5px\",\n \"html\": \"<img width='400' src='https://labelstud.io/_astro/images-tab.64279c16_ZaBSvC.avif' onload=alert(document.cookie)>\"\n }\n ]\n }\n}\n```\n\n3. Select the text-to-image generation labeling template of Ranking and scoring\n\n\n\n4. Select a task\n\n\n5. Check that the script is running\n\n\n### Impact\nMalicious 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" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "label-studio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.11.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/HumanSignal/label-studio/security/advisories/GHSA-6xv9-957j-qfhg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-26152"
}, {
"type" : "WEB",
"url" : "https://github.com/HumanSignal/label-studio/pull/5232"
}, {
"type" : "WEB",
"url" : "https://github.com/HumanSignal/label-studio/commit/5df9ae3828b98652e9fa290a19f4deedf51ef6c8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/HumanSignal/label-studio"
}, {
"type" : "WEB",
"url" : "https://github.com/HumanSignal/label-studio/releases/tag/1.11.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/label-studio/PYSEC-2024-249.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-22T21:52:57Z",
"nvd_published_at" : "2024-02-22T22:15:47Z"
}
}