CVE-2023-43665 — Django Denial-of-service in django — CVE Details
Django Denial-of-service in django.utils.text.Truncator
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.53%). Schedule for your next planned update.
Does your project use an affected django version?
Paste your requirements.txt to check it for CVE-2023-43665 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published November 3, 2023 (1119 days ago).
- Last revised November 4, 2025 — 733 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "django>=4.2.6"
pip install "django>=4.1.12"
pip install "django>=3.2.22"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: PyPI (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1284
- CWE-400Uncontrolled Resource ConsumptionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-43665ADVISORY
- https://github.com/django/django/commit/be9c27c4d18c2e6a5be8af4e53c0797440794473WEB
- https://github.com/django/django/commit/c7b7024742250414e426ad49fb80db943e7ba4e8WEB
- https://github.com/django/django/commit/ccdade1a0262537868d7ca64374de3d957ca50c5WEB
- https://docs.djangoproject.com/en/4.2/releases/securityWEB
- https://github.com/django/djangoPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2023-226.yamlWEB
- https://groups.google.com/forum/#!forum/django-announceWEB
- https://groups.google.com/forum/#%21forum/django-announceWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HJFRPUHDYJHBH3KYHSPGULQM4JN7BMSUWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4DWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HJFRPUHDYJHBH3KYHSPGULQM4JN7BMSUWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4DWEB
- https://security.netapp.com/advisory/ntap-20231221-0001WEB
- https://www.djangoproject.com/weblog/2023/oct/04/security-releasesWEB
- https://www.openwall.com/lists/oss-security/2024/03/04/1WEB
Frequently Asked Questions
- What is CVE-2023-43665?
- Django Denial-of-service in django.utils.text.Truncator. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 5.9/10).
- How do I check if my project is affected by CVE-2023-43665?
- CVE-2023-43665 affects django. It has a 1.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-43665 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This places it in the top quartile of EPSS-scored vulnerabilities — 75% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-14550HIGH
- CVE-2025-57833HIGH
Django is subject to SQL injection through its column aliases
- CVE-2026-1207HIGH
Django has an SQL Injection issue
- CVE-2026-1207MEDIUM
- CVE-2024-41990MEDIUM
Django vulnerable to a denial-of-service attack
- CVE-2020-24584
- CVE-2024-39330
- CVE-2021-35042