GHSA-qrh7-x6fp-c2mp CVE-2013-1664 PYSEC-2026-801
XML Entity Expansion (XEE) in Django
- Severity
- Medium
- The publisher's own rating, not a CVSS score
- Exploit chance (EPSS)
- 4.77%
- Chance of exploitation in the next 30 days. Higher than 91.91% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-611 Improper Restriction of XML External Entity Reference
- Fix
1.3.6- Upgrade django to this version or later
Description
The XML libraries for Python, as used in OpenStack Keystone Essex, Folsom, and Grizzly; Compute (Nova) Essex and Folsom; Cinder Folsom; Django; and possibly other products allow remote attackers to cause a denial of service (resource consumption and crash) via an XML Entity Expansion (XEE) attack.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| django | >= 1.3.0, < 1.3.6 |
1.3.6 |
| django | >= 1.4.0, < 1.4.4 |
1.4.4 |
| django | >= 1.3.0, < 1.3.6>= 1.4.0, < 1.4.4 |
1.3.61.4.4 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
django PyPI → 1.3.6
- pip
pip install --upgrade "django>=1.3.6"- poetry
poetry add "django>=1.3.6"- uv
uv add "django>=1.3.6"
Weakness
CWE-611: Improper Restriction of XML External Entity Reference
The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.
How to prevent it
- Implementation, System Configuration: Many XML parsers and validators can be configured to disable external entity expansion.
References
Advisories
Packages
Other links
- github.com/django/django/commit/1c60d07ba23e0350351c278ad28d0bd5aa410b40
- github.com/django/django/commit/d19a27066b2247102e65412aa66917aff0091112
- bugs.launchpad.net/nova/+bug/1100282
- blog.python.org/2013/02/announcing-defusedxml-fixes-for-xml.html
- bugs.python.org/issue17239
- lists.openstack.org/pipermail/openstack-announce/2013-February/000078.html
- rhn.redhat.com/errata/RHSA-2013-0657.html
- rhn.redhat.com/errata/RHSA-2013-0658.html
- rhn.redhat.com/errata/RHSA-2013-0670.html
- ubuntu.com/usn/usn-1757-1
- openwall.com/lists/oss-security/2013/02/19/2
- openwall.com/lists/oss-security/2013/02/19/4
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-q238-5cxm-5c9h Django GeoDjango vulnerable to denial of service through deeply nested geometry collections | Medium | Also affects django |
| GHSA-wvqv-fj8w-qmhm Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing | High | Also affects django |
| GHSA-8qcx-xf44-272x Django: DomainNameValidator permits newline characters that may enable HTTP header injection | Medium | Also affects django |
| GHSA-crhf-3pfg-w68w Django: GDALRaster may over-read heap memory when constructed from bytes | Medium | Also affects django |
| GHSA-3h9f-r86x-qvjx Django: cache middleware may expose private responses when unrelated request cookies are present | Medium | Also affects django |
| GHSA-8cjm-8mp7-r2xf Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling | Medium | Also affects django |
| GHSA-mm6v-q8q9-pgcf Django fails to prevent reuse of a partially-initialized connection after a failed `STARTTLS` handshake | Low | Also affects django |
| GHSA-h7pc-vwp9-298g Django: signed cookies are vulnerable to salt namespace collisions | Medium | Also affects django |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor