CVE-2023-43665: Django: CVE-2023-43665: Denial-of-service possibility in django.utils.text.Truncator

Published Sep 27, 2023
·
Updated

Following the fix for CVE-2019-14232, the regular expressions used in the implementation of django.utils.text.Truncator’s chars() and words() methods (with html=True) were revised and improved. However, these regular expressions still exhibited linear backtracking complexity, so when given a very long, potentially malformed HTML input, the evaluation would still be slow, leading to a potential denial of service vulnerability.

The chars() and words() methods are used to implement the truncatecharshtml and truncatewordshtml template filters, which were thus also vulnerable.

The input processed by Truncator, when operating in HTML mode, has been limited to the first five million characters in order to avoid potential performance and memory issues.

Other sources

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 truncatecharshtml and truncatewordshtml template filters, which are thus also vulnerable. NOTE: this issue exists because of an incomplete fix for CVE-2019-14232.

Ubuntu

Affected Software

17 affected componentsFixes available
ubuntu/python-django<4.2.6, <4.1.12, <3.2.22
4.2.64.1.123.2.22
ubuntu/python-django<2:2.2.12-1ubuntu0.20
2:2.2.12-1ubuntu0.20
ubuntu/python-django<2:3.2.12-2ubuntu1.9
2:3.2.12-2ubuntu1.9
ubuntu/python-django<3:3.2.18-1ubuntu0.5
3:3.2.18-1ubuntu0.5
ubuntu/python-django<1:1.11.11-1ubuntu1.21+
1:1.11.11-1ubuntu1.21+
ubuntu/python-django<3:4.2.4-1ubuntu2
3:4.2.4-1ubuntu2
debian/python-django<=1:1.11.29-1~deb10u1, <=1:1.11.29-1+deb10u11, <=2:2.2.28-1~deb11u2, <=3:3.2.19-1+deb12u1
3:4.2.11-1
pip/Django>=4.2a1<4.2.6
4.2.6
pip/Django>=4.1a1<4.1.12
4.1.12
pip/Django>=3.2a1<3.2.22
3.2.22
djangoproject Django>=3.2<3.2.22
djangoproject Django>=4.1<4.1.12
djangoproject Django>=4.2<4.2.6
Fedoraproject Fedora=39
redhat/python-django<3.2.22
3.2.22
redhat/python-django<4.1.12
4.1.12
redhat/python-django<4.2.6
4.2.6

Event History

Sep 27, 2023
Data Sourced
via Red Hat·08:01 PM
DescriptionSeverityAffected Software
Oct 4, 2023
CVE Published
via Ubuntu·12:00 AM
Nov 3, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·05:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·06:36 AM
Jan 12, 2024
Data Sourced
via Launchpad·12:25 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the vulnerability ID of this security issue?

The vulnerability ID of this security issue is CVE-2023-43665.

2

What is the title of this vulnerability?

The title of this vulnerability is "Django: CVE-2023-43665: Denial-of-service possibility in django.utils.text.Truncator".

3

What is the description of this vulnerability?

The description of this vulnerability is "Denial-of-service possibility in django.utils.text.Truncator".

4

What software is affected by this vulnerability?

The affected software is python-django version 4.2.6, 4.1.12, and 3.2.22 on Ubuntu, version 2:2.2.12-1ubuntu0.20 on Ubuntu Focal, version 2:3.2.12-2ubuntu1.9 on Ubuntu Jammy, version 3:3.2.18-1ubuntu0.5 on Ubuntu Lunar, and version 1:1.11.11-1ubuntu1.21+ on Ubuntu Bionic.

5

How can I fix this vulnerability?

To fix this vulnerability, update your python-django package to the recommended version provided by your operating system vendor or follow the instructions in the official security release from Django.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203