Live threats

All CVEs / Djangoproject

CVE-2012-4520Djangoproject Django

Medium 6.4 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Django.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
djangoprojectdjango1.3
djangoprojectdjango1.3
djangoprojectdjango1.3
djangoprojectdjango1.3.1
djangoprojectdjango1.3.2
djangoprojectdjango1.3.3
djangoprojectdjango1.4
djangoprojectdjango1.4.1

Official sources

References

Links published by the sources. Open them with care.