Vulnerability · Published May 8, 2025 · Assigned by mitre
CVE-2025-32873
Medium 5.3
In plain English
A medium-severity resource allocation without limits in Django from djangoproject. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 14.3% (higher than 97% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.21 | py3-django | 4.2.21-r0 | ALPINE-CVE-2025-32873 |
| Alpine:v3.22 | py3-django | 4.2.21-r0 | ALPINE-CVE-2025-32873 |
| Alpine:v3.23 | py3-django | 4.2.21-r0 | ALPINE-CVE-2025-32873 |
| Alpine:v3.24 | py3-django | 4.2.21-r0 | ALPINE-CVE-2025-32873 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DSA-6136-1 |
| Debian:12 | python-django | 3:3.2.25-0+deb12u1 | DEBIAN-CVE-2025-32873 |
| Debian:13 | python-django | 3:4.2.21-1 | DEBIAN-CVE-2025-32873 |
| Debian:14 | python-django | 3:4.2.21-1 | DEBIAN-CVE-2025-32873 |
| PyPI | django | 5.2.1 | GHSA-8j24-cjrq-gr2m |
| PyPI | django | 4.2.21, 5.1.9, 5.2.1 | PYSEC-2025-37 |
| PyPI | django | 5.1.9 | GHSA-8j24-cjrq-gr2m |
| PyPI | django | 4.2.21 | GHSA-8j24-cjrq-gr2m |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.18 | USN-7501-1 |
| Ubuntu:22.04:LTS | python-django | 2:3.2.12-2ubuntu1.18 | UBUNTU-CVE-2025-32873 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.7 | UBUNTU-CVE-2025-32873 |
| Ubuntu:24.04:LTS | python-django | 3:4.2.11-1ubuntu1.7 | USN-7501-1 |
| Ubuntu:25.10 | python-django | 3:4.2.18-1ubuntu1.1 | UBUNTU-CVE-2025-32873 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | Django | 4.2 – before 4.2.215.1 – before 5.1.95.2 – before 5.2.1 |
Weakness: CWE-770 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L