Vulnerabilities in pkg:pypi/djoser
PACKAGECVE-2024-21543 is a HIGH (CVSS 7.1) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Djoser libraries in the PyPI ecosystem. The issue involves djoser authentication bypass. Remediation is available by upgrading affected packages to version 2.3.0.
pkg:pypi/djoser
Vulnerability advisories affecting package pkg:pypi/djoser. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v49p-m6gh-747c | CVE-2024-21543 | HIGH | djoser Authentication Bypass |
CVE-2024-21543 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2024-21543
To remediate this vulnerability, upgrade all affected Djoser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install djoser>=2.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show djoser
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-21543, inspect your installed packages using pip:
pip show djoser
Analyze the terminal output to locate any version of Djoser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.
Note: The pip show djoser command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Djoser, 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
CVE-2024-21543 Affected Djoser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
djoser
|
PyPI |
< 2.3.0
|
2.3.0
|
References
Frequently Asked Questions
What is CVE-2024-21543?
Which Djoser versions are affected?
What version fixes CVE-2024-21543?
Is djoser affected?
What is the CVSS score of CVE-2024-21543?
What CWE is associated with CVE-2024-21543?
How can I check PyPI dependencies for CVE-2024-21543?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v49p-m6gh-747c",
"modified" : "2025-02-21T16:08:48Z",
"published" : "2024-12-13T06:30:58Z",
"aliases" : [ "CVE-2024-21543" ],
"summary" : "djoser Authentication Bypass",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N"
}, {
"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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "djoser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21543"
}, {
"type" : "WEB",
"url" : "https://github.com/sunscrapers/djoser/issues/795"
}, {
"type" : "WEB",
"url" : "https://github.com/sunscrapers/djoser/pull/819"
}, {
"type" : "WEB",
"url" : "https://github.com/sunscrapers/djoser/commit/d33c3993c0c735f23cbedc60fa59fce69354f19d"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/djoser/PYSEC-2024-158.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sunscrapers/djoser"
}, {
"type" : "WEB",
"url" : "https://github.com/sunscrapers/djoser/releases/tag/2.3.0"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/02/msg00023.html"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-PYTHON-DJOSER-8366540"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-295" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-13T20:37:27Z",
"nvd_published_at" : "2024-12-13T05:15:07Z"
}
}