CVE-2026-1285 is a high-severity (CVSS 7.5) CWE-407 vulnerability in django. A fix is available for django — see the affected versions and patch details below.
Potential denial-of-service vulnerability in django.utils.text.Truncator HTML methods
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-1285.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
django🐍django🐍djangoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | django | ≥ 6.0a1&&< 6.0.2 | 6.0.2pip install --upgrade 'django==6.0.2' |
| 🐍PyPI | django | ≥ 5.2a1&&< 5.2.11 | 5.2.11pip install --upgrade 'django==5.2.11' |
| 🐍PyPI | django | ≥ 4.2a1&&< 4.2.28 | 4.2.28pip install --upgrade 'django==4.2.28' |
Affected Products
djangodjangoprojectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update django to 6.0.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-1285 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This is a MODERATE impact denial-of-service flaw in Django. Applications utilizing Django that process untrusted HTML inputs with a large number of unmatched end tags through the `Truncator.chars()` or `Truncator.words()` methods (with `html=True`), or the `truncatechars_html` and `truncatewords_html` template…
To mitigate this issue, applications utilizing Django should avoid processing untrusted HTML content through the `django.utils.text.Truncator.chars()` and `Truncator.words()` methods with `html=True`, or the `truncatechars_html` and `truncatewords_html` template filters. Restrict the use of these functions to only trusted inputs where the HTML structure is controlled and validated.Source: Red Hat security advisory for CVE-2026-1285 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | python3.12-django-0:4.2.28-1.el8ap | RHSA-2026:3959 |
| Red Hat Ansible Automation Platform 2.6 for RHEL 9 | python3.12-django-0:4.2.28-1.el9ap | RHSA-2026:3958 |
| Red Hat Satellite 6.16 for RHEL 8 | python-django-0:4.2.28-0.1.el8pc | RHSA-2026:5971 |
| Red Hat Satellite 6.17 for RHEL 9 | foreman-0:3.14.0.14-1.el9sat | RHSA-2026:5970 |
| Red Hat Satellite 6.18 for RHEL 9 | python3.12-django-0:4.2.30-1.el9pc | RHSA-2026:14835 |
| Red Hat Discovery 2 | discovery/discovery-server-rhel9:1770913597 | RHSA-2026:2694 |
| Red Hat Satellite 6.18 | satellite/iop-advisor-backend-rhel9:1773451075 | RHSA-2026:6291 |
Frequently Asked Questions
Is CVE-2026-1285 in your dependencies?
Find it across PyPI, including transitive dependencies.