Regular expression denial-of-service in Django
Date: 2024-03
Affected: pip/django, pip/django, pip/django
Attack vector: dos
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2011-4104
CVE-2015-3630
CVE-2018-19653
CVE-2019-16760
CVE-2023-43665
CVE-2024-27351
CWE: CWE-1284
CWE-1333
CWE-285
CWE-400
CWE-494
CWE-502
CVSS: 5.3 (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H)

In Django 3.2 before 3.2.25, 4.2 before 4.2.11, and 5.0 before 5.0.3, the django.utils.text.Truncator.words() method (with html=True) and the truncatewords_html template filter are subject to a potential regular expression denial-of-service attack via a crafted string. NOTE: this issue exists because of an incomplete fix for CVE-2019-14232 and CVE-2023-43665.


Mitigations:

Architectural layers (MAESTRO):