Every CVE Search/ Get API key

CVE-2012-4520

Django Allows Arbitrary URL Generation

6.4 MediumFix available

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.

Exploit likelihood

3.67%Down 0.1 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 6.4

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.

Record
CVE-2012-4520
CVSS 2.0
6.4 MediumAV:N/AC:L/Au:N/C:P/I:P/A:N
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2012-4520
Updated
2026-11-02
EUVDEUVD-2012-0006 No score

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.

Record
EUVD-2012-0006
Updated
2026-11-03
GitHub AdvisoriesGHSA-2655-q453-22f9 8.7

Django Allows Arbitrary URL Generation

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.

Record
GHSA-2655-q453-22f9
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-20
Updated
2026-11-02
OSVGHSA-2655-q453-22f9 8.7

Django Allows Arbitrary URL Generation

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.

Record
GHSA-2655-q453-22f9
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness
CWE-20
Updated
2026-11-02
OSV No score

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.

Record
CVE-2012-4520
Updated
2026-11-02
OSVDEBIAN-CVE-2012-4520 No score

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.

Record
DEBIAN-CVE-2012-4520
Updated
2026-11-02
OSVPYSEC-2012-7 No score

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.

Record
PYSEC-2012-7
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
django
PyPI
1.3 up to 1.3.4
1.3.4
django
PyPI
1.4 up to 1.4.2
1.4.2
python-django
Debian:12
before 1.4.2-1
1.4.2-1
python-django
Debian:13
before 1.4.2-1
1.4.2-1
python-django
Debian:14
before 1.4.2-1
1.4.2-1
python-django
Debian:6.0
before 1.2.3-3+squeeze5, plus listed versions
1.2.3-31.2.3-3+squeeze11.2.3-3+squeeze21.2.3-3+squeeze3
1.2.3-3+squeeze5
django
PyPI
1.3 up to 1.3.4, plus listed versions
1.3.11.3.21.3.3
1.3.4
django
PyPI
1.4 up to 1.4.2, plus listed versions
1.4.1
1.4.2
django
PyPI
1.3 up to 1.3.4, 1.4 up to 1.4.2, plus listed versions
1.3.11.3.21.3.31.4.11.2.11.21.11.0
1.3.41.4.2

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2012-4520 is a medium vulnerability (CVSS 6.4) in Djangoproject Django, published November 18, 2012. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.67%, the 89th percentile. Fixed in django 1.3.4.

References

Show 17 moreShow less
MoveEnter Open