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 1202809 - (CVE-2015-2316) CVE-2015-2316 Django: possible denial of service in strip_tags()
CVE-2015-2316 Django: possible denial of service in strip_tags()
Status: NEW
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=20150318,repor...
: Security
Depends On: 1203614 1203615
Blocks: 1202821
  Show dependency treegraph
 
Reported: 2015-03-17 09:30 EDT by Martin Prpič
Modified: 2018-01-30 18:48 EST (History)
15 users (show)

See Also:
Fixed In Version: Django 1.8rc1, Django 1.7.7, Django 1.6.11
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-master.diff (4.14 KB, text/plain)
2015-03-17 09:33 EDT, Martin Prpič
no flags Details
strip-tags-1.8.diff (4.14 KB, text/plain)
2015-03-17 09:33 EDT, Martin Prpič
no flags Details
strip-tags-1.7.diff (4.14 KB, text/plain)
2015-03-17 09:34 EDT, Martin Prpič
no flags Details
strip-tags-1.6.diff (2.84 KB, text/plain)
2015-03-17 09:35 EDT, Martin Prpič
no flags Details
strip-tags-master.diff (4.14 KB, text/plain)
2015-03-17 09:35 EDT, Martin Prpič
no flags Details

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

In a previous release, django.utils.html.strip_tags was changed to work iteratively. The problem is that the size of the input it is processing can increase on each iteration which results in an infinite loop in strip_tags(). This issue only affects versions of Python that haven't received a bugfix in HTMLParser (http://bugs.python.org/issue20288); namely Python < 2.7.7 and 3.3.5. Some operating system vendors have also backported the fix for the Python bug into their packages of earlier versions.

To remedy this issue, strip_tags() will now return the original input if it detects the length of the string it is processing increases. Remember that absolutely NO guarantee is provided about the results of strip_tags() being HTML safe. So NEVER mark safe the result of a strip_tags() call without escaping it first, for example with django.utils.html.escape.

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

Acknowledgements:

Red Hat would like to thank the upstream Django project for reporting this issue.
Comment 1 Martin Prpič 2015-03-17 09:33:12 EDT
Created attachment 1002792 [details]
is-safe-url-master.diff
Comment 2 Martin Prpič 2015-03-17 09:33:56 EDT
Created attachment 1002793 [details]
strip-tags-1.8.diff
Comment 3 Martin Prpič 2015-03-17 09:34:21 EDT
Created attachment 1002794 [details]
strip-tags-1.7.diff
Comment 4 Martin Prpič 2015-03-17 09:35:04 EDT
Created attachment 1002795 [details]
strip-tags-1.6.diff
Comment 5 Martin Prpič 2015-03-17 09:35:34 EDT
Created attachment 1002796 [details]
strip-tags-master.diff
Comment 6 Martin Prpič 2015-03-19 05:33:36 EDT
External References:

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

Affects: fedora-all [bug 1203614]
Affects: epel-7 [bug 1203615]
Comment 8 Fedora Update System 2015-04-09 12:58:47 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.

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