CVE-2013-1665: Django XML External Entity (XXE) Vulnerability
MODERATECVE-2013-1665 is a MODERATE xml external entity (xxe) vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Django libraries in the PyPI ecosystem. The issue involves xml external entity (xxe) in django. Remediation is available by upgrading affected packages to version 1.3.6, 1.4.4.
CVE-2013-1665 at a Glance
How to Fix CVE-2013-1665
To remediate this vulnerability, upgrade all affected Django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Django>=1.3.6
pip install Django>=1.4.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Django
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2013-1665, inspect your installed packages using pip:
pip show Django
Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.6), your application is affected.
Note: The pip show Django command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2013-1665 Affected Django Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
≥ 1.3.0
< 1.3.6
|
1.3.6
|
|
Django
|
PyPI |
≥ 1.4.0
< 1.4.4
|
1.4.4
|
References
Frequently Asked Questions
What is CVE-2013-1665?
Which Django versions are affected?
What version fixes CVE-2013-1665?
Is Django affected?
What CWE is associated with CVE-2013-1665?
How can I check PyPI dependencies for CVE-2013-1665?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x64m-686f-fmm3",
"modified" : "2024-05-21T20:17:47Z",
"published" : "2022-05-17T05:09:39Z",
"aliases" : [ "CVE-2013-1665" ],
"summary" : "XML External Entity (XXE) in Django",
"details" : "The XML libraries for Python as used in OpenStack Keystone Essex and Folsom, Django, and possibly other products allow remote attackers to read arbitrary files via an XML external entity declaration in conjunction with an entity reference, aka an XML External Entity (XXE) attack.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.3.0"
}, {
"fixed" : "1.3.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.4.0"
}, {
"fixed" : "1.4.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-1665"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/1c60d07ba23e0350351c278ad28d0bd5aa410b40"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/d19a27066b2247102e65412aa66917aff0091112"
}, {
"type" : "WEB",
"url" : "https://bugs.launchpad.net/keystone/+bug/1100279"
}, {
"type" : "WEB",
"url" : "http://blog.python.org/2013/02/announcing-defusedxml-fixes-for-xml.html"
}, {
"type" : "WEB",
"url" : "http://bugs.python.org/issue17239"
}, {
"type" : "WEB",
"url" : "http://lists.openstack.org/pipermail/openstack-announce/2013-February/000078.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0657.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0658.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0670.html"
}, {
"type" : "WEB",
"url" : "http://ubuntu.com/usn/usn-1757-1"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2013/dsa-2634"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2013/02/19/2"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2013/02/19/4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-21T20:17:46Z",
"nvd_published_at" : "2013-04-03T00:55:00Z"
}
}