Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-django | 1.4.2-1 | — |
| Debian 13 | python-django | 1.4.2-1 | — |
| Debian 12 | python-django | 1.4.2-1 | — |
| Debian 6.0 | python-django | 1.2.3-3+squeeze5 | DSA-2634-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django | >= 1.3, < 1.3.4 | 1.3.4 | GHSA-2655-q453-22f9 |
| PyPI | django | >= 1.4, < 1.4.2 | 1.4.2 | GHSA-2655-q453-22f9 |
| PyPI | django | >= 1.3, < 1.3.4 · >= 1.4, < 1.4.2 | 1.3.4, 1.4.2 | PYSEC-2012-7 |
Advisories 1
- DSA-2634-1 python-django - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- [oss-security] 20121029 Re: CVE Request: Django mailing-list
- 1027708 vdb-entry
- https://github.com/django/django/commit/b45c377f8f488955e0c7069cad3f3dd21910b071
- 86493 vdb-entry
- 51314 third-party-advisory
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145
- FEDORA-2012-16440 vendor-advisory
- USN-1757-1 vendor-advisory
- https://github.com/django/django/commit/92d3430f12171f16f566c9050c40feefb830a4a3
- DSA-2634 vendor-advisory
- https://www.djangoproject.com/weblog/2012/oct/17/security/
- FEDORA-2012-16417 vendor-advisory
- https://github.com/django/django/commit/9305c0e12d43c4df999c3301a1f0c742264a657e
- 51033 third-party-advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=865164
- FEDORA-2012-16406 vendor-advisory
- USN-1632-1 vendor-advisory