Bug 1129950 (CVE-2014-0480) - CVE-2014-0480 Django: reverse() can generate URLs pointing to other hosts, leading to phishing attacks
Summary: CVE-2014-0480 Django: reverse() can generate URLs pointing to other hosts, le...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2014-0480
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20140820,repor...
Depends On: 1132773 1132774 1132775 1132776 1132777 1132778
Blocks: 1129960
TreeView+ depends on / blocked
 
Reported: 2014-08-14 04:36 UTC by Murray McAllister
Modified: 2019-06-08 20:09 UTC (History)
21 users (show)

Fixed In Version: django 1.4.14, django 1.5.9, django 1.6.6,django 1.7-rc3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-04 07:13:18 UTC


Attachments (Terms of Use)
1.4 patch (3.17 KB, patch)
2014-08-14 04:39 UTC, Murray McAllister
no flags Details | Diff
1.5 patch (4.20 KB, patch)
2014-08-14 04:39 UTC, Murray McAllister
no flags Details | Diff
1.6 patch (5.29 KB, patch)
2014-08-14 04:40 UTC, Murray McAllister
no flags Details | Diff

Description Murray McAllister 2014-08-14 04:36:18 UTC
The Django project reports the following issue:

""
Django includes the helper function
``django.core.urlresolvers.reverse``, typically used to generate a URL
from a reference to a view function or URL pattern name. However, when
presented with input beginning with two forward-slash characters
(``//``), ``reverse()`` could generate scheme-relative URLs to other
hosts, allowing an attacker who is aware of unsafe use of
``reverse()`` (i.e., in a situation where an end user can control the
target of a redirect, to take a common example) to generate links to
sites of their choice, enabling phishing and other attacks.

To remedy this, URL reversing now ensures that no URL starts with two
slashes (``//``), replacing the second slash with its URL encoded
counterpart (``%2F``). This approach ensures that semantics stay the
same, while making the URL relative to the domain and not to the
scheme.
""

This issue is due to be resolved in the upstream 1.4.14, 1.5.9, 1.6.6, and 1.7 release candidate 3 releases.

Acknowledgements:

Red Hat would like to thank the upstream Django project for reporting this issue. Upstream acknowledges Florian Apolloner as the original reporter.

Comment 2 Murray McAllister 2014-08-14 04:39:17 UTC
Created attachment 926622 [details]
1.4 patch

Comment 3 Murray McAllister 2014-08-14 04:39:53 UTC
Created attachment 926623 [details]
1.5 patch

Comment 4 Murray McAllister 2014-08-14 04:40:31 UTC
Created attachment 926625 [details]
1.6 patch

Comment 5 Murray McAllister 2014-08-22 03:42:19 UTC
External References:

https://www.djangoproject.com/weblog/2014/aug/20/security/

Comment 6 Murray McAllister 2014-08-22 03:50:42 UTC
Created Django14 tracking bugs for this issue:

Affects: epel-6 [bug 1132776]

Comment 7 Murray McAllister 2014-08-22 03:50:48 UTC
Created python-django15 tracking bugs for this issue:

Affects: fedora-20 [bug 1132775]
Affects: epel-6 [bug 1132777]
Affects: epel-7 [bug 1132778]

Comment 8 Murray McAllister 2014-08-22 03:50:52 UTC
Created python-django14 tracking bugs for this issue:

Affects: fedora-all [bug 1132774]

Comment 9 Murray McAllister 2014-08-22 03:50:56 UTC
Created python-django tracking bugs for this issue:

Affects: fedora-all [bug 1132773]

Comment 10 Fedora Update System 2014-09-09 22:18:55 UTC
python-django-1.5.9-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-09-09 22:27:07 UTC
python-django-1.6.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-09-09 22:27:28 UTC
python-django14-1.4.14-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2014-09-10 13:29:40 UTC
python-django15-1.5.9-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2014-09-24 03:45:55 UTC
Django14-1.4.14-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2014-12-01 18:58:35 UTC
python-django14-1.4.16-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2014-12-01 18:59:39 UTC
python-django14-1.4.16-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.