Red Hat Bugzilla – Bug 997117
CVE-2013-4249 python-django: XSS in admin interface
Last modified: 2016-03-04 07:08:05 EST
Django 1.5.2 was released to correct the following security flaw:
The Django administrative application, django.contrib.admin, provides functionality for CRUD (Creation, Retrieval, Updating and Deleting) operations by trusted users, including facilities for both automatic and customized data-manipulation interfaces.
When displaying the value of a URLField -- a model field type for storing URLs -- this interface treated the values of such fields as safe, thus failing to properly accommodate the potential for dangerous values. A proof-of-concept application has been provided to the Django project, showing how this can be exploited to perform XSS in the administrative interface.
In a normal Django deployment, this will only affect the administrative interface, as the incorrect handling occurs only in form-widget code in django.contrib.admin. It is, however, possible that other applications may be affected, if those applications make use of form widgets provided by the admin interface.
To remedy this issue, the widget in question -- django.contrib.admin.widgets.AdminURLFieldWidget -- has been corrected to treat its value the same as any other potentially-user-supplied value; in other words, it will be treated as unsafe, and subject to Django's (enabled by default) output escaping.
The upstream patch is here: https://github.com/django/django/commit/90363e388c61874add3f3557ee654a996ec75d78
Created python-django tracking bugs for this issue:
Affects: fedora-19 [bug 997125]
This was assigned CVE-2013-4249:
python-django-1.5.2-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.