Denial-of-Service Vulnerability in Python-Django: urlize() and urlizetrunc() Filters

python-django Updated 02 Oct 2025

Summary

07/08/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-41990: An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15. Affects python-django versions < 3:4.2.15-1. Fixed in 3:4.2.15-1. 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

Python-Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It provides a robust set of features for building web applications, including an ORM, templating engine, and built-in security features. However, it is susceptible to vulnerabilities that can affect its performance and security, such as the one identified in this report.

Vulnerability Detail

An issue was discovered in Django versions 5.0 before 5.0.8 and 4.2 before 4.2.15. The vulnerability lies in the urlize() and urlizetrunc() template filters, which can be exploited through a denial-of-service attack. Attackers can send very large inputs containing specific sequences of characters, leading to potential service disruption. This vulnerability highlights the importance of input validation and handling in web applications.

How To Fix

Minimum fixed version

3:4.2.15-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-django

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can limit the size of inputs processed by the urlize() and urlizetrunc() filters in your templates. Implement input validation to reject excessively large inputs before they reach these filters.

Conclusion

The vulnerability in Python-Django's urlize() and urlizetrunc() filters poses a significant risk of denial-of-service attacks through large inputs. It is crucial for developers to update to the patched version and implement input validation as a preventive measure.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

The vulnerability allows for a denial-of-service attack via large inputs to the urlize() and urlizetrunc() filters in Django.

Django versions 5.0 before 5.0.8 and 4.2 before 4.2.15 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.

Implement input validation to limit the size of inputs processed by the vulnerable filters as a temporary measure.

Yes, the permanent fix is to update to the patched version of Django, specifically 3:4.2.15-1 or later.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

3:4.2.15-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-django

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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