Security advisory
Versions of the package djoser before 2.3.0 are vulnerable to Authentication Bypass when the authenticate() function fails. This is because the system falls back to querying the database directly, granting access to users with valid credentials, and eventually bypassing custom authentication checks such as two-factor authentication, LDAP validations, or requirements from configured AUTHENTICATION_BACKENDS.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-21543
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 17:08 UTC · Revision 1
Source evidence
Versions of the package djoser before 2.3.0 are vulnerable to Authentication Bypass when the authenticate() function fails. This is because the system falls back to querying the database directly, granting access to users with valid credentials, and eventually bypassing custom authentication checks such as two-factor authentication, LDAP validations, or requirements from configured AUTHENTICATION_BACKENDS.
osv:CVE-2024-21543
Complete source record
{
"id": "183c8b1eacdf190dc24ec997a2f0c47eaadfeac482acbb7b36f32d050a0acdc3",
"url": "https://osv.dev/vulnerability/CVE-2024-21543",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2024-21543",
"summary": "Versions of the package djoser before 2.3.0 are vulnerable to Authentication Bypass when the authenticate() function fails. This is because the system falls back to querying the database directly, granting access to users with valid credentials, and eventually bypassing custom authentication checks such as two-factor authentication, LDAP validations, or requirements from configured AUTHENTICATION_BACKENDS.",
"evidence": "osv:CVE-2024-21543",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2024-21543",
"aliases": [
"CVE-2024-21543",
"GHSA-v49p-m6gh-747c",
"PYSEC-2024-158"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/sunscrapers/djoser",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "db80fc721290b3acf5cfccaffc6dbd7b2d009947"
},
{
"fixed": "d33c3993c0c735f23cbedc60fa59fce69354f19d"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "2.3.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"fixed": "db80fc721290b3acf5cfccaffc6dbd7b2d009947"
}
],
"source": "REFERENCES_TAG",
"original_tag": "2.3.0"
},
{
"range": [
{
"fixed": "d33c3993c0c735f23cbedc60fa59fce69354f19d"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"2.2.2",
"2.2.1",
"2.1.0",
"2.0.5",
"2.0.3",
"2.0.2",
"2.0.0",
"1.7.0",
"1.6.0",
"1.5.1",
"1.4.0",
"1.3.2",
"1.2.1",
"1.5.0",
"1.3.1",
"1.3.0",
"1.1.5",
"1.1.4",
"1.1.3",
"1.1.2",
"1.1.1",
"1.1.0",
"1.0.1",
"1.0.0",
"0.7.0",
"0.6.0",
"0.5.4",
"0.5.3",
"0.5.2",
"0.5.1",
"0.5.0",
"0.4.3",
"0.4.1",
"0.4.0",
"0.3.1",
"0.3.0",
"0.2.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21543.json"
}
}
],
"modified": "2026-10-28T02:30:38.130967354Z",
"provider": "osv",
"references": [
"https://github.com/sunscrapers/djoser/releases/tag/2.3.0",
"https://lists.debian.org/debian-lts-announce/2025/02/msg00023.html",
"https://security.snyk.io/vuln/SNYK-PYTHON-DJOSER-8366540",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21543.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-21543",
"https://github.com/sunscrapers/djoser/issues/795",
"https://github.com/sunscrapers/djoser/commit/d33c3993c0c735f23cbedc60fa59fce69354f19d",
"https://github.com/sunscrapers/djoser/pull/819"
],
"provider_metadata": {
"cwe_ids": [
"CWE-287"
],
"cna_assigner": "snyk",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21543.json"
}
},
"related_cves": [
{
"value": "CVE-2024-21543",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505162,
"published_at": "2024-12-13T05:00:16.747+00:00"
}