Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1202818 - (CVE-2015-2317) CVE-2015-2317 Django: possible XSS attack via user-supplied redirect URLs
CVE-2015-2317 Django: possible XSS attack via user-supplied redirect URLs
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20150318,reported=2...
: Security
Depends On: 1203616 1203617 1203618 1203619
Blocks: 1202821
  Show dependency treegraph
 
Reported: 2015-03-17 09:44 EDT by Martin Prpič
Modified: 2018-06-29 18:04 EDT (History)
18 users (show)

See Also:
Fixed In Version: Django 1.8rc1, Django 1.7.7, Django 1.6.11, Django 1.4.20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
is-safe-url-1.4.diff (3.63 KB, text/plain)
2015-03-17 09:49 EDT, Martin Prpič
no flags Details
is-safe-url-1.6.diff (5.30 KB, text/plain)
2015-03-17 09:49 EDT, Martin Prpič
no flags Details
is-safe-url-1.7.diff (6.66 KB, text/plain)
2015-03-17 09:49 EDT, Martin Prpič
no flags Details
is-safe-url-1.8.diff (6.65 KB, text/plain)
2015-03-17 09:49 EDT, Martin Prpič
no flags Details
is-safe-url-master.diff (6.65 KB, text/plain)
2015-03-17 09:49 EDT, Martin Prpič
no flags Details

  None (edit)
Description Martin Prpič 2015-03-17 09:44:48 EDT
The following flaw was found in Django:

Django relies on user input in some cases (e.g. django.contrib.auth.views.login and i18n) to redirect the user to an "on success" URL. The security checks for these redirects (namely django.utils.http.is_safe_url()) accepted URLs with leading control characters and so considered URLs like \x08javascript:... safe. This issue doesn't affect Django currently, since we only put this URL into the Location response header and browsers seem to ignore JavaScript there. Browsers we tested also treat URLs prefixed with control characters such as %08//example.com as relative paths so redirection to an unsafe target isn't a problem either.

However, if a developer relies on is_safe_url() to provide safe redirect targets and puts such a URL into a link, they could suffer from an XSS attack as some browsers such as Google Chrome ignore control characters at the start of a URL in an anchor href.

This issue affects Django versions 1.8.x, 1.7.x, 1.6.x, and 1.4.x. This issue is fixed in versions 1.8 release candidate 1 (or beta 3), 1.7.7, 1.6.11, and 1.4.20.

Acknowledgements:

Red Hat would like to thank the upstream Django project for reporting this issue.
Comment 1 Martin Prpič 2015-03-17 09:49:10 EDT
Created attachment 1002809 [details]
is-safe-url-1.4.diff
Comment 2 Martin Prpič 2015-03-17 09:49:13 EDT
Created attachment 1002810 [details]
is-safe-url-1.6.diff
Comment 3 Martin Prpič 2015-03-17 09:49:16 EDT
Created attachment 1002811 [details]
is-safe-url-1.7.diff
Comment 4 Martin Prpič 2015-03-17 09:49:18 EDT
Created attachment 1002812 [details]
is-safe-url-1.8.diff
Comment 5 Martin Prpič 2015-03-17 09:49:21 EDT
Created attachment 1002813 [details]
is-safe-url-master.diff
Comment 6 Martin Prpič 2015-03-19 05:34:47 EDT
External References:

https://www.djangoproject.com/weblog/2015/mar/18/security-releases/
Comment 7 Martin Prpič 2015-03-19 05:37:41 EDT
Created Django14 tracking bugs for this issue:

Affects: epel-6 [bug 1203619]
Comment 8 Martin Prpič 2015-03-19 05:37:44 EDT
Created python-django14 tracking bugs for this issue:

Affects: fedora-20 [bug 1203617]
Comment 9 Martin Prpič 2015-03-19 05:37:47 EDT
Created python-django tracking bugs for this issue:

Affects: fedora-all [bug 1203616]
Affects: epel-7 [bug 1203618]
Comment 10 Fedora Update System 2015-04-09 12:58:50 EDT
python-django-1.6.11-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2015-04-09 12:59:27 EDT
Django14-1.4.20-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 2015-06-18 09:24:50 EDT
python-django14-1.4.20-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.