Skip to content
OpenAdvisories
Medium · 6.1 CVE-2013-6044 EUVD-2013-0009GHSA-9cwg-mhxf-hh59PYSEC-2013-21

Django cross-site scripting (XSS) vulnerability via is_safe_url function

Published Oct 4, 2013 · Updated Aug 6, 2024 · Assigned by mitre

Description

The is_safe_url function in utils/http.py in Django 1.4.x before 1.4.6, 1.5.x before 1.5.2, and 1.6 before beta 2 treats a URL's scheme as safe even if it is not HTTP or HTTPS, which might introduce cross-site scripting (XSS) or other vulnerabilities into Django applications that use this function, as demonstrated by "the login view in django.contrib.auth.views" and the javascript: scheme.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-django 1.5.2-1 —
Debian 13 python-django 1.5.2-1 —
Debian 12 python-django 1.5.2-1 —
Debian 7 python-django 1.4.5-1+deb7u1 DSA-2740-1
Debian 6.0 python-django 1.2.3-3+squeeze6 DSA-2740-1
ReleasePackageFixed inAdvisory
Red Hat OpenStack 3 Django14 +1 1.4.8-1.el6ost RHSA-2013:1521

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django >= 1.4, < 1.4.6 1.4.6 GHSA-9cwg-mhxf-hh59
PyPI django >= 1.5, < 1.5.2 1.5.2 GHSA-9cwg-mhxf-hh59
PyPI django >= 1.4, < 1.4.6 · >= 1.5, < 1.5.2 1.4.6, 1.5.2 PYSEC-2013-21

Advisories 2

References