CVE-2025-32873
JSON

5.3medium

Django has a denial-of-service possibility in strip_tags()

Severity
5.3medium CVSS:3.1 by mitre
Exploit likelihood
1.13% (higher than 66% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-8j24-cjrq-gr2mBIT-DJANGO-2025-32873PYSEC-2025-37

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

Product or packageVersionsReported by
djangoproject Djangofrom 4.2 before 4.2.21, from 5.1 before 5.1.9, from 5.2 before 5.2.1, from 4.2.0 before 4.2.21, 5.2CVE List, NVD
django (PyPI)from 4.2 before 4.2.21, from 5.1 before 5.1.9, from 5.2 before 5.2.1GitHub Advisory Database, PyPA Advisory Database
django (Bitnami)from 4.2.0 before 4.2.21, from 5.1.0 before 5.1.9, from 5.2.0 before 5.2.5Bitnami Vulnerability Database

All scores

mitre5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Bitnami Vulnerability Databasemedium rating

Classification

CWE-770

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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().

NVD (es)

Se descubrió un problema en Django 4.2 (anterior a 4.2.21), 5.1 (anterior a 5.1.9) y 5.2 (anterior a 5.2.1). La función django.utils.html.strip_tags() es vulnerable a una posible denegación de servicio (rendimiento lento) al procesar entradas que contienen grandes secuencias de etiquetas HTML incompletas. El filtro de plantilla striptags también es vulnerable, ya que está basado en strip_tags().

References

https://docs.djangoproject.com/en/dev/releases/security/article, release-notes, web
https://groups.google.com/g/django-announcediscussion, mailing-list, web
https://www.djangoproject.com/weblog/2025/may/07/security-releases/advisory, article, vendor-advisory
http://www.openwall.com/lists/oss-security/2025/05/07/1advisory, mailing-list, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2025-32873advisory, web
https://github.com/django/django/commit/9f3419b519799d69f2aba70b9d25abe2e70d03e0web
https://docs.djangoproject.com/en/dev/releases/securityweb
https://github.com/django/djangopackage
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-37.yamlweb
https://www.djangoproject.com/weblog/2025/may/07/security-releasesweb
https://github.com/advisories/GHSA-8j24-cjrq-gr2madvisory

Sources

SourceRecordLicence
CVE ListCVE-2025-32873 changed 2025-05-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-8j24-cjrq-gr2m changed 2026-09-10CC-BY-4.0
NVDCVE-2025-32873 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-37 changed 2026-06-10CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-DJANGO-2025-32873 changed 2026-09-08Apache-2.0