CVE-2026-1285

Potential denial-of-service vulnerability in django.utils.text.Truncator HTML methods

Published Feb 3, 2026 CVSS 3.1 · 7.5 High EPSS 1.1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

An attacker can trigger a denial‑of‑service condition by submitting data that contains a large number of unmatched HTML end tags to Django’s truncation utilities when the html flag is enabled. The vulnerability is rooted in resource exhaustion; operations that parse the malformed HTML can consume excessive memory, leading to high CPU usage or crashes. This flaw is categorized as CWE‑407 (Excessive Resource Consumption) and CWE‑770 (Uncontrolled Memory Allocation).

Affected Systems

The issue affects the Django framework. Versions 6.0 prior to 6.0.2, 5.2 prior to 5.2.11, and 4.2 prior to 4.2.28 are vulnerable. Older Django series such as 5.0.x, 4.1.x, and 3.2.x were not examined but may also be affected.

Risk and Exploitability

The CVSS score is 7.5, indicating a high severity. While the EPSS score is below 1%, meaning that the probability of exploitation has historically been low, the lack of a KEV listing does not mitigate the risk. Exploitation requires an attacker to supply crafted input to an endpoint using Truncator.chars(), Truncator.words(), or the corresponding template filters with html=True. Successfully leveraged, the attacker can cause the target application to consume excessive resources and potentially become unavailable, though remote code execution is not supported.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Django to version 6.0.2, 5.2.11, or 4.2.28 or later to incorporate the fixed logic.
  • If an upgrade cannot be performed immediately, eliminate the use of Truncator methods or the truncatechars_html and truncatewords_html filters wherever possible to prevent the vulnerability from being triggered.
  • Implement input validation that rejects or sanitizes payloads containing an excessive number of unmatched HTML end tags, reducing the chance of resource exhaustion.

Generated by OpenCVE AI on April 18, 2026 at 00:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4484-1 python-django security update
Debian DSA Debian DSA DSA-6150-1 python-django security update
Github GHSA Github GHSA GHSA-4rrr-2h4v-f3j9 Django has Inefficient Algorithmic Complexity
Ubuntu USN Ubuntu USN USN-8009-1 Django vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Djangoproject
Djangoproject django
Vendors & Products Djangoproject
Djangoproject django
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Potential denial-of-service vulnerability in django.utils.text.Truncator HTML methods
Weaknesses CWE-407
References
Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
DSF
Published
Updated
Feb 3, 2026, 4:22 PM
Reserved
Jan 21, 2026, 12:49 PM
Status
Analyzed
Published
Feb 3, 2026, 3:16 PM
Modified
Jun 17, 2026, 10:15 AM
Severity
Moderate
Public date
Feb 3, 2026, 2:35 PM