Description
In Django 3.2 before 3.2.25, 4.2 before 4.2.11, and 5.0 before 5.0.3, the django.utils.text.Truncator.words() method (with html=True) and the truncatewords_html template filter are subject to a potential regular expression denial-of-service attack via a crafted string. NOTE: this issue exists because of an incomplete fix for CVE-2019-14232 and CVE-2023-43665.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-django | 3:4.2.11-1 | — |
| Debian 13 | python-django | 3:4.2.11-1 | — |
| Debian 12 | python-django | 3:3.2.25-0+deb12u1 | DSA-6136-1 |
| Debian 11 | python-django | 2:2.2.28-1~deb11u7 | DLA-4210-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | python-django | 3:4.2.11-1 | — |
| Ubuntu 22.04 LTS | python-django | 2:3.2.12-2ubuntu1.11 | USN-6674-1 |
| Ubuntu 20.04 LTS | python-django | 2:2.2.12-1ubuntu0.22 | USN-6674-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | python-django | 1:1.11.11-1ubuntu1.21+esm4 | USN-6674-2 |
| Ubuntu Pro 16.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 14.04 LTS | python-django | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite Capsule 6 | python-aiohttp +1 | 3.9.4-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite Capsule 6 | python-django +1 | 4.2.14-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite Capsule 6 | python-jinja2 +1 | 3.1.4-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite Capsule 6 | python-pillow +1 | 10.3.0-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite 6 | python-aiohttp +1 | 3.9.4-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite 6 | python-django +1 | 4.2.14-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite 6 | python-jinja2 +1 | 3.1.4-1.el8pc | RHSA-2024:5662 |
| Red Hat Satellite 6 | python-pillow +1 | 10.3.0-1.el8pc | RHSA-2024:5662 |
| Red Hat Rhui 4 | python-aiohttp +1 | 3.9.2-1.el8ui | RHSA-2024:1878 |
| Red Hat Rhui 4 | python-cryptography +1 | 41.0.6-1.el8ui | RHSA-2024:1878 |
| Red Hat Rhui 4 | python-django +1 | 4.2.11-1.el8ui | RHSA-2024:1878 |
| Red Hat Rhui 4 | python-ecdsa +1 | 0.18.0-4.el8ui | RHSA-2024:1878 |
| Red Hat Rhui 4 | python-jinja2 +1 | 3.1.3-1.el8ui | RHSA-2024:1878 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat OpenStack 17 | python-django +1 | 2.2.24-9.el9ost | RHSA-2025:4187 |
| Red Hat Ansible Automation Platform Inside 2 | python-black +1 | 22.8.0-2.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Inside 2 | python-cryptography +1 | 42.0.5-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Inside 2 | python-jinja2 +1 | 3.1.4-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Inside 2 | python39-black +1 | 22.8.0-2.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Inside 2 | python39-cryptography +1 | 42.0.5-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Inside 2 | python39-jinja2 +1 | 3.1.4-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Inside 2 | receptor +1 | 1.4.5-1.el8ap | RHSA-2024:3781, RHSA-2024:1640 |
| Red Hat Ansible Automation Platform Developer 2 | python-black +1 | 22.8.0-2.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python-cryptography +1 | 42.0.5-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python-idna +1 | 3.7-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python-jinja2 +1 | 3.1.4-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python-requests +1 | 2.32.2-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python39-black +1 | 22.8.0-2.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python39-cryptography +1 | 42.0.5-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python39-idna +1 | 3.7-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python39-jinja2 +1 | 3.1.4-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | python39-requests +1 | 2.32.2-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform Developer 2 | receptor +1 | 1.4.5-1.el8ap | RHSA-2024:3781, RHSA-2024:1640 |
| Red Hat Ansible Automation Platform 2 | automation-controller-venv-tower | 4.5.5-2.el8ap | RHSA-2024:3781, RHSA-2024:1640 |
| Red Hat Ansible Automation Platform 2 | automation-hub +2 | 4.9.2-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-aiohttp +1 | 3.9.3-1.el9ap | RHSA-2024:3781, RHSA-2024:1640 |
| Red Hat Ansible Automation Platform 2 | python-black +1 | 22.8.0-2.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-cryptography +1 | 42.0.5-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-django +1 | 4.2.11-1.el9ap | RHSA-2024:1640 |
| Red Hat Ansible Automation Platform 2 | python-galaxy-ng +1 | 4.9.2-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-gunicorn +1 | 22.0.0-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-idna +1 | 3.7-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-jinja2 +1 | 3.1.4-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-pillow +1 | 10.3.0-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-pydantic +1 | 1.10.15-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-requests +1 | 2.32.2-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-social-auth-app-django +1 | 5.4.1-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python-sqlparse +1 | 0.5.0-1.el9ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-aiohttp +1 | 3.9.3-1.el8ap | RHSA-2024:3781, RHSA-2024:1640 |
| Red Hat Ansible Automation Platform 2 | python39-black +1 | 22.8.0-2.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-cryptography +1 | 42.0.5-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-django +1 | 4.2.11-1.el8ap | RHSA-2024:1640 |
| Red Hat Ansible Automation Platform 2 | python39-gunicorn +1 | 22.0.0-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-idna +1 | 3.7-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-jinja2 +1 | 3.1.4-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-pillow +1 | 10.3.0-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-pydantic +1 | 1.10.15-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-requests +1 | 2.32.2-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-social-auth-app-django +1 | 5.4.1-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | python39-sqlparse +1 | 0.5.0-1.el8ap | RHSA-2024:3781 |
| Red Hat Ansible Automation Platform 2 | receptor +1 | 1.4.5-1.el8ap | RHSA-2024:3781, RHSA-2024:1640 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Package Hub 15 SP5 | python-Django | 2.2.28-bp155.7.9.1 | openSUSE-SU-2024:0077-1 |
| SUSE Package Hub 15 SP5 | python-Django1 | 1.11.29-bp155.4.9.1 | openSUSE-SU-2024:0080-1 |
| SUSE OpenStack Cloud Crowbar 9 | python-Django1 | 1.11.29-3.58.3 | SUSE-SU-2024:1140-1, SUSE-SU-2024:0874-1 |
| SUSE OpenStack Cloud Crowbar 8 | python-Django | 1.11.29-3.59.3 | SUSE-SU-2024:1141-1, SUSE-SU-2024:0875-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE OpenStack Cloud 9 | python-Django1 | 1.11.29-3.58.3 | SUSE-SU-2024:1140-1, SUSE-SU-2024:0874-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-horizon | 14.1.1~dev11-4.51.4 | SUSE-SU-2024:1140-1, SUSE-SU-2024:0874-1 |
| SUSE OpenStack Cloud 8 | python-Django | 1.11.29-3.59.3 | SUSE-SU-2024:1141-1, SUSE-SU-2024:0875-1 |
| SUSE OpenStack Cloud 8 | venv-openstack-horizon | 12.0.5~dev6-14.54.5 | SUSE-SU-2024:1141-1, SUSE-SU-2024:0875-1 |
| SUSE HPE Helion OpenStack 8 | python-Django | 1.11.29-3.59.3 | SUSE-SU-2024:1141-1, SUSE-SU-2024:0875-1 |
| SUSE HPE Helion OpenStack 8 | venv-openstack-horizon-hpe | 12.0.5~dev6-14.54.4 | SUSE-SU-2024:1141-1, SUSE-SU-2024:0875-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-Django | 4.2.11-1.1 | openSUSE-SU-2026:11248-1, openSUSE-SU-2024:13749-1 |
| openSUSE Tumbleweed | python-Django4 | 4.2.14-1.1 | openSUSE-SU-2026:11235-1, openSUSE-SU-2024:14208-1 |
| openSUSE Tumbleweed | python-Django5 | 5.2.16-1.1 | openSUSE-SU-2026:11270-1 |
| openSUSE Tumbleweed | python-Django6 | 6.0-1.1 | openSUSE-SU-2026:10005-1 |
| openSUSE Leap 15.5 | python-Django | 2.0.7-150000.1.17.1 | openSUSE-SU-2024:0077-1, SUSE-SU-2024:0902-1 |
| openSUSE Leap 15.5 | python-Django1 | 1.11.29-bp155.4.9.1 | openSUSE-SU-2024:0080-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-django | 4.2.11-r0 | — |
| Alpine v3.23 | py3-django | 4.2.11-r0 | — |
| Alpine v3.22 | py3-django | 4.2.11-r0 | — |
| Alpine v3.21 | py3-django | 4.2.11-r0 | — |
| Alpine v3.20 | py3-django | 4.2.11-r0 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | py3-django | 5.0.4-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django | >= 3.2, < 3.2.25 | 3.2.25 | GHSA-vm8q-m57g-pff3 |
| PyPI | django | >= 4.2, < 4.2.11 | 4.2.11 | GHSA-vm8q-m57g-pff3 |
| PyPI | django | >= 5.0, < 5.0.3 | 5.0.3 | GHSA-vm8q-m57g-pff3 |
| PyPI | django | >= 3.2, < 3.2.25 · >= 4.2, < 4.2.11 · >= 5.0, < 5.0.3 | 3.2.25, 4.2.11, 5.0.3 | PYSEC-2024-47 |
Advisories 24
- WID-SEC-2024-1328 Red Hat Ansible Automation Platform: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 18, 2026
- RHSA-2024:1640 Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update Red Hat Security Advisories (RHSA) · Oct 18, 2026
- RHSA-2024:3781 Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2024:1878 Red Hat Security Advisory: RHUI 4.8 Release - Security Updates, Bug Fixes, and Enhancements Red Hat Security Advisories (RHSA) · Sep 9, 2026
- RHSA-2024:5662 Red Hat Security Advisory: Satellite 6.15.3 Security Update Red Hat Security Advisories (RHSA) · Aug 26, 2026
- openSUSE-SU-2026:11270-1 python313-Django5-5.2.16-1.1 on GA media SUSE / openSUSE Security Updates · Jul 15, 2026
- WID-SEC-2024-0538 Django: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Jul 13, 2026
- openSUSE-SU-2026:11248-1 python313-Django-5.2.16-1.1 on GA media SUSE / openSUSE Security Updates · Jul 11, 2026
- openSUSE-SU-2026:11235-1 python313-Django4-4.2.30-4.1 on GA media SUSE / openSUSE Security Updates · Jul 10, 2026
- RHSA-2025:4187 Red Hat Security Advisory: Red Hat OpenStack Platform 17.1 (python-django) security update Red Hat Security Advisories (RHSA) · Jun 3, 2026
- USN-6674-2 python-django vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- USN-6674-1 python-django vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- openSUSE-SU-2026:10005-1 python312-Django6-6.0-1.1 on GA media SUSE / openSUSE Security Updates · Mar 23, 2026
- DLA-4210-1 python-django - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-6136-1 python-django - security update Debian Security (DSA / DLA) · Feb 15, 2026
- SUSE-SU-2024:1140-1 Security update for python-Django SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0902-1 Security update for python-Django SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1141-1 Security update for python-Django SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:13749-1 python310-Django-4.2.11-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:0077-1 Security update for python-Django SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0874-1 Security update for python-Django1 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0875-1 Security update for python-Django SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:14208-1 python310-Django4-4.2.14-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:0080-1 Security update for python-Django1 SUSE / openSUSE Security Updates · May 7, 2025
References
- https://groups.google.com/forum/#%21forum/django-announce
- https://docs.djangoproject.com/en/5.0/releases/security/
- https://www.djangoproject.com/weblog/2024/mar/04/security-releases/
- FEDORA-2024-5c7fb64c74 vendor-advisory
- FEDORA-2024-2ec03ca8cb vendor-advisory
- 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