CVE-2025-32873: CWE-770 Allocation of Resources Without Limits or Throttling in djangoproject Django
An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().
AI Analysis
Technical Summary
CVE-2025-32873 is a vulnerability identified in the Django web framework versions 4.2 prior to 4.2.21, 5.1 prior to 5.1.9, and 5.2 prior to 5.2.1. The issue resides in the django.utils.html.strip_tags() function, which is designed to remove HTML tags from input strings. The vulnerability arises because this function does not impose limits or throttling when processing inputs containing large sequences of incomplete or malformed HTML tags. This can lead to excessive resource consumption, causing slow performance or denial-of-service (DoS) conditions. The template filter striptags, which relies on strip_tags(), is also affected. The root cause is classified under CWE-770, which refers to allocation of resources without limits or throttling, allowing an attacker to craft inputs that cause the function to consume disproportionate CPU or memory resources. Exploitation does not require authentication or user interaction, and the attack vector is network-based, as the vulnerable function is commonly used to sanitize user input in web applications. The CVSS v3.1 base score is 5.3 (medium severity), reflecting the potential for availability impact without compromising confidentiality or integrity. No known exploits are currently reported in the wild, but the vulnerability could be leveraged to degrade service availability by sending specially crafted payloads containing large incomplete HTML tag sequences to affected Django applications.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to the availability of web applications built on the affected Django versions. Organizations relying on Django for public-facing or internal web services could experience service degradation or outages if attackers exploit this flaw to trigger resource exhaustion. This can disrupt business operations, customer access, and internal workflows. The impact is more significant for high-traffic or critical applications where denial-of-service conditions can cause cascading operational issues. Since the vulnerability does not affect confidentiality or integrity, data breaches are unlikely directly from this flaw. However, service unavailability can indirectly affect trust and compliance, especially under regulations like GDPR that emphasize service continuity. Organizations in sectors such as finance, healthcare, e-commerce, and government, which often use Django for web applications, may face operational and reputational risks if exploited.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should promptly upgrade Django to the fixed versions: 4.2.21, 5.1.9, or 5.2.1 or later. If immediate upgrading is not feasible, implement input validation and sanitization at the application or web server level to detect and reject inputs with excessively large or malformed HTML tag sequences before they reach the vulnerable function. Employ web application firewalls (WAFs) with custom rules to identify and block suspicious payloads targeting strip_tags(). Additionally, configure resource limits and timeouts on web application processes to prevent excessive CPU or memory consumption from a single request. Monitoring application performance and logs for unusual spikes in resource usage or slowdowns can help detect exploitation attempts early. Finally, conduct security testing and code reviews to identify any other functions that may be vulnerable to similar resource exhaustion issues.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2025-32873: CWE-770 Allocation of Resources Without Limits or Throttling in djangoproject Django
Description
An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().
AI-Powered Analysis
Technical Analysis
CVE-2025-32873 is a vulnerability identified in the Django web framework versions 4.2 prior to 4.2.21, 5.1 prior to 5.1.9, and 5.2 prior to 5.2.1. The issue resides in the django.utils.html.strip_tags() function, which is designed to remove HTML tags from input strings. The vulnerability arises because this function does not impose limits or throttling when processing inputs containing large sequences of incomplete or malformed HTML tags. This can lead to excessive resource consumption, causing slow performance or denial-of-service (DoS) conditions. The template filter striptags, which relies on strip_tags(), is also affected. The root cause is classified under CWE-770, which refers to allocation of resources without limits or throttling, allowing an attacker to craft inputs that cause the function to consume disproportionate CPU or memory resources. Exploitation does not require authentication or user interaction, and the attack vector is network-based, as the vulnerable function is commonly used to sanitize user input in web applications. The CVSS v3.1 base score is 5.3 (medium severity), reflecting the potential for availability impact without compromising confidentiality or integrity. No known exploits are currently reported in the wild, but the vulnerability could be leveraged to degrade service availability by sending specially crafted payloads containing large incomplete HTML tag sequences to affected Django applications.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to the availability of web applications built on the affected Django versions. Organizations relying on Django for public-facing or internal web services could experience service degradation or outages if attackers exploit this flaw to trigger resource exhaustion. This can disrupt business operations, customer access, and internal workflows. The impact is more significant for high-traffic or critical applications where denial-of-service conditions can cause cascading operational issues. Since the vulnerability does not affect confidentiality or integrity, data breaches are unlikely directly from this flaw. However, service unavailability can indirectly affect trust and compliance, especially under regulations like GDPR that emphasize service continuity. Organizations in sectors such as finance, healthcare, e-commerce, and government, which often use Django for web applications, may face operational and reputational risks if exploited.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should promptly upgrade Django to the fixed versions: 4.2.21, 5.1.9, or 5.2.1 or later. If immediate upgrading is not feasible, implement input validation and sanitization at the application or web server level to detect and reject inputs with excessively large or malformed HTML tag sequences before they reach the vulnerable function. Employ web application firewalls (WAFs) with custom rules to identify and block suspicious payloads targeting strip_tags(). Additionally, configure resource limits and timeouts on web application processes to prevent excessive CPU or memory consumption from a single request. Monitoring application performance and logs for unusual spikes in resource usage or slowdowns can help detect exploitation attempts early. Finally, conduct security testing and code reviews to identify any other functions that may be vulnerable to similar resource exhaustion issues.
Affected Countries
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- mitre
- Date Reserved
- 2025-04-11T00:00:00.000Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d9819c4522896dcbd8589
Added to database: 5/21/2025, 9:08:41 AM
Last enriched: 7/5/2025, 6:42:50 AM
Last updated: 1/7/2026, 6:11:22 AM
Views: 49
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-14835: CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in opajaap WP Photo Album Plus
HighCVE-2026-0650: CWE-306 Missing Authentication for Critical Function in OpenFlagr Flagr
CriticalCVE-2025-15474: CWE-770 Allocation of Resources Without Limits or Throttling in AuntyFey AuntyFey Smart Combination Lock
MediumCVE-2025-14468: CWE-352 Cross-Site Request Forgery (CSRF) in mohammed_kaludi AMP for WP – Accelerated Mobile Pages
MediumCVE-2025-9611: CWE-749 Exposed Dangerous Method or Function in Microsoft Playwright
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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.