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
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | django | >= 1.3, < 1.3.4, >= 1.4, < 1.4.2 | 1.3.4, 1.4.2 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2012-4520
- https://github.com/django/django/commit/92d3430f12171f16f566c9050c40feefb830a4a3
- https://github.com/django/django/commit/9305c0e12d43c4df999c3301a1f0c742264a657e
- https://github.com/django/django/commit/b45c377f8f488955e0c7069cad3f3dd21910b071
- https://www.openwall.com/lists/oss-security/2012/10/30/4
- https://www.djangoproject.com/weblog/2012/oct/17/security
- https://www.debian.org/security/2013/dsa-2634
- https://web.archive.org/web/20140417023920/http://securitytracker.com/id?1027708
- https://ubuntu.com/usn/usn-1757-1
- https://ubuntu.com/usn/usn-1632-1
- https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090970.html
- https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090904.html
- https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090666.html
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2012-7.yaml
- https://github.com/django/django
- https://bugzilla.redhat.com/show_bug.cgi?id=865164
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090666.html
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090904.html
- http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090970.html
- http://ubuntu.com/usn/usn-1632-1
- http://ubuntu.com/usn/usn-1757-1
- http://www.debian.org/security/2013/dsa-2634
- http://www.openwall.com/lists/oss-security/2012/10/30/4
- http://www.osvdb.org/86493
- https://www.djangoproject.com/weblog/2012/oct/17/security/
- http://securitytracker.com/id?1027708
- http://secunia.com/advisories/51314
- http://secunia.com/advisories/51033
- https://github.com/advisories/GHSA-2655-q453-22f9
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N- Weakness (CWE)
CWE-20- Platform
- Python (PyPI)
- Package
django- Disclosed
- 18.11.2012
- Updated
- 11.10.2026 12:19
Sources and licenses
OSV / GitHub Advisory Database - GHSA-2655-q453-22f9 - CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2012-7 - PyPA Advisory Database; CC BY 4.0
Vulnerability history: django
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 162
- First → latest
- 10.2007 08.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 16
- High 65
- Medium 63
- Low 18
Disclosures per year
- 2017: 3
- 2018: 5
- 2019: 11
- 2020: 6
- 2021: 8
- 2022: 14
- 2023: 7
- 2024: 14
- 2025: 12
- 2026: 26
earlier: 56
-
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 this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.