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
For access to advanced analysis and higher rate limits, contact root@offseq.com
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: 7/31/2025, 10:01:11 PM
Views: 22
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.