—
PYSEC-2024-158
Quick fix
PYSEC-2024-158 — djoser: upgrade to the fixed version with the command below.
pip install --upgrade 'djoser>=d33c3993c0c735f23cbedc60fa59fce69354f19d'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.
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI/djoser
Introduced in:
0Fixed in: d33c3993c0c735f23cbedc60fa59fce69354f19dFix
pip install --upgrade 'djoser>=d33c3993c0c735f23cbedc60fa59fce69354f19d'References
- https://github.com/sunscrapers/djoser/commit/d33c3993c0c735f23cbedc60fa59fce69354f19d[FIX]
- https://github.com/sunscrapers/djoser/issues/795[REPORT]
- https://github.com/sunscrapers/djoser/pull/819[WEB]
- https://github.com/sunscrapers/djoser/releases/tag/2.3.0[WEB]
- https://security.snyk.io/vuln/SNYK-PYTHON-DJOSER-8366540[WEB]
- https://github.com/advisories/GHSA-v49p-m6gh-747c[ADVISORY]