---
title: "CVE-2012-4520\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2012-4520?format=md
keywords: index, follow
---

# CVE-2012-4520

Publication date 30 October 2012

Last updated 26 May 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

Toggle side navigation

## 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.

[Read the notes from the security team](https://ubuntu.com/security/CVE-2012-4520?format=md#notes)

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| python-django | 12.10 quantal | Fixed 1.4.1-2ubuntu0.1 |
| 12.04 LTS precise | Fixed 1.3.1-4ubuntu1.3 |
| 11.10 oneiric | Fixed 1.3-2ubuntu1.4 |
| 10.04 LTS lucid | Fixed 1.1.1-2ubuntu1.6 |
| 8.04 LTS hardy | Ignored end of life |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2012-4520?format=md#patch-details)

## Notes

---

### [jdstrand](https://launchpad.net/~jdstrand)

fix introduced LP: #1080204

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| python-django | * Upstream:   [92d3430](https://github.com/django/django/commit/92d3430f12171f16f566c9050c40feefb830a4a3) * Upstream:   [b45c377](https://github.com/django/django/commit/b45c377f8f488955e0c7069cad3f3dd21910b071) * Debdiff:   <https://bugs.launchpad.net/ubuntu/+source/python-django/+bug/1068486> |

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4520)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2012-4520)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2012-4520)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2012-4520)

### Related Ubuntu Security Notices (USN)

+ [USN-1757-1](https://usn.ubuntu.com/USN-1757-1)
+ Django vulnerabilities
+ 7 March 2013

+ [USN-1632-1](https://usn.ubuntu.com/USN-1632-1)
+ Django vulnerability
+ 15 November 2012

### Other references

* <http://www.openwall.com/lists/oss-security/2012/10/30/4>
* <http://www.openwall.com/lists/oss-security/2012/10/29/17>
* <https://www.djangoproject.com/weblog/2012/oct/17/security/>
* <https://www.cve.org/CVERecord?id=CVE-2012-4520>
