Skip to content
OpenAdvisories
Medium · 5.3 Public exploit CVE-2025-32873 BIT-django-2025-32873EUVD-2025-13952GHSA-8j24-cjrq-gr2mPYSEC-2025-37

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

Published May 8, 2025 · Updated May 8, 2025 · Assigned by mitre

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 products

VendorProductAffectedFixed
djangoproject Django 4.2 – < 4.2.21, 5.1 – < 5.1.9, 5.2 – < 5.2.1 4.2.21

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-django 3:4.2.21-1 —
Debian 13 python-django 3:4.2.21-1 —
Debian 12 python-django 3:3.2.25-0+deb12u1 DSA-6136-1
Debian 11 python-django 2:2.2.28-1~deb11u7 DLA-4210-1
ReleasePackageFixed inAdvisory
Ubuntu 25.10 python-django 3:4.2.18-1ubuntu1.1 —
Ubuntu 24.04 LTS python-django 3:4.2.11-1ubuntu1.7 USN-7501-1
Ubuntu 22.04 LTS python-django 2:3.2.12-2ubuntu1.18 USN-7501-1
Ubuntu 20.04 LTS python-django 2:2.2.12-1ubuntu0.29 USN-7501-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS python-django 1:1.11.11-1ubuntu1.21+esm11 USN-7501-2
Ubuntu Pro 16.04 LTS python-django No fix yet —
Ubuntu Pro 14.04 LTS python-django No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP7 python-Django 4.2.11-150600.3.21.1 SUSE-SU-2025:01523-1
SLES 15 SP6 python-Django 4.2.11-150600.3.21.1 SUSE-SU-2025:1523-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Django 5.2.1-1.1 openSUSE-SU-2025:15087-1
openSUSE Tumbleweed python-Django4 4.2.21-1.1 openSUSE-SU-2025:15082-1
openSUSE Tumbleweed python-Django5 5.2.16-1.1 openSUSE-SU-2026:11270-1
openSUSE Tumbleweed python-Django6 6.0-1.1 openSUSE-SU-2026:10005-1
openSUSE Leap 15.6 python-Django 4.2.11-150600.3.21.1 SUSE-SU-2025:1523-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-django 4.2.21-r0 —
Alpine v3.23 py3-django 4.2.21-r0 —
Alpine v3.22 py3-django 4.2.21-r0 —
Alpine v3.21 py3-django 4.2.21-r0 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django >= 4.2, < 4.2.21 4.2.21 GHSA-8j24-cjrq-gr2m
PyPI django >= 5.1, < 5.1.9 5.1.9 GHSA-8j24-cjrq-gr2m
PyPI django >= 5.2, < 5.2.1 5.2.1 GHSA-8j24-cjrq-gr2m
PyPI django >= 4.2, < 4.2.21 · >= 5.1, < 5.1.9 · >= 5.2, < 5.2.1 4.2.21, 5.1.9, 5.2.1 PYSEC-2025-37

Advisories 11

References