Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. label-studio
  4. ›
  5. CVE-2023-47115

CVE-2023-47115: Cross-site Scripting Vulnerability on Avatar Upload

January 24, 2024 (updated November 22, 2024)

The following code snippet in Label Studio shows that the only verification check is that the file is an image by extracting the dimensions from the file.


def hash_upload(instance, filename):
filename = str(uuid.uuid4())[0:8] + '-' + filename
return settings.AVATAR_PATH + '/' + filename <3>


def check_avatar(files):
images = list(files.items())
if not images:
return None

filename, avatar = list(files.items())[0]  # get first file
w, h = get_image_dimensions(avatar) <1>
if not w or not h:
raise forms.ValidationError("Can't read image, try another one")

References

  • docs.djangoproject.com/en/4.2/ref/views/
  • github.com/HumanSignal/label-studio
  • github.com/HumanSignal/label-studio/blob/1.8.2/label_studio/users/functions.py
  • github.com/HumanSignal/label-studio/blob/1.8.2/label_studio/users/urls.py
  • github.com/HumanSignal/label-studio/commit/a7a71e594f32ec4af8f3f800d5ccb8662e275da3
  • github.com/HumanSignal/label-studio/security/advisories/GHSA-q68h-xwq5-mm7x
  • github.com/advisories/GHSA-q68h-xwq5-mm7x
  • github.com/pypa/advisory-database/tree/main/vulns/label-studio/PYSEC-2024-126.yaml
  • nvd.nist.gov/vuln/detail/CVE-2023-47115

Code Behaviors & Features

Detect and mitigate CVE-2023-47115 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.9.2

Fixed versions

  • 1.9.2

Solution

Upgrade to version 1.9.2 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/label-studio/CVE-2023-47115.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:57 +0000.