Skip to content
OpenAdvisories
Medium · 6.1 CVE-2015-0220 EUVD-2015-0014GHSA-gv98-g628-m9x5PYSEC-2015-5

Django Cross-site Scripting Vulnerability

Published Jan 16, 2015 · Updated Aug 6, 2024 · Assigned by redhat

Description

The django.util.http.is_safe_url function in Django before 1.4.18, 1.6.x before 1.6.10, and 1.7.x before 1.7.3 does not properly handle leading whitespaces, which allows remote attackers to conduct cross-site scripting (XSS) attacks via a crafted URL, related to redirect URLs, as demonstrated by a "\njavascript:" URL.

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.7.1-1.1 —
Debian 13 python-django 1.7.1-1.1 —
Debian 12 python-django 1.7.1-1.1 —
Debian 7 python-django 1.4.5-1+deb7u9 DSA-3151-1
Debian 6.0 python-django 1.2.3-3+squeeze12 DLA-143-1
ReleasePackageFixed inAdvisory
Ubuntu 14.04 LTS python-django 1.6.1-2ubuntu0.6 USN-2469-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django < 1.4.18 1.4.18 GHSA-gv98-g628-m9x5
PyPI django >= 1.6, < 1.6.10 1.6.10 GHSA-gv98-g628-m9x5
PyPI django >= 1.7, < 1.7.3 1.7.3 GHSA-gv98-g628-m9x5
PyPI django < 1.4.18 · >= 1.5, < 1.6.10 · >= 1.7, < 1.7.3 1.4.18, 1.6.10, 1.7.3 PYSEC-2015-5

Advisories 3

References