{"answers":{"affected":"3 open source packages ship an affected version, including djoser.","exploited":"There is no known exploitation of CVE-2024-21543 in the wild and no public exploit code.","fix":"Upgrade djoser to 2.3.0 or later.","what":"CVE-2024-21543 is a medium-severity authentication bypass vulnerability in djoser, published on 13 Dec 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-21543 and fix it if it is affected.\n\nWhat it is: CVE-2024-21543 is a medium-severity authentication bypass vulnerability in djoser, published on 13 Dec 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-21543 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- djoser (PyPI): affected all versions; fixed in 2.3.0\n- djoser (PyPI): affected all versions; fixed in 2.3.0\n- djoser (PyPI): affected all versions; fixed in 2.3.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-21543/ (Markdown: https://insights.sbomify.com/CVE-2024-21543/index.md)","id":"CVE-2024-21543","markdown":"https://insights.sbomify.com/CVE-2024-21543/index.md","name":"CVE-2024-21543","record":{"aliases":["DEBIAN-CVE-2024-21543","DLA-4060-1","GHSA-v49p-m6gh-747c","PYSEC-2024-158","UBUNTU-CVE-2024-21543","USN-7354-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Django authentication library","requires_auth":"low_privilege","summary":"Attackers can bypass two-factor authentication and other custom checks by exploiting a fallback to direct database queries in the djoser library.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[],"cvss":{"score":5.7,"severity":"medium","source":"cna","vector":"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/E:P","version":"4.0"},"cwes":[{"id":"CWE-295","name":"Improper Certificate Validation"},{"id":"CWE-287","name":"Improper Authentication"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"djoser Authentication Bypass","id":"CVE-2024-21543","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"auth_bypass","year":"2024"},"n_packages":3,"n_references":5,"next":{"headline":"Browsershot Local File Inclusion","id":"CVE-2024-21544"},"packages":[{"ecosystem":"PyPI","fixed":["2.3.0"],"introduced":["0"],"last_affected":[],"package":"djoser","purl":null,"source":"GHSA-v49p-m6gh-747c"},{"ecosystem":"PyPI","fixed":["2.3.0"],"introduced":["0"],"last_affected":[],"package":"djoser","purl":"pkg:pypi/djoser","source":"GHSA-v49p-m6gh-747c"},{"ecosystem":"PyPI","fixed":["2.3.0"],"introduced":["0"],"last_affected":[],"package":"djoser","purl":"pkg:pypi/djoser","source":"PYSEC-2024-158"}],"prev":{"headline":"luigi Arbitrary File Write via Archive Extraction (Zip Slip)","id":"CVE-2024-21542"},"products":["djoser"],"published":"2024-12-13","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-20","vendors":["n/a"]},"summary":"Attackers can bypass two-factor authentication and other custom checks by exploiting a fallback to direct database queries in the djoser library.","url":"https://insights.sbomify.com/CVE-2024-21543/"}