Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 4 Oct 2023 13:02:50 -0300
From: Natalia Bidart <>
Cc: Django Security Team <>
Subject: Django: CVE-2023-43665: Denial-of-service possibility in django.utils.text.Truncator

In accordance with `our security release policy
<>`_, the Django
is issuing
`Django 4.2.6 <>`_,
`Django 4.1.12 <>`_,
`Django 3.2.22 <>`_.
These releases address the security issue detailed below. We encourage all
users of Django to upgrade as soon as possible.

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

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
still exhibited linear backtracking complexity, so when given a very long,
potentially malformed HTML input, the evaluation would still be slow,
to a potential denial of service vulnerability.

The ``chars()`` and ``words()`` methods are used to implement the
and ``truncatewords_html`` template filters, which were thus also

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

Thanks Wenchao Li of Alibaba Group for the report.

This issue has severity "moderate" according to the Django security policy.

Affected supported versions

* Django main branch
* Django 5.0 (currently at pre-release alpha status)
* Django 4.2
* Django 4.1
* Django 3.2


Patches to resolve the issue have been applied to Django's main branch and
5.0, 4.2, 4.1, and 3.2 release branches. The patches may be obtained from
following changesets:

* On the `main branch <
* On the `5.0 release branch <
* On the `4.2 release branch <
* On the `4.1 release branch <
* On the `3.2 release branch <

The following releases have been issued:

* Django 4.2.6 (`download Django 4.2.6 <>`_ |
`4.2.6 checksums <>`_)
* Django 4.1.12 (`download Django 4.1.12 <>`_ |
`4.1.12 checksums <>`_)
* Django 3.2.22 (`download Django 3.2.22 <>`_ |
`3.2.22 checksums <>`_)

The PGP key ID used for this release is Natalia Bidart: `2EE82A8D9470983E <>`_

General notes regarding security reporting

As always, we ask that potential security issues be reported via
private email to ````, and not via Django's
Trac instance or the django-developers list. Please see `our security
policies <>`_ for further

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.