CVE-2012-4520Djangoproject Django
Medium 6.4 No auth needed
Follow: this CVE · Djangoproject · Djangoproject Django We alert you by email or Slack (account required).
- Priority
- 54
- CVSS 2.0
- 6.4
- EPSS
- 3.7% probability of exploitation in 30 days · percentile 91
- Auth required
- No
- Published
- Nov 18, 2012
- Updated
- Jun 16, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- Vector
AV:N/AC:L/Au:N/C:P/I:P/A:N
What happens
The django.http.HttpRequest.get_host function in Django 1.3.x before 1.3.4 and 1.4.x before 1.4.2 allows remote attackers to generate and display arbitrary URLs via crafted username and password Host header values.
What to do
- Apply the vendor's security update for Django.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | django |
≥ 1.3 < 1.3.4 |
1.3.4 |
pip install "django>=1.3.4" |
| PyPI | django |
≥ 1.4 < 1.4.2 |
1.4.2 |
pip install "django>=1.4.2" |
| PyPI | django |
≥ 1.3 < 1.3.4 |
1.3.4 |
pip install "django>=1.3.4" |
| PyPI | django |
≥ 1.4 < 1.4.2 |
1.4.2 |
pip install "django>=1.4.2" |
Per OSV / GitHub Advisories (GHSA-2655-q453-22f9, PYSEC-2012-7). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | django | 1.3 |
| djangoproject | django | 1.3 |
| djangoproject | django | 1.3 |
| djangoproject | django | 1.3.1 |
| djangoproject | django | 1.3.2 |
| djangoproject | django | 1.3.3 |
| djangoproject | django | 1.4 |
| djangoproject | django | 1.4.1 |
Official sources
References
Links published by the sources. Open them with care.
- bugs.debian.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- secunia.com Vendor Advisory
- secunia.com Vendor Advisory
- securitytracker.com
- ubuntu.com
- ubuntu.com
- www.debian.org
- www.openwall.com
- www.osvdb.org
- bugzilla.redhat.com
- github.com
- github.com
- github.com
- www.djangoproject.com Patch Vendor Advisory