Vulnerability · Published Dec 13, 2024 · Assigned by snyk
CVE-2024-21543
High 7.1
In plain English
A high-severity improper authentication in djoser. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | djoser | 2.1.0-1+deb12u1 | DEBIAN-CVE-2024-21543 |
| Debian:13 | djoser | 2.3.1-1 | DEBIAN-CVE-2024-21543 |
| Debian:14 | djoser | 2.3.1-1 | DEBIAN-CVE-2024-21543 |
| PyPI | djoser | 2.3.0 | GHSA-v49p-m6gh-747c |
| PyPI | djoser | 2.3.0 | PYSEC-2024-158 |
| Ubuntu:22.04:LTS | djoser | 2.1.0-1ubuntu0.22.04.1 | USN-7354-1 |
| Ubuntu:22.04:LTS | djoser | 2.1.0-1ubuntu0.22.04.1 | UBUNTU-CVE-2024-21543 |
| Ubuntu:24.04:LTS | djoser | 2.1.0-1ubuntu0.24.04.1 | UBUNTU-CVE-2024-21543 |
| Ubuntu:24.04:LTS | djoser | 2.1.0-1ubuntu0.24.04.1 | USN-7354-1 |
Affected products (as reported)
Weakness: CWE-287, CWE-295 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N/E:P
References
- https://security.snyk.io/vuln/SNYK-PYTHON-DJOSER-8366540
- https://github.com/sunscrapers/djoser/releases/tag/2.3.0
- https://github.com/sunscrapers/djoser/issues/795
- https://github.com/sunscrapers/djoser/pull/819
- https://github.com/sunscrapers/djoser/commit/d33c3993c0c735f23cbedc60fa59fce69354f19d
- https://lists.debian.org/debian-lts-announce/2025/02/msg00023.html