{"answers":{"affected":"3 open source packages ship an affected version, including django-basic-auth-ip-whitelist. It affects 1 product.","exploited":"There is no known exploitation of CVE-2020-4071 in the wild and no public exploit code.","fix":"Upgrade django-basic-auth-ip-whitelist to 0.3.4 or later.","what":"CVE-2020-4071 is a low-severity vulnerability in tm-kn django-basic-auth-ip-whitelist, published on 24 Jun 2020. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2020-4071 and fix it if it is affected.\n\nWhat it is: CVE-2020-4071 is a low-severity vulnerability in tm-kn django-basic-auth-ip-whitelist, published on 24 Jun 2020. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2020-4071 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- django-basic-auth-ip-whitelist (PyPI): affected all versions; fixed in 0.3.4\n- django-basic-auth-ip-whitelist (PyPI): affected all versions; fixed in 0.3.4\n- django-basic-auth-ip-whitelist (PyPI): affected all versions; fixed in 0.3.4\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-2020-4071/ (Markdown: https://insights.sbomify.com/CVE-2020-4071/index.md)","id":"CVE-2020-4071","markdown":"https://insights.sbomify.com/CVE-2020-4071/index.md","name":"CVE-2020-4071","record":{"aliases":["GHSA-m38j-pmg3-v5x5","PYSEC-2020-37"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Django authentication library","requires_auth":"none","summary":"An attacker on the local network can potentially recover basic authentication credentials via timing analysis if basic auth is enabled.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"django-basic-auth-ip-whitelist","vendor":"django-basic-auth-ip-whitelist_project"}],"cvss":{"score":2.2,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-208","name":"Observable Timing Discrepancy"}],"description":"In django-basic-auth-ip-whitelist before 0.3.4, a potential timing attack exists on websites where the basic authentication is used or configured, i.e. BASIC_AUTH_LOGIN and BASIC_AUTH_PASSWORD is set. Currently the string comparison between configured credentials and the ones provided by users is performed through a character-by-character string comparison. This enables a possibility that attacker may time the time it takes the server to validate different usernames and password, and use this knowledge to work out the valid credentials. This attack is understood not to be realistic over the Internet. However, it may be achieved from within local networks where the website is hosted, e.g. from inside a data centre where a website's server is located. Sites protected by IP address whitelisting only are unaffected by this vulnerability. This vulnerability has been fixed on version 0.3.4 of django-basic-auth-ip-whitelist. Update to version 0.3.4 as soon as possible and change basic authentication username and password configured on a Django project using this package. A workaround without upgrading to version 0.3.4 is to stop using basic authentication and use the IP whitelisting component only. It can be achieved by not setting BASIC_AUTH_LOGIN and BASIC_AUTH_PASSWORD in Django project settings.","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":"Timing attack on django-basic-auth-ip-whitelist","id":"CVE-2020-4071","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2020"},"n_packages":3,"n_references":2,"next":{"headline":"Log Forging in generator-jhipster-kotlin","id":"CVE-2020-4072"},"packages":[{"ecosystem":"PyPI","fixed":["0.3.4"],"introduced":["0"],"last_affected":[],"package":"django-basic-auth-ip-whitelist","purl":null,"source":"GHSA-m38j-pmg3-v5x5"},{"ecosystem":"PyPI","fixed":["0.3.4"],"introduced":["0"],"last_affected":[],"package":"django-basic-auth-ip-whitelist","purl":"pkg:pypi/django-basic-auth-ip-whitelist","source":"GHSA-m38j-pmg3-v5x5"},{"ecosystem":"PyPI","fixed":["0.3.4"],"introduced":["0"],"last_affected":[],"package":"django-basic-auth-ip-whitelist","purl":"pkg:pypi/django-basic-auth-ip-whitelist","source":"PYSEC-2020-37"}],"prev":{"headline":"Cross-site Scripting in CSS Validator","id":"CVE-2020-4070"},"products":["django-basic-auth-ip-whitelist"],"published":"2020-06-24","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":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["tm-kn"]},"summary":"An attacker on the local network can potentially recover basic authentication credentials via timing analysis if basic auth is enabled.","url":"https://insights.sbomify.com/CVE-2020-4071/"}