CVE-2012-4520: Input Validation

Published Oct 10, 2012
·
Updated

It was reported that Django's built-in parsing of the Host header was incorrectly handling username/password information (in django.http.HttpRequest.gethost()). This could allow a remote attacker to cause parts of Django, in particular the password-reset mechanism, to generate and display arbitrary URLs to end-users.

Acknowledgements:

Red Hat would like to thank the upstream Django project for reporting this vulnerability.

Other sources

The django.http.HttpRequest.gethost 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.

GitHub

The django.http.HttpRequest.gethost 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.

MITRE

Affected Software

13 affected componentsFixes available
redhat/Django<1.3.4
1.3.4
redhat/Django<1.4.2
1.4.2
pip/django>=1.4<1.4.2
1.4.2
pip/django>=1.3<1.3.4
1.3.4
debian/python-django
2:2.2.28-1~deb11u23:3.2.19-1+deb12u13:4.2.16-1
djangoproject Django=1.3
djangoproject Django=1.3-alpha1
djangoproject Django=1.3-beta1
djangoproject Django=1.3.1
djangoproject Django=1.3.2
djangoproject Django=1.3.3
djangoproject Django=1.4
djangoproject Django=1.4.1

Event History

Oct 22, 2012
Data Sourced
via Debian·06:54 AM
SeverityAffected Software
Nov 18, 2012
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
Description
May 17, 2022
Advisory Published
05:10 AM
Sep 18, 2024
Data Sourced
via Debian·07:27 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2012-4520?

CVE-2012-4520 is classified as a medium-severity vulnerability in Django.

2

How can I fix CVE-2012-4520?

To fix CVE-2012-4520, upgrade Django to version 1.4.2 or 1.3.4 or later.

3

Which versions of Django are affected by CVE-2012-4520?

Django versions 1.3 to 1.4.1 and earlier versions of 1.3 are affected by CVE-2012-4520.

4

What type of attack does CVE-2012-4520 enable?

CVE-2012-4520 allows remote attackers to exploit the incorrect handling of the Host header, potentially affecting authentication mechanisms.

5

Are there any specific components of Django vulnerable due to CVE-2012-4520?

Yes, particularly the password-reset mechanism in Django is vulnerable due to CVE-2012-4520.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203