CVE-2025-25296: Label Studio allows Cross-Site Scripting (XSS) via GET request to `/projects/upload-example` endpoint
Description Label Studio's /projects/upload-example endpoint allows injection of arbitrary HTML through a GET request with an appropriately crafted labelconfig query parameter. By crafting a specially formatted XML label config with inline task data containing malicious HTML/JavaScript, an attacker can achieve Cross-Site Scripting (XSS).
Published Feb 14, 2025
Affected packages
label-studio
- Ecosystem
- PyPI
- Affected
- < 1.16.0
- Fixed in
- 1.16.0
- Check
pip show label-studio
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Description
Label Studio's /projects/upload-example endpoint allows injection of arbitrary HTML through a GET request with an appropriately crafted label_config query parameter. By crafting a specially formatted XML label config with inline task data containing malicious HTML/JavaScript, an attacker can achieve Cross-Site Scripting (XSS). While the application has a Content Security Policy (CSP), it is only set in report-only mode, making it ineffective at preventing script execution.
The vulnerability exists because the upload-example endpoint renders user-provided HTML content without proper sanitization on a GET request. This allows attackers to inject and execute arbitrary JavaScript in victims' browsers by getting them to visit a maliciously crafted URL.
This is considered vulnerable because it enables attackers to execute JavaScript in victims' contexts, potentially allowing theft of sensitive data, session hijacking, or other malicious actions.
Steps to reproduce
- Create a malicious label config that includes an XSS payload in embedded task data:
<View><!-- {"data": {"text": ""}} --><HyperText name="text"
value="$text"/></View>- URL encode the payload and access the following URL:
- http://app/projects/upload-example/?label_config=%3CView%3E%3C!--%20{%22data%22:%20{%22text%22:%20%22%3Cdiv%3E%3Cimg%20src=x%20onerror=eval(atob(
YWxlcnQoIlhTUyIp))%3E%3C/div%3E%22}}%20--%3E%3CHyperText%20name=%22text%22%20value=%22$text%22/%3E%3C/View%3E
When executed, the payload causes the application to render an HTML page containing an img tag that fails to load, triggering the onerror event handler which executes base64-decoded JavaScript, demonstrating successful XSS execution in the victim's browser.
Mitigations
- Enable the Content Security Policy in enforcement mode instead of report-only mode to actively block unauthorized script execution
- Deprecate the
GETbehavior at theexample-configendpoint since it's not used
Impact
The vulnerability requires no special privileges and can be exploited by getting a victim to visit a crafted URL. The impact is high as it allows arbitrary JavaScript execution in victims' browsers, potentially exposing sensitive data or enabling account takeover through session theft.
Credited to xbow-security.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-22033
Label Studio is vulnerable to full account takeover by chaining Stored XSS + IDOR in User Profile via custom_hotkeys field
high8.6No fixJan 12, 2026CVE-2025-47783
label-studio vulnerable to Cross-Site Scripting (Reflected) via the label_config parameter.
high7.6May 15, 2025CVE-2025-25297
Label Studio allows Server-Side Request Forgery in the S3 Storage Endpoint
high8.6Feb 14, 2025CVE-2024-26152
Label Studio vulnerable to Cross-site Scripting if `<Choices>` or `<Labels>` are used in labeling config
medium4.7Feb 22, 2024CVE-2023-47116
Label Studio SSRF on Import Bypassing `SSRF_PROTECTION_ENABLED` Protections
medium5.3Jan 31, 2024CVE-2023-47115
Cross-site Scripting Vulnerability on Avatar Upload
high7.1Jan 24, 2024
