Bug 1097505 (CVE-2014-3730) - CVE-2014-3730 Django: insufficient URL validation could lead to redirects
Summary: CVE-2014-3730 Django: insufficient URL validation could lead to redirects
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2014-3730
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1097935 1097936 1097937
Blocks: 1097509
TreeView+ depends on / blocked
 
Reported: 2014-05-14 03:31 UTC by Murray McAllister
Modified: 2023-05-12 03:30 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-01-14 05:31:54 UTC
Embargoed:


Attachments (Terms of Use)
upstream fix (5.18 KB, patch)
2014-05-14 03:32 UTC, Murray McAllister
no flags Details | Diff
fix for 1.4 versions (5.16 KB, patch)
2014-05-14 03:33 UTC, Murray McAllister
no flags Details | Diff
fix for 1.5 versions (5.19 KB, patch)
2014-05-14 03:34 UTC, Murray McAllister
no flags Details | Diff
fix for 1.6 versions (5.17 KB, patch)
2014-05-14 03:34 UTC, Murray McAllister
no flags Details | Diff

Description Murray McAllister 2014-05-14 03:31:35 UTC
A redirect issue was reported in Django. This could lead to a victim being redirected to an arbitrary site. The original report from upstream:

""
The validation for redirects did not correctly validate some malformed
URLs, which are accepted by some browsers. This allows a user to be
redirected to an unsafe URL unexpectedly.

Django relies on user input in some cases (e.g.
:func:`django.contrib.auth.views.login`, ``django.contrib.comments``,
and :doc:`i18n </topics/i18n/index>`) to redirect the user to an "on
success" URL. The security checks for these redirects (namely
``django.util.http.is_safe_url()``) did not correctly validate some
malformed URLs, such as `http:\\\\\\djangoproject.com`, which are
accepted by some browsers with more liberal URL parsing.

To remedy this, the validation in ``is_safe_url()`` has been tightened
to be able to handle and correctly validate these malformed URLs.
""

This issue affects Django versions 1.4, 1.5, 1.6, and 1.7. It has been fixed in versions 1.4.13, 1.5.8, 1.6.5, and 1.7 beta 4.

Acknowledgements:

Red Hat would like to thank the upstream Django project for reporting this issue. Upstream acknowledges Peter Kuma and Gavin Wahl as the original reporters.

Comment 2 Murray McAllister 2014-05-14 03:32:56 UTC
Created attachment 895338 [details]
upstream fix

Comment 3 Murray McAllister 2014-05-14 03:33:31 UTC
Created attachment 895339 [details]
fix for 1.4 versions

Comment 4 Murray McAllister 2014-05-14 03:34:05 UTC
Created attachment 895340 [details]
fix for 1.5 versions

Comment 5 Murray McAllister 2014-05-14 03:34:48 UTC
Created attachment 895342 [details]
fix for 1.6 versions

Comment 6 Vincent Danen 2014-05-14 22:04:48 UTC
External Reference:

https://www.djangoproject.com/weblog/2014/may/14/security-releases-issued/

Comment 7 Vincent Danen 2014-05-14 22:13:18 UTC
Created Django14 tracking bugs for this issue:

Affects: epel-6 [bug 1097937]

Comment 8 Vincent Danen 2014-05-14 22:13:21 UTC
Created python-django14 tracking bugs for this issue:

Affects: fedora-all [bug 1097936]

Comment 9 Vincent Danen 2014-05-14 22:13:24 UTC
Created python-django tracking bugs for this issue:

Affects: fedora-all [bug 1097935]

Comment 10 Vincent Danen 2014-05-15 14:43:11 UTC
This was assigned CVE-2014-3730 via http://seclists.org/oss-sec/2014/q2/316

Comment 11 Fedora Update System 2014-05-24 18:00:58 UTC
Django14-1.4.13-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 12 Fedora Update System 2014-05-26 23:57:10 UTC
python-django14-1.4.13-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-05-26 23:57:31 UTC
python-django-1.5.8-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 14 Fedora Update System 2014-05-26 23:58:10 UTC
python-django15-1.5.8-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 15 Fedora Update System 2014-05-26 23:59:26 UTC
python-django-1.6.5-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.