CVE-2024-21543: djoser Authentication Bypass
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 AUTHENTICATIONBACKENDS.
Published Dec 13, 2024 · Updated Feb 21, 2025
Affected packages
djoser
- Ecosystem
- PyPI
- Affected
- < 2.3.0
- Fixed in
- 2.3.0
- Check
pip show djoser
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-21543
- https://github.com/sunscrapers/djoser/issues/795
- https://github.com/sunscrapers/djoser/pull/819
- https://github.com/sunscrapers/djoser/commit/d33c3993c0c735f23cbedc60fa59fce69354f19d
- https://github.com/sunscrapers/djoser/releases/tag/2.3.0
- https://security.snyk.io/vuln/SNYK-PYTHON-DJOSER-8366540
- https://github.com/pypa/advisory-database/tree/main/vulns/djoser/PYSEC-2024-158.yaml
- https://lists.debian.org/debian-lts-announce/2025/02/msg00023.html
- https://github.com/advisories/GHSA-v49p-m6gh-747c
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
