Vulnerability · Published Nov 3, 2023 · Assigned by mitre
CVE-2023-43665
High 7.5
In plain English
A high-severity security flaw in the py3-django package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-django | 4.2.6-r0 | ALPINE-CVE-2023-43665 |
| Alpine:v3.21 | py3-django | 4.2.6-r0 | ALPINE-CVE-2023-43665 |
| Alpine:v3.22 | py3-django | 4.2.6-r0 | ALPINE-CVE-2023-43665 |
| Alpine:v3.23 | py3-django | 4.2.6-r0 | ALPINE-CVE-2023-43665 |
| Alpine:v3.24 | py3-django | 4.2.6-r0 | ALPINE-CVE-2023-43665 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DEBIAN-CVE-2023-43665 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DSA-6136-1 |
| Debian:13 | python-django | 3:4.2.6-1 | DEBIAN-CVE-2023-43665 |
| Debian:14 | python-django | 3:4.2.6-1 | DEBIAN-CVE-2023-43665 |
| PyPI | django | 3.2.22, 4.1.12, 4.2.6 | PYSEC-2023-226 |
| PyPI | django | 4.2.6 | GHSA-h8gc-pgj2-vjm3 |
| PyPI | django | 4.1.12 | GHSA-h8gc-pgj2-vjm3 |
| PyPI | django | 3.2.22 | GHSA-h8gc-pgj2-vjm3 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.9 | USN-6414-1 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.9 | UBUNTU-CVE-2023-43665 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.4-1ubuntu2 | UBUNTU-CVE-2023-43665 |
Affected products (as reported)
References
- https://groups.google.com/forum/#%21forum/django-announce
- https://docs.djangoproject.com/en/4.2/releases/security/
- https://www.djangoproject.com/weblog/2023/oct/04/security-releases/
- FEDORA-2023-a67af7d8f4 vendor-advisory
- https://security.netapp.com/advisory/ntap-20231221-0001/
- FEDORA-2024-84fbbbb914 vendor-advisory
- [oss-security] 20240304 Django: CVE-2024-27351: Potential regular expression denial-of-service in django.utils.text.Truncator.words() mailing-list
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4D/