CVE-2015-0220 Django Cross-site Scripting Vulnerability
Remote attackers can execute cross-site scripting attacks via crafted URLs due to improper whitespace handling in Django's redirect validation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2015-0220?
CVE-2015-0220 is a medium-severity cross-site scripting vulnerability in Canonical Ubuntu Linux, published on 16 Jan 2015. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2015-0220?
7 open source packages ship an affected version, including django and Django. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
django PyPI | All versions | 1.4.18, 1.6.10, 1.7.3 |
django PyPI | All versions | 1.4.18 |
django PyPI | From 1.6 | 1.6.10 |
django PyPI | From 1.7 | 1.7.3 |
Django PyPI | All versions | 1.4.18 |
Django PyPI | From 1.6 | 1.6.10 |
1 more packages
Django PyPI | From 1.7 | 1.7.3 |
Products include Canonical Ubuntu Linux, Djangoproject Django.
How do I fix CVE-2015-0220?
Upgrade django to a fixed version for your release line: 1.4.18, 1.6.10 or 1.7.3.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2015-0220 being exploited?
There is no known exploitation of CVE-2015-0220 in the wild and no public exploit code.
Other vulnerabilities in Canonical Ubuntu Linux
Sources
Also known as DEBIAN-CVE-2015-0220, GHSA-gv98-g628-m9x5, PYSEC-2015-5, UBUNTU-CVE-2015-0220.