// For flags

CVE-2023-43665

python-django: Denial-of-service possibility in django.utils.text.Truncator

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

In Django 3.2 before 3.2.22, 4.1 before 4.1.12, and 4.2 before 4.2.6, the django.utils.text.Truncator chars() and words() methods (when used with html=True) are subject to a potential DoS (denial of service) attack via certain inputs with very long, potentially malformed HTML text. The chars() and words() methods are used to implement the truncatechars_html and truncatewords_html template filters, which are thus also vulnerable. NOTE: this issue exists because of an incomplete fix for CVE-2019-14232.

En Django 3.2 anterior a 3.2.22, 4.1 anterior a 4.1.12 y 4.2 anterior a 4.2.6, los métodos django.utils.text.Truncator chars() y palabras() (cuando se usan con html=True) están sujetos a un potencial Ataque DoS (denegación de servicio) a través de ciertas entradas con texto HTML muy largo y potencialmente mal formado. Los métodos chars() y palabras() se utilizan para implementar los filtros de plantilla truncatechars_html y truncatewords_html, que por tanto también son vulnerables. NOTA: este problema existe debido a una solución incompleta para CVE-2019-14232.

An inefficient regular expression complexity was found in Django. The text truncator regular expressions exhibit linear backtracking complexity, which can be slow, leading to a potential denial of service, given certain HTML inputs.

Wenchao Li discovered that the Django Truncator function incorrectly handled very long HTML input. A remote attacker could possibly use this issue to cause Django to consume resources, leading to a denial of service.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-09-20 CVE Reserved
  • 2023-10-05 CVE Published
  • 2024-08-02 CVE Updated
  • 2025-03-30 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-1284: Improper Validation of Specified Quantity in Input
  • CWE-1333: Inefficient Regular Expression Complexity
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Djangoproject
Search vendor "Djangoproject"
Django
Search vendor "Djangoproject" for product "Django"
>= 3.2 < 3.2.22
Search vendor "Djangoproject" for product "Django" and version " >= 3.2 < 3.2.22"
-
Affected
Djangoproject
Search vendor "Djangoproject"
Django
Search vendor "Djangoproject" for product "Django"
>= 4.1 < 4.1.12
Search vendor "Djangoproject" for product "Django" and version " >= 4.1 < 4.1.12"
-
Affected
Djangoproject
Search vendor "Djangoproject"
Django
Search vendor "Djangoproject" for product "Django"
>= 4.2 < 4.2.6
Search vendor "Djangoproject" for product "Django" and version " >= 4.2 < 4.2.6"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
39
Search vendor "Fedoraproject" for product "Fedora" and version "39"
-
Affected