PyPI: django

CVE-2024-53907

Safety vulnerability ID: SFTY-20241206-60449

Safety legacy ID: pyup.io-74395

Affected versions of Django are vulnerable to a potential denial-of-service (DoS) attack in the `django.utils.html.strip_tags()` method. The vulnerability occurs when the `strip_tags()` method or the `striptags` template filter processes inputs containing large sequences of nested, incomplete HTML entities.

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

Django denial-of-service in django.utils.html.strip_tags()

Advisory

Affected versions of Django are vulnerable to a potential denial-of-service (DoS) attack in the `django.utils.html.strip_tags()` method. The vulnerability occurs when the `strip_tags()` method or the `striptags` template filter processes inputs containing large sequences of nested, incomplete HTML entities.

Affected Package

Affecting django package, versions<4.2.17>=5.0a1,<5.0.10>=5.1a1,<5.1.4

Also affects

---

How to Fix

Upgradedjangoto4.2.175.0.105.1.4or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more