Description
An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28.
`django.utils.text.Truncator.chars()` and `Truncator.words()` methods (with `html=True`) and the `truncatechars_html` and `truncatewords_html` template filters allow a remote attacker to cause a potential denial-of-service via crafted inputs containing a large number of unmatched HTML end tags.
Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.
Django would like to thank Seokchan Yoon for reporting this issue.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| djangoproject | Django | 6.0 – < 6.0.2, 5.2 – < 5.2.11, 4.2 – < 4.2.28 | 6.0.2 |
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.28-1 | — |
| Debian 13 | python-django | 3:4.2.28-0+deb13u1 | DSA-6150-1 |
| Debian 12 | python-django | 3:3.2.25-0+deb12u2 | DSA-6150-1 |
| Debian 11 | python-django | 2:2.2.28-1~deb11u12 | DLA-4484-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | python-django | 3:5.2.9-0ubuntu3 | — |
| Ubuntu 25.10 | python-django | 3:5.2.4-1ubuntu2.3 | — |
| Ubuntu 24.04 LTS | python-django | 3:4.2.11-1ubuntu1.14 | — |
| Ubuntu 22.04 LTS | python-django | 2:3.2.12-2ubuntu1.25 | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | python-django | 2:2.2.12-1ubuntu0.29+esm7 | — |
| Ubuntu Pro 18.04 LTS | python-django | 1:1.11.11-1ubuntu1.21+esm14 | — |
| Ubuntu Pro 16.04 LTS | python-django | 1.8.7-1ubuntu5.15+esm11 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite Utils 6 | foreman +1 | 3.12.0.14-1.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite Utils 6 | satellite +1 | 6.17.7-1.el9sat | RHSA-2026:5970 |
| Red Hat Satellite Maintenance 6 | libcomps +1 | 0.1.23-0.3.el9pc | RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | foreman +2 | 3.12.0.14-1.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | libcomps +2 | 0.1.23-0.3.el9pc | RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | python-brotli +1 | 1.2.0-0.1.el8pc | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | python-django +1 | 4.2.28-0.1.el8pc | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | python-pulp-container +1 | 2.22.3-1.el9pc | RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | python-pulp-rpm +1 | 3.27.10-2.el9pc | RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | python3.12-django | 4.2.30-1.el9pc | RHSA-2026:14835 |
| Red Hat Satellite Capsule 6 | python3.12-markdown | 3.8.2-1.el9pc | RHSA-2026:14835 |
| Red Hat Satellite Capsule 6 | python3.12-pyOpenSSL | 26.0.0-2.el9pc | RHSA-2026:14835 |
| Red Hat Satellite Capsule 6 | rubygem-activesupport | 7.0.8.7-2.el9sat | RHSA-2026:14835 |
| Red Hat Satellite Capsule 6 | rubygem-rubyipmi | 0.13.0-0.1.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite Capsule 6 | satellite +3 | 6.17.7-1.el9sat | RHSA-2026:5970 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Satellite 6 | foreman +14 | 3.12.0.14-1.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite 6 | libcomps +2 | 0.1.23-0.3.el9pc | RHSA-2026:5970 |
| Red Hat Satellite 6 | python-brotli +1 | 1.2.0-0.1.el8pc | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite 6 | python-django +1 | 4.2.28-0.1.el8pc | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite 6 | python-pulp-container +1 | 2.22.3-1.el9pc | RHSA-2026:5970 |
| Red Hat Satellite 6 | python-pulp-rpm +1 | 3.27.10-2.el9pc | RHSA-2026:5970 |
| Red Hat Satellite 6 | python3.12-django | 4.2.30-1.el9pc | RHSA-2026:14835 |
| Red Hat Satellite 6 | python3.12-markdown | 3.8.2-1.el9pc | RHSA-2026:14835 |
| Red Hat Satellite 6 | python3.12-pyOpenSSL | 26.0.0-2.el9pc | RHSA-2026:14835 |
| Red Hat Satellite 6 | rubygem-activesupport | 7.0.8.7-2.el9sat | RHSA-2026:14835 |
| Red Hat Satellite 6 | rubygem-fog-kubevirt | 1.5.1-1.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite 6 | rubygem-foreman_kubevirt | 0.2.0-2.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite 6 | rubygem-katello | 4.16.0.14-1.el9sat | RHSA-2026:5970 |
| Red Hat Satellite 6 | rubygem-rubyipmi | 0.13.0-0.1.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Satellite 6 | satellite +3 | 6.17.7-1.el9sat | RHSA-2026:5970 |
| Red Hat Satellite 6 | yggdrasil-worker-forwarder | 0.0.3-4.el8sat | RHSA-2026:5971, RHSA-2026:5970 |
| Red Hat Ansible Automation Platform Inside 2 | receptor +1 | 1.6.3-4.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform Developer 2 | automation-controller +1 | 4.6.26-1.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform Developer 2 | python3.12-django | 4.2.28-1.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform Developer 2 | receptor +1 | 1.6.3-4.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform 2 | automation-controller +4 | 4.6.26-1.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform 2 | automation-gateway +2 | 2.5.20260225-1.el8ap | RHSA-2026:3959 |
| Red Hat Ansible Automation Platform 2 | automation-platform-ui | 2.6.6-1.el9ap | RHSA-2026:3958 |
| Red Hat Ansible Automation Platform 2 | python3.12-aiohttp | 3.13.3-2.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform 2 | python3.12-django | 4.2.28-1.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform 2 | python3.12-protobuf | 5.29.6-1.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
| Red Hat Ansible Automation Platform 2 | receptor +1 | 1.6.3-4.el8ap | RHSA-2026:3959, RHSA-2026:3958 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | python-Django | 4.2.11-150600.3.47.1 | SUSE-SU-2026:0440-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-Django | 5.2.11-1.1 | openSUSE-SU-2026:10160-1 |
| openSUSE Tumbleweed | python-Django4 | 4.2.28-1.1 | openSUSE-SU-2026:10247-1 |
| openSUSE Tumbleweed | python-Django5 | 5.2.16-1.1 | openSUSE-SU-2026:11270-1 |
| openSUSE Tumbleweed | python-Django6 | 6.0.2-1.1 | openSUSE-SU-2026:10145-1 |
| openSUSE Leap 16.0 | python-Django | 5.2.4-bp160.5.1 | openSUSE-SU-2026:20184-1 |
| openSUSE Leap 15.6 | python-Django | 4.2.11-150600.3.47.1 | SUSE-SU-2026:0440-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-django | 4.2.28-r0 | — |
| Alpine v3.23 | py3-django | 4.2.28-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django | >= 6.0a1, < 6.0.2 | 6.0.2 | GHSA-4rrr-2h4v-f3j9 |
| PyPI | django | >= 5.2a1, < 5.2.11 | 5.2.11 | GHSA-4rrr-2h4v-f3j9 |
| PyPI | django | >= 4.2a1, < 4.2.28 | 4.2.28 | GHSA-4rrr-2h4v-f3j9 |
| PyPI | django | >= 4.2, < 4.2.28 · >= 5.2, < 5.2.11 · >= 6.0, < 6.0.2 | 4.2.28, 5.2.11, 6.0.2 | PYSEC-2026-45 |
Advisories 17
- WID-SEC-2026-2933 Splunk SOAR: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 2, 2026
- WID-SEC-2026-1007 IBM App Connect Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 25, 2026
- RHSA-2026:3959 Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.5 Product Security and Bug Fix Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:3958 Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.6 Product Security and Bug Fix Update Red Hat Security Advisories (RHSA) · Oct 20, 2026
- RHSA-2026:5971 Red Hat Security Advisory: Satellite 6.16.7 Async Update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2026:5970 Red Hat Security Advisory: Satellite 6.17.7 Async Update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2026:14835 Red Hat Security Advisory: Satellite 6.18.5 Async Update Red Hat Security Advisories (RHSA) · Oct 10, 2026
- WID-SEC-2026-1730 Xerox FreeFlow Print Server: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Jul 16, 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-2026-0297 Django: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jul 9, 2026
- openSUSE-SU-2026:20184-1 Security update for python-Django SUSE / openSUSE Security Updates · Mar 23, 2026
- openSUSE-SU-2026:10247-1 python311-Django4-4.2.28-1.1 on GA media SUSE / openSUSE Security Updates · Mar 23, 2026
- openSUSE-SU-2026:10145-1 python312-Django6-6.0.2-1.1 on GA media SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2026:0440-1 Security update for python-Django SUSE / openSUSE Security Updates · Mar 23, 2026
- DSA-6150-1 python-django - security update Debian Security (DSA / DLA) · Feb 26, 2026
- DLA-4484-1 python-django - security update Debian Security (DSA / DLA) · Feb 19, 2026
- openSUSE-SU-2026:10160-1 python311-Django-5.2.11-1.1 on GA media SUSE / openSUSE Security Updates · Feb 7, 2026
References
- Django security archive vendor-advisory
- Django releases announcements mailing-list
- Django security releases issued: 6.0.2, 5.2.11, and 4.2.28 vendor-advisory