CVE-2025-32873Djangoproject Django
Medium 5.3 No auth needed
Follow: this CVE · Djangoproject · Djangoproject Django We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- May 8, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-770
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
What happens
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().
What to do
- Apply the vendor's security update for Django.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | django |
≥ 4.2 < 4.2.21 |
4.2.21 |
pip install "django>=4.2.21" |
| PyPI | django |
≥ 5.1 < 5.1.9 |
5.1.9 |
pip install "django>=5.1.9" |
| PyPI | django |
≥ 5.2 < 5.2.1 |
5.2.1 |
pip install "django>=5.2.1" |
| PyPI | django |
≥ 4.2 < 4.2.21 |
4.2.21 |
pip install "django>=4.2.21" |
| PyPI | django |
≥ 5.1 < 5.1.9 |
5.1.9 |
pip install "django>=5.1.9" |
| PyPI | django |
≥ 5.2 < 5.2.1 |
5.2.1 |
pip install "django>=5.2.1" |
Per OSV / GitHub Advisories (GHSA-8j24-cjrq-gr2m, PYSEC-2025-37). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | django | ≥ 4.2.0 < 4.2.21 |
| djangoproject | django | ≥ 5.1 < 5.1.9 |
| djangoproject | django | 5.2 |
Official advisories
- python313-Django5-5.2.16-1.1 on GA media · SUSE · openSUSE-SU-2026:11270-1 · Jul 14, 2026 Critical
- python312-Django6-6.0-1.1 on GA media · SUSE · openSUSE-SU-2026:10005-1 · Jan 3, 2026 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- docs.djangoproject.com Release Notes
- groups.google.com Mailing List
- www.djangoproject.com Vendor Advisory
- www.openwall.com Mailing List Third Party Advisory