Home / Djangoproject / Django / CVE-2012-4520
CVE-2012-4520: is it exploited, and which versions of Djangoproject Django are affected and fixed?
CVE-2012-4520 is an improper input validation vulnerability in Djangoproject Django. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 06:38 UTC). Affected: Django from 1.3 before 1.3.4 and Django from 1.4 before 1.4.2 (GitHub advisory GHSA-2655-q453-22f9). Fixed in 1.3.4 and 1.4.2 (GitHub advisory GHSA-2655-q453-22f9). Severity: Medium (6.4, CVSS 2.0, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 06:38 UTC, CVE record November 19, 2026, 07:20 UTC and NVD November 19, 2026, 08:48 UTC.
What is CVE-2012-4520?
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.
From the CVE record by redhat, last updated August 6, 2024, 20:42 UTC.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| 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 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated September 18, 2024. Summary: Django Allows Arbitrary URL Generation.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| djangoproject | django | 1.3 | application |
| djangoproject | django | 1.3.1 | application |
| djangoproject | django | 1.3.2 | application |
| djangoproject | django | 1.3.3 | application |
| djangoproject | django | 1.4 | application |
| djangoproject | django | 1.4.1 | application |
NVD analysis (status Modified), last modified June 16, 2026, 23:45 UTC.
How severe is CVE-2012-4520?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.4 | CVSS 2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2012-4520 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 3.74% probability of exploitation activity in the next 30 days, percentile 90.1 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-20 Improper Input Validation
Where are the vendor advisories and references?
- [oss-security] 20121029 Re: CVE Request: Django mailing-list, x_refsource_MLIST
- 1027708 vdb-entry, x_refsource_SECTRACK
- https://github.com/django/django/commit/b45c377f8f488955e0c7069cad3f3dd21910b071 x_refsource_CONFIRM
- 86493 vdb-entry, x_refsource_OSVDB
- 51314 third-party-advisory, x_refsource_SECUNIA
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145 x_refsource_MISC
- FEDORA-2012-16440 vendor-advisory, x_refsource_FEDORA
- USN-1757-1 vendor-advisory, x_refsource_UBUNTU
- https://github.com/django/django/commit/92d3430f12171f16f566c9050c40feefb830a4a3 x_refsource_CONFIRM
- DSA-2634 vendor-advisory, x_refsource_DEBIAN
- https://www.djangoproject.com/weblog/2012/oct/17/security/ x_refsource_CONFIRM
- FEDORA-2012-16417 vendor-advisory, x_refsource_FEDORA
- https://github.com/django/django/commit/9305c0e12d43c4df999c3301a1f0c742264a657e x_refsource_CONFIRM
- 51033 third-party-advisory, x_refsource_SECUNIA
- https://bugzilla.redhat.com/show_bug.cgi?id=865164 x_refsource_MISC
- FEDORA-2012-16406 vendor-advisory, x_refsource_FEDORA
- USN-1632-1 vendor-advisory, x_refsource_UBUNTU
When was it published, and where is the official record?
- Reserved
- August 21, 2012
- Published
- November 18, 2012, 23:00 UTC
- CVE record updated
- August 6, 2024, 20:42 UTC by redhat
- NVD
- Modified, last modified June 16, 2026, 23:45 UTC
- Last checked
- CVE list November 19, 2026, 07:20 UTC; NVD November 19, 2026, 08:48 UTC; KEV December 3, 2026, 06:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Django?
- Dec 2, 2026CVE-2026-132809 djangoproject Django: incorrect Calculation of Buffer Size
- Dec 2, 2026CVE-2026-132092 djangoproject Django: SQL injection
- Dec 2, 2026CVE-2026-127929 djangoproject Django: information disclosure
- Dec 2, 2026CVE-2026-125673 djangoproject Django: improper Resolution of Path Equivalence
- Dec 2, 2026CVE-2026-124827 djangoproject Django: external Control of File Name or Path
- Dec 2, 2026CVE-2026-119642 djangoproject Django: information disclosure
- Dec 2, 2026CVE-2026-115868 djangoproject Django: cross-site scripting (XSS)
- Nov 3, 2026CVE-2026-114582 djangoproject Django: server-side request forgery (SSRF)
Questions about CVE-2012-4520
Is CVE-2012-4520 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 06:38 UTC. FIRST's EPSS gives it a 3.74% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Djangoproject Django are affected by CVE-2012-4520?
Django from 1.3 before 1.3.4 and Django from 1.4 before 1.4.2, per the GitHub advisory GHSA-2655-q453-22f9. The tables above give every range the sources list.
Which version fixes CVE-2012-4520?
1.3.4 and 1.4.2, per the GitHub advisory GHSA-2655-q453-22f9. Check the vendor's advisory before you rely on it.
How severe is CVE-2012-4520?
Medium (6.4, CVSS 2.0, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2012-4520?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.