Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-1285: CWE-407: Inefficient Algorithmic Complexity in djangoproject Django

0
High
VulnerabilityCVE-2026-1285cvecve-2026-1285cwe-407
Published: Tue Feb 03 2026 (02/03/2026, 14:35:50 UTC)
Source: CVE Database V5
Vendor/Project: djangoproject
Product: Django

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.

AI-Powered Analysis

AILast updated: 02/03/2026, 15:15:26 UTC

Technical Analysis

CVE-2026-1285 is a denial-of-service vulnerability rooted in inefficient algorithmic complexity (CWE-407) within the Django web framework's HTML truncation utilities. The affected functions, django.utils.text.Truncator.chars() and Truncator.words(), when invoked with html=True, attempt to truncate HTML content safely by counting characters or words while preserving HTML structure. However, if the input contains a large number of unmatched HTML end tags, the algorithm's complexity increases dramatically, causing excessive CPU and memory consumption. This behavior can be triggered remotely by submitting crafted HTML inputs to web applications that utilize these truncation methods or the related template filters truncatechars_html and truncatewords_html. The vulnerability affects Django versions 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28, with earlier unsupported versions possibly vulnerable as well. Exploitation does not require authentication or user interaction beyond submitting malicious input, making it a straightforward vector for denial-of-service attacks. Although no public exploits have been reported, the vulnerability poses a risk to any Django-based web application that processes untrusted HTML content and uses these truncation features. The issue was responsibly disclosed by Seokchan Yoon and is documented without an assigned CVSS score as of publication.

Potential Impact

For European organizations, this vulnerability presents a risk of denial-of-service attacks that can degrade or disrupt web services built on affected Django versions. Organizations running public-facing web applications that accept or process user-generated HTML content and use the vulnerable truncation methods are particularly at risk. Such DoS attacks can lead to service downtime, impacting business continuity, customer trust, and potentially causing financial losses. The impact is heightened for sectors relying heavily on web applications, including e-commerce, government portals, media, and online services. Additionally, the vulnerability could be exploited as part of a larger attack chain to distract or overwhelm security teams. Given the widespread use of Django in Europe, especially in countries with strong software development ecosystems, the threat could affect a broad range of organizations. However, the lack of known exploits in the wild suggests that immediate widespread impact is limited but could increase if weaponized.

Mitigation Recommendations

The primary mitigation is to upgrade Django installations to the fixed versions: 6.0.2 or later, 5.2.11 or later, and 4.2.28 or later. Organizations should prioritize patching environments where untrusted HTML input is processed using the Truncator.chars() or Truncator.words() methods with html=True or the related template filters. Where immediate upgrading is not feasible, implement input validation to detect and reject HTML inputs with excessive unmatched end tags or suspiciously malformed HTML structures. Additionally, apply rate limiting and request throttling on endpoints that process such inputs to reduce the risk of resource exhaustion. Monitoring application performance and logs for unusual spikes in CPU or memory usage related to HTML processing can help detect exploitation attempts. Developers should review codebases for direct or indirect use of the vulnerable truncation methods and consider alternative safe truncation approaches or sanitization libraries. Finally, ensure that web application firewalls (WAFs) are configured to detect and block malformed HTML payloads that could trigger this vulnerability.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
DSF
Date Reserved
2026-01-21T12:49:21.258Z
Cvss Version
null
State
PUBLISHED

Threat ID: 69820d79f9fa50a62fcd6045

Added to database: 2/3/2026, 3:00:09 PM

Last enriched: 2/3/2026, 3:15:26 PM

Last updated: 2/3/2026, 5:24:50 PM

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats