CVE-2024-21543
JSON

5.7medium

djoser Authentication Bypass

Severity
5.7medium CVSS:4.0 by snyk
Exploit likelihood
0.55% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-v49p-m6gh-747cPYSEC-2024-158

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

Product or packageVersionsReported by
djoserbefore 2.3.0CVE List
djoser (PyPI)before 2.3.0, before d33c3993c0c735f23cbedc60fa59fce69354f19dGitHub Advisory Database, PyPA Advisory Database

All scores

snyk5.7medium CVSS:4.0CVSS: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
snyk7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N/E:P
GitHub7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-287CWE-295

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Las versiones del paquete djoser anteriores a la 2.3.0 son vulnerables a la omisión de autenticación cuando falla la función authenticate(). Esto se debe a que el sistema recurre a consultar directamente la base de datos, otorgando acceso a los usuarios con credenciales válidas y, finalmente, omitiendo las comprobaciones de autenticación personalizadas, como la autenticación de dos factores, las validaciones LDAP o los requisitos de AUTHENTICATION_BACKENDS configurados.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21543 changed 2025-02-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-v49p-m6gh-747c changed 2025-02-21CC-BY-4.0
NVDCVE-2024-21543 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-158 changed 2026-06-10CC-BY-4.0