Miggo Logo

CVE-2013-1664: XML Entity Expansion (XEE) in Django

5

CVSS Score

Basic Information

EPSS Score
0.87341%
Published
5/17/2022
Updated
5/21/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
AV:N/AC:L/Au:N/C:N/I:N/A:P
Package NameEcosystemVulnerable VersionsFirst Patched Version
Djangopip>= 1.3.0, < 1.3.61.3.6
Djangopip>= 1.4.0, < 1.4.41.4.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from Django's XML deserializer not restricting entity processing. The commit 1c60d07 introduces DefusedExpatParser to harden parsing, indicating the original code lacked these safeguards. The Deserializer's init method invoked pulldom.parse with the default (insecure) ExpatParser, making it vulnerable to XEE. The patch replaces this with a custom parser that blocks dangerous XML features, confirming the original functions' vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T** XML li*r*ri*s *or Pyt*on, *s us** in Op*nSt**k K*yston* *ss*x, *olsom, *n* *rizzly; *omput* (Nov*) *ss*x *n* *olsom; *in**r *olsom; *j*n*o; *n* possi*ly ot**r pro*u*ts *llow r*mot* *tt**k*rs to **us* * **ni*l o* s*rvi** (r*sour** *onsumption *n*

Reasoning

T** vuln*r**ility st*ms *rom *j*n*o's XML **s*ri*liz*r not r*stri*tin* *ntity pro**ssin*. T** *ommit ******* intro*u**s ***us***xp*tP*rs*r to **r**n p*rsin*, in*i**tin* t** ori*in*l *o** l**k** t**s* s****u*r*s. T** **s*ri*liz*r's __init__ m*t*o* inv