{"cve":"CVE-2020-4071","nvd":{"published":"2020-06-24T13:15:11.833","modified":"2026-06-17T03:19:31.143","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":2.4},"cwes":["CWE-208"],"references":["https://github.com/tm-kn/django-basic-auth-ip-whitelist/security/advisories/GHSA-m38j-pmg3-v5x5","https://groups.google.com/forum/#%21msg/django-developers/iAaq0pvHXuA/fpUuwjK3i2wJ","https://github.com/tm-kn/django-basic-auth-ip-whitelist/security/advisories/GHSA-m38j-pmg3-v5x5","https://groups.google.com/forum/#%21msg/django-developers/iAaq0pvHXuA/fpUuwjK3i2wJ"],"products":["django-basic-auth-ip-whitelist_project:django-basic-auth-ip-whitelist"],"source":"nvd","synced_at":"2026-10-19T21:05:42.039641217+00:00"},"epss":{"cve":"CVE-2020-4071","score":0.00358,"percentile":0.29604,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-m38j-pmg3-v5x5","url":"https://osv.dev/vulnerability/GHSA-m38j-pmg3-v5x5","summary":"Timing attack on django-basic-auth-ip-whitelist","modified":"2026-07-08T06:30:01.902415560Z","packages":[{"ecosystem":"PyPI","name":"django-basic-auth-ip-whitelist","purl":"pkg:pypi/django-basic-auth-ip-whitelist","ranges":["<0.3.4"],"fixed":["0.3.4"]}]},{"id":"PYSEC-2020-37","url":"https://osv.dev/vulnerability/PYSEC-2020-37","summary":"","modified":"2023-11-08T04:03:50.640117Z","packages":[{"ecosystem":"PyPI","name":"django-basic-auth-ip-whitelist","purl":"pkg:pypi/django-basic-auth-ip-whitelist","ranges":["<0.3.4"],"fixed":["0.3.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}