Denial-of-Service Vulnerability in Django Package: CVE-2024-53907

python-django Updated 03 Oct 2025

Summary

04/12/2024
N/A
No i
High
7.5

UBUNTU-CVE-2024-53907: An issue was discovered in Django 5.1 before 5.1.4, 5.0 before 5.0.10, and 4.2 before 4.2.17. Affects python-django versions 1.5.4-1ubuntu1 – 1.6.11-0ubuntu1.3+esm7. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It is widely used for building web applications and is known for its scalability and security features. However, certain versions of Django are vulnerable to a denial-of-service attack due to improper handling of HTML entities in the strip_tags() method and striptags template filter.

Vulnerability Detail

An issue was discovered in Django versions 5.1 before 5.1.4, 5.0 before 5.0.10, and 4.2 before 4.2.17. The vulnerability arises from the strip_tags() method and striptags template filter being susceptible to denial-of-service attacks when processing inputs that contain large sequences of nested incomplete HTML entities. This can lead to significant resource consumption, potentially crashing the application or making it unresponsive.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If immediate patching is not feasible, consider implementing input validation to restrict the types of HTML entities that can be processed by the strip_tags() method and striptags template filter. This can help mitigate the risk of denial-of-service attacks.

Conclusion

CVE-2024-53907 is a significant vulnerability in the Django package that can lead to denial-of-service attacks. It is crucial for users of affected versions to update to the patched versions promptly to ensure the security and stability of their applications. Implementing input validation can serve as a temporary measure while updates are being applied.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

CVE-2024-53907 is a vulnerability in certain versions of the Django package that allows for potential denial-of-service attacks due to improper handling of HTML entities.

The affected versions include Django 5.1 before 5.1.4, 5.0 before 5.0.10, and 4.2 before 4.2.17.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score of CVE-2024-53907 is 7.5, indicating a high severity level.

If you cannot update Django immediately, implement input validation to restrict the types of HTML entities processed by the vulnerable methods as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback