CVE-2009-3695: Algorithmic complexity vulnerability in Django
Summary
CVE-2009-3695: Algorithmic complexity vulnerability in the forms library in Django 1.0 before 1.0.4 and 1.1 before 1.1.1 allows remote attackers to cause a denial of service (CPU consumption) via a crafted (1) EmailField (email address... Affects django across 2 version ranges.
>= 1.0, < 1.0.4
>= 1.1, < 1.1.1
Fixed in 1.0.4 or 1.1.1, depending on the release line you run. How to fix ↓
Also tracked for
- python-django · Debian:11
The same CVE-2009-3695 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
Django is a popular Python web framework used for building web applications. It provides a set of tools and libraries for handling common web development tasks, such as database management, URL routing, and form handling. Django versions 1.0 before 1.0.4 and 1.1 before 1.1.1 are affected by an algorithmic complexity vulnerability in the forms library.
Vulnerability Detail
The vulnerability allows remote attackers to cause a denial of service (CPU consumption) by exploiting a flaw in the handling of EmailField (email address) or URLField (URL) inputs. Specifically, a crafted input triggers a large amount of backtracking in a regular expression, leading to excessive CPU usage. This can result in degraded performance or even a complete denial of service if the system becomes overwhelmed.
How To Fix
Latest published version: 6.1.2 as of 22 Oct 2026
pip install --upgrade "django==6.1.2"
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 1.0, < 1.0.41.0.4pip install --upgrade "django==1.0.4" -
>= 1.1, < 1.1.11.1.1pip install --upgrade "django==1.1.1"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. However, as a general best practice, it is recommended to validate and sanitize user inputs to prevent the exploitation of regular expression vulnerabilities. Implementing input validation and limiting the complexity of regular expressions used in form fields can help mitigate the risk.
Conclusion
The algorithmic complexity vulnerability in Django's forms library can be exploited to cause a denial of service. It is crucial to upgrade to the fixed versions of Django to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for django →
FAQ
Django is a Python web framework that simplifies the development of web applications by providing a set of tools and libraries for common tasks.
Django versions 1.0 before 1.0.4 and 1.1 before 1.1.1 are affected by this vulnerability.
The vulnerability can cause a denial of service by consuming excessive CPU resources, leading to degraded performance or system unresponsiveness.
To fix this vulnerability, upgrade to Django version 1.0.4 or later (if using Django 1.0.x) or version 1.1.1 or later (if using Django 1.1.x).
While no specific workaround is provided, implementing input validation and limiting regular expression complexity can help mitigate the risk.
Related vulnerabilities
Recent vulnerabilities recorded for django.