| 1 |
========================== |
| 2 |
Django 1.3.4 release notes |
| 3 |
========================== |
| 4 |
|
| 5 |
*October 17, 2012* |
| 6 |
|
| 7 |
This is the fourth release in the Django 1.3 series. |
| 8 |
|
| 9 |
Host header poisoning |
| 10 |
===================== |
| 11 |
|
| 12 |
Some parts of Django -- independent of end-user-written applications -- make |
| 13 |
use of full URLs, including domain name, which are generated from the HTTP Host |
| 14 |
header. Some attacks against this are beyond Django's ability to control, and |
| 15 |
require the web server to be properly configured; Django's documentation has |
| 16 |
for some time contained notes advising users on such configuration. |
| 17 |
|
| 18 |
Django's own built-in parsing of the Host header is, however, still vulnerable, |
| 19 |
as was reported to us recently. The Host header parsing in Django 1.3.3 and |
| 20 |
Django 1.4.1 -- specifically, ``django.http.HttpRequest.get_host()`` -- was |
| 21 |
incorrectly handling username/password information in the header. Thus, for |
| 22 |
example, the following Host header would be accepted by Django when running on |
| 23 |
``validsite.com``: |
| 24 |
|
| 25 |
.. code-block:: text |
| 26 |
|
| 27 |
Host: validsite.com:[email protected] |
| 28 |
|
| 29 |
Using this, an attacker can cause parts of Django -- particularly the |
| 30 |
password-reset mechanism -- to generate and display arbitrary URLs to users. |
| 31 |
|
| 32 |
To remedy this, the parsing in ``HttpRequest.get_host()`` is being modified; |
| 33 |
Host headers which contain potentially dangerous content (such as |
| 34 |
username/password pairs) now raise the exception |
| 35 |
:exc:`django.core.exceptions.SuspiciousOperation`. |
| 36 |
|
| 37 |
Details of this issue were initially posted online as a `security advisory`_. |
| 38 |
|
| 39 |
.. _security advisory: https://www.djangoproject.com/weblog/2012/oct/17/security/ |