First published: Wed May 07 2025(Updated: )
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().
Credit: cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
Django | ||
debian/python-django | <=2:2.2.28-1~deb11u2<=2:2.2.28-1~deb11u6<=3:3.2.19-1+deb12u1<=3:4.2.20-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of CVE-2025-32873 is classified as high due to the potential for remote code execution.
To fix CVE-2025-32873, upgrade Django and the python-django package to the latest secure versions available for your distribution.
CVE-2025-32873 affects Django versions 2.2.x up to 2.2.28 and several 3.x versions including 3.2.x prior to 3.2.19.
While upgrading is strongly recommended, a potential workaround is to restrict access to the vulnerable application components.
CVE-2025-32873 can allow an attacker to execute arbitrary code in the context of the web application, leading to data breaches or system compromise.