CVE-2025-25296: Label Studio allows Cross-Site Scripting (XSS) via GET request to `/projects/upload-example` endpoint

Published Feb 14, 2025
·
Updated

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). 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 1. Create a malicious label config that includes an XSS payload in embedded task data:

xml <View><!-- {"data": {"text": "<div><img src=x onerror=eval(atob(YWxlcnQoIlhTUyIp))></div>"}} --><HyperText name="text" value="$text"/></View>

2. URL encode the payload and access the following URL:

- http://app/projects/upload-example/?labelconfig=%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 GET behavior at the example-config endpoint 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.

Other sources

Label Studio is an open source data labeling tool. Prior to version 1.16.0, 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). 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. Version 1.16.0 contains a patch for the issue.

MITRE

Affected Software

2 affected componentsFixes available
pip/label-studio<1.16.0
1.16.0
HumanSignal Label Studio<1.16.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/label-studio to a version that resolves this vulnerability.

    Fixed in 1.16.0
  2. Upgrade

    Upgrade Label Studio to a version that resolves this vulnerability.

    Fixed in 1.16.0
  3. Configuration

    Set the application's Content Security Policy (CSP) to enforcement mode (not report-only) so unauthorized script execution is actively blocked.

    Label Studio (Content Security Policy) Content Security Policy enforcement mode = enforcement
  4. Configuration

    Deprecate the `GET` behavior at the `example-config` endpoint since it is not used.

    Label Studio (example-config endpoint) HTTP GET behavior for `/projects/upload-example`/`example-config` = deprecated

Event History

Feb 14, 2025
Advisory Published
via GitHub·03:23 PM
CVE Published
via MITRE·07:24 PM
Data Sourced
via MITRE·07:24 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-25296?

CVE-2025-25296 is classified as a moderate severity vulnerability due to the potential for HTML injection leading to security risks.

2

How do I fix CVE-2025-25296?

To mitigate CVE-2025-25296, ensure that you upgrade label-studio to version 1.16.0 or later.

3

What type of attack does CVE-2025-25296 enable?

CVE-2025-25296 enables attackers to inject arbitrary HTML and JavaScript through a crafted HTTP GET request.

4

What endpoint is affected by CVE-2025-25296?

The vulnerability affects the /projects/upload-example endpoint of label-studio.

5

What parameter is exploited in CVE-2025-25296?

The vulnerability exploits the `label_config` query parameter in GET requests to inject malicious content.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203