Miggo Logo

CVE-2009-3695:
Django Regex Algorithmic Complexity Causes Denial of Service

7.5

CVSS Score

Basic Information

EPSS Score
-
Published
5/2/2022
Updated
9/16/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
Djangopip>= 1.0, < 1.0.41.0.4
Djangopip>= 1.1, < 1.1.11.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from inefficient regular expressions in Django's EmailField and URLField validation. The commit diff shows direct modifications to these regex patterns (email_re and url_re) in fields.py, replacing the backtracking-prone patterns. The CVE description explicitly identifies these fields as attack vectors, and the added test cases in fields.py confirm the exploit scenarios. The regex changes specifically limit repetition quantifiers and domain label lengths to prevent catastrophic backtracking.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*l*orit*mi* *ompl*xity vuln*r**ility in t** *orms li*r*ry in *j*n*o *.* ***or* *.*.* *n* *.* ***or* *.*.* *llows r*mot* *tt**k*rs to **us* * **ni*l o* s*rvi** (*PU *onsumption) vi* * *r**t** (*) *m*il*i*l* (*m*il ***r*ss) or (*) URL*i*l* (URL) t**t t

Reasoning

T** vuln*r**ility st*ms *rom in***i*i*nt r**ul*r *xpr*ssions in *j*n*o's *m*il*i*l* *n* URL*i*l* v*li**tion. T** *ommit *i** s*ows *ir**t mo*i*i**tions to t**s* r***x p*tt*rns (*m*il_r* *n* url_r*) in *i*l*s.py, r*pl**in* t** ***ktr**kin*-pron* p*tt*