CVE-2015-0220 Django Cross-site Scripting Vulnerability

Medium 4.3 Published Updated

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.

PackageAffectedFixed in
django PyPIAll versions1.4.18, 1.6.10, 1.7.3
django PyPIAll versions1.4.18
django PyPIFrom 1.61.6.10
django PyPIFrom 1.71.7.3
Django PyPIAll versions1.4.18
Django PyPIFrom 1.61.6.10
1 more packages
Django PyPIFrom 1.71.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.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2015-0220, GHSA-gv98-g628-m9x5, PYSEC-2015-5, UBUNTU-CVE-2015-0220.

Is CVE-2015-0220 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free