CVE-2020-13596 XSS in Django

Medium 6.1 Published Updated

Attackers can execute arbitrary scripts in the Django admin interface via unencoded query parameters in ForeignKeyRawIdWidget.

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-2020-13596?

CVE-2020-13596 is a medium-severity cross-site scripting vulnerability in Canonical Ubuntu Linux, published on 3 Jun 2020. 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

An issue was discovered in Django 2.2 before 2.2.13 and 3.0 before 3.0.7. Query parameters generated by the Django admin ForeignKeyRawIdWidget were not properly URL encoded, leading to a possibility of an XSS attack.

Weakness: CWE-79

Which versions are affected by CVE-2020-13596?

6 open source packages ship an affected version, including django and Django. It affects 7 products.

PackageAffectedFixed in
django BitnamiFrom 2.2.02.2.13, 3.0.7
django PyPIFrom 2.22.2.13, 3.0.7
django PyPIFrom 2.2a12.2.13
django PyPIFrom 3.0a13.0.7
Django PyPIFrom 2.2a12.2.13
Django PyPIFrom 3.0a13.0.7
Linux distribution packages (1)
python-Django SUSE:Enterprise Storage 5All versions1.6.11-6.13.1

Products include Canonical Ubuntu Linux, Debian Debian Linux, Djangoproject Django, Fedoraproject Fedora, Netapp Sra Plugin, Netapp Steelstore Cloud Integrated Storage and 1 more.

How do I fix CVE-2020-13596?

Upgrade django to a fixed version for your release line: 2.2.13 or 3.0.7.

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-2020-13596 being exploited?

There is no known exploitation of CVE-2020-13596 in the wild and no public exploit code.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as BIT-django-2020-13596, DEBIAN-CVE-2020-13596, GHSA-2m34-jcjv-45xf, PYSEC-2020-32, SUSE-SU-2020:2055-1, UBUNTU-CVE-2020-13596.

Is CVE-2020-13596 in your software?

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

Check your SBOMs for free