Skip to content

GHSA-qrh7-x6fp-c2mp CVE-2013-1664 PYSEC-2026-801

XML Entity Expansion (XEE) in Django

Medium PyPI
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

PackageVulnerableFixed 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.6
1.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

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy 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
Is this in your code?

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