// For flags

CVE-2020-4071

Timing attack on django-basic-auth-ip-whitelist

Severity Score

2.4
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

En django-basic-auth-ip-whitelist versiones anteriores a 0.3.4, se presenta un posible ataque de sincronización en los sitios web donde es usada o configurada la autenticación básica, es decir, es configurada BASIC_AUTH_LOGIN y BASIC_AUTH_PASSWORD. Actualmente, la comparación de cadenas entre las credenciales configuradas y las proporcionadas por los usuarios es llevada a cabo por medio de una comparación de cadena carácter por carácter. Esto permite una posibilidad de que un atacante tome el tiempo que le toma al servidor para comprobar diferentes nombres de usuario y contraseñas, y usar este conocimiento para obtener las credenciales validas. Se entiende que este ataque no es realista en Internet. Sin embargo, puede lograrse desde las redes locales donde está alojado el sitio web, por ejemplo desde el interior de un centro de datos donde está ubicado el servidor de un sitio web. Los sitios protegidos por la lista blanca de direcciones IP no solo están afectados por esta vulnerabilidad. Esta vulnerabilidad ha sido corregida en la versión 0.3.4 de django-basic-auth-ip-whitelist. Actualice a la versión 0.3.4 lo antes posible y cambie el nombre de usuario y la contraseña de autenticación básica configurados en un proyecto de Django con este paquete. Una solución alternativa sin actualizar a la versión 0.3.4 es dejar de usar la autenticación básica y usar solo el componente IP whitelisting. Se puede lograr al no configurar BASIC_AUTH_LOGIN y BASIC_AUTH_PASSWORD en la configuración del proyecto Django

*Credits: N/A
CVSS Scores
Attack Vector
Physical
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
Attack Vector
Physical
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2019-12-30 CVE Reserved
  • 2020-06-24 CVE Published
  • 2023-03-10 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-208: Observable Timing Discrepancy
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Django-basic-auth-ip-whitelist Project
Search vendor "Django-basic-auth-ip-whitelist Project"
Django-basic-auth-ip-whitelist
Search vendor "Django-basic-auth-ip-whitelist Project" for product "Django-basic-auth-ip-whitelist"
< 0.3.4
Search vendor "Django-basic-auth-ip-whitelist Project" for product "Django-basic-auth-ip-whitelist" and version " < 0.3.4"
-
Affected