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 1179675 - (CVE-2015-0220) CVE-2015-0220 Django: Mitigated possible XSS attack via user-supplied redirect URLs
CVE-2015-0220 Django: Mitigated possible XSS attack via user-supplied redirec...
Status: CLOSED CURRENTRELEASE
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20150113,repor...
: Security
Depends On: 1181943 1181944 1181945 1181954
Blocks: 1179508
  Show dependency treegraph
 
Reported: 2015-01-07 05:19 EST by Martin Prpič
Modified: 2016-06-14 06:38 EDT (History)
22 users (show)

See Also:
Fixed In Version: Django 1.7.3, Django 1.6.10, Django 1.4.18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-14 06:38:36 EDT
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.x.patch (3.27 KB, text/plain)
2015-01-07 05:20 EST, Martin Prpič
no flags Details
is_safe_url-1.6.x.patch (3.86 KB, text/plain)
2015-01-07 05:20 EST, Martin Prpič
no flags Details
is_safe_url-1.7.x.patch (5.06 KB, text/plain)
2015-01-07 05:20 EST, Martin Prpič
no flags Details
is_safe_url-master.patch (5.05 KB, text/plain)
2015-01-07 05:20 EST, Martin Prpič
no flags Details

  None (edit)
Description Martin Prpič 2015-01-07 05:19:35 EST
The Django project reports the following issue:

"""
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.util.http.is_safe_url()``) didn't strip leading whitespace on the tested URL and as such considered URLs like ``\njavascript:...`` safe. If a developer relied on ``is_safe_url()`` to provide safe redirect targets and put such a URL into a link, they could suffer from a XSS attack. This bug doesn't affect Django currently, since we only put this URL into the ``Location`` response header and browsers seem to ignore JavaScript there.
"""

This issue is resolved in the upstream versions 1.7.3, 1.6.10, and 1.4.18. Note that Django 1.5 is no longer receiving security updates.

Acknowledgements:

Red Hat would like to thank the upstream Django project for reporting this issue.
Comment 1 Martin Prpič 2015-01-07 05:20:34 EST
Created attachment 977186 [details]
is_safe_url-1.4.x.patch
Comment 2 Martin Prpič 2015-01-07 05:20:37 EST
Created attachment 977187 [details]
is_safe_url-1.6.x.patch
Comment 3 Martin Prpič 2015-01-07 05:20:39 EST
Created attachment 977188 [details]
is_safe_url-1.7.x.patch
Comment 4 Martin Prpič 2015-01-07 05:20:42 EST
Created attachment 977189 [details]
is_safe_url-master.patch
Comment 5 Martin Prpič 2015-01-14 02:31:20 EST
Created python-django tracking bugs for this issue:

Affects: fedora-all [bug 1181943]
Affects: epel-7 [bug 1181945]
Comment 6 Martin Prpič 2015-01-14 02:32:20 EST
Created python-django14 tracking bugs for this issue:

Affects: fedora-20 [bug 1181944]
Comment 7 Martin Prpič 2015-01-14 02:33:09 EST
Created Django14 tracking bugs for this issue:

Affects: epel-6 [bug 1181954]
Comment 8 Martin Prpič 2015-01-14 02:33:32 EST
External References:

https://www.djangoproject.com/weblog/2015/jan/13/security/
Comment 9 Fedora Update System 2015-01-25 21:32:33 EST
python-django-1.6.10-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2015-01-26 22:00:18 EST
python-django14-1.4.18-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 11 Fedora Update System 2015-02-05 14:01:45 EST
python-django-1.6.10-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 12 Matthias Runge 2016-06-14 06:38:36 EDT
all related bzs have been closed already.

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