Cross-site scripting in Django - CVE-2016-2512

 

Cross-site scripting in Django - CVE-2016-2512

Published: December 21, 2016 / Updated: May 16, 2018


Vulnerability identifier: #VU1603
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: CVE-2016-2512
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to perform cross-site scripting (XSS) attacks.

The weakness exists in the utils.http.is_safe_url function due to insufficient sanitization of user-supplied data. A remote attacker can trick the victim to follow a specially crafted link and execute arbitrary HTML and script code in user's browser in context of vulnerable website.

Successful exploitation of this vulnerability may allow a remote attacker to steal potentially sensitive information, change appearance of the web page, perform phishing and drive-by-download attacks.


Affected software

Django
Debian Linux
Fedora
Ubuntu
py-django (Alpine package)
python-django (Red Hat package)
python-django
Red Hat OpenStack

How to mitigate CVE-2016-2512

Update to version 1.8.10 or 1.9.3.

py-django (Alpine package) - update to 1.8.10-r0
python-django (Red Hat package) - addressed in versions 1.6.11-5.el6ost, 1.6.11-5.el7ost
python-django - addressed in versions 1.6.11-5.el7, 1.8.10-1.fc22, 1.8.10-1.fc23, 1.8.11-1.fc22, 1.8.11-1.fc23

External References

Related Security Bulletins