CVE-2016-2512
Django XSS Vulnerability
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.4
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
CVE-2016-2512- CVSS 3.0
- 7.4 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List No score
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
CVE-2016-2512- Updated
- 2026-11-02
EUVDEUVD-2016-0004 No score
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
EUVD-2016-0004- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-pw27-w7w4-9qc7
6.3
Django XSS Vulnerability
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com\@attacker.com.
- Record
GHSA-pw27-w7w4-9qc7- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:H/SA:N - CVSS 3.0
- 7.4 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
7.4
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
CVE-2016-2512- CVSS 3.0
- 7.4 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-2512
7.4
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
DEBIAN-CVE-2016-2512- CVSS 3.0
- 7.4 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N - Updated
- 2026-11-02
Show 9 moreShow less
OSVGHSA-pw27-w7w4-9qc7
6.3
Django XSS Vulnerability
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com\@attacker.com.
- Record
GHSA-pw27-w7w4-9qc7- CVSS 4.0
- 6.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:H/SA:N - CVSS 3.0
- 7.4 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-2512
7.4
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
UBUNTU-CVE-2016-2512- CVSS 3.0
- 7.4 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N - Updated
- 2026-11-02
OSVMGASA-2016-0096 No score
Updated python-django packages fix security vulnerability
Mark Striemer discovered that Django incorrectly handled user-supplied redirect URLs containing basic authentication credentials. A remote attacker could possibly use this issue to perform a cross-site scripting attack or a malicious redirect. (CVE-2016-2512)
Sjoerd Job Postmus discovered that Django incorrectly handled timing when doing password hashing operations. A remote attacker could possibly use this issue to perform user enumeration. (CVE-2016-2513)
- Record
MGASA-2016-0096- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10361-1 No score
python3-Django-1.10.4-1.1 on GA media
These are all security issues fixed in the python3-Django-1.10.4-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10361-1- Updated
- 2026-11-02
OSVPYSEC-2016-15 No score
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication, as demonstrated by http://mysite.example.com@attacker.com.
- Record
PYSEC-2016-15- Updated
- 2026-11-02
OSVSUSE-SU-2018:1102-1 No score
Security update for python-Django
This update for python-Django fixes the following issues:
Security issues fixed:
- CVE-2018-7537: Fixed catastrophic backtracking in django.utils.text.Truncator. (bsc#1083305)
- CVE-2018-7536: Fixed catastrophic backtracking in urlize and urlizetrunc template filters. (bsc#1083304)
- CVE-2017-12794: Fixed XSS possibility in traceback section of technical 500 debug page (bsc#1056284)
- CVE-2017-7234: Open redirect vulnerability in django.views.static.serve() (bsc#1031451)
- CVE-2017-7233: Open redirect and possible XSS attack via user-supplied numeric redirect URLs (bsc#1031450)
- CVE-2016-9014: DNS rebinding vulnerability when DEBUG=True (bsc#1008047)
- CVE-2016-9013: User with hardcoded password created when running tests on Oracle (bsc#1008050)
- CVE-2016-7401: CSRF protection bypass on a site with Google Analytics (bsc#1001374)
- CVE-2016-2512: Vulnerability in the function tils.http.is_safe_url could allow remote users to arbitrary web site and conduct phishing attacks. (bsc#bnc#967999)
- Record
SUSE-SU-2018:1102-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:1828-1 No score
Security update for python-Django
This update for python-Django fixes the following security issues:
- CVE-2016-2512: The utils.http.is_safe_url function allowed remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication (bsc#967999).
- CVE-2018-7536: The django.utils.html.urlize() function was extremely slow to evaluate certain inputs due to catastrophic backtracking vulnerabilities (bsc#1083304)
- CVE-2018-7537: If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression (bsc#1083305)
- Record
SUSE-SU-2018:1828-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:1830-1 No score
Security update for python-Django
This update for python-Django fixes the following security issues:
- CVE-2016-2512: The utils.http.is_safe_url function allowed remote attackers to redirect users to arbitrary web sites and conduct phishing attacks or possibly conduct cross-site scripting (XSS) attacks via a URL containing basic authentication (bsc#967999).
- CVE-2018-7536: The django.utils.html.urlize() function was extremely slow to evaluate certain inputs due to catastrophic backtracking vulnerabilities (bsc#1083304).
- CVE-2018-7537: If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression (bsc#1083305).
- Record
SUSE-SU-2018:1830-1- Updated
- 2026-11-02
OSVUSN-2915-1 No score
python-django vulnerabilities
Mark Striemer discovered that Django incorrectly handled user-supplied redirect URLs containing basic authentication credentials. A remote attacker could possibly use this issue to perform a cross-site scripting attack or a malicious redirect. (CVE-2016-2512)
Sjoerd Job Postmus discovered that Django incorrectly handled timing when doing password hashing operations. A remote attacker could possibly use this issue to perform user enumeration. (CVE-2016-2513)
- Record
USN-2915-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
djangoPyPI |
before 1.8.10 | 1.8.10 |
djangoPyPI |
1.9a1 up to 1.9.3 | 1.9.3 |
python-djangoDebian:12 |
before 1.9.4-1 | 1.9.4-1 |
python-djangoDebian:13 |
before 1.9.4-1 | 1.9.4-1 |
python-djangoDebian:14 |
before 1.9.4-1 | 1.9.4-1 |
python-djangoDebian:7 |
before 1.4.5-1+deb7u16, plus listed versions 1.4.5-11.4.5-1+deb7u11.4.5-1+deb7u101.4.5-1+deb7u111.4.5-1+deb7u11~bpo60+1 Show 17 moreShow less1.4.5-1+deb7u121.4.5-1+deb7u131.4.5-1+deb7u13~bpo60+11.4.5-1+deb7u141.4.5-1+deb7u14~bpo60+11.4.5-1+deb7u151.4.5-1+deb7u21.4.5-1+deb7u31.4.5-1+deb7u41.4.5-1+deb7u4~bpo60+11.4.5-1+deb7u51.4.5-1+deb7u61.4.5-1+deb7u71.4.5-1+deb7u7~bpo60+11.4.5-1+deb7u81.4.5-1+deb7u8~bpo60+11.4.5-1+deb7u9 |
1.4.5-1+deb7u16 |
python-djangoDebian:8 |
before 1.7.7-1+deb8u4, plus listed versions 1.7.7-11.7.7-1+deb8u11.7.7-1+deb8u21.7.7-1+deb8u3 |
1.7.7-1+deb8u4 |
djangoPyPI |
before 1.8.10, plus listed versions 1.0.11.0.21.0.31.0.41.1 Show 45 moreShow less1.1.11.1.21.1.31.1.41.21.2.11.2.21.2.31.2.41.2.51.2.61.2.71.31.3.11.3.21.3.31.3.41.3.51.3.61.3.71.41.4.11.4.101.4.111.4.121.4.131.4.141.4.151.4.161.4.171.4.181.4.191.4.21.4.201.4.211.4.221.4.31.4.41.4.51.4.61.4.71.4.81.4.91.51.5.1 |
1.8.10 |
djangoPyPI |
1.9a1 up to 1.9.3, plus listed versions 1.91.9.11.9.21.9b11.9rc11.9rc2 |
1.9.3 |
python-djangoMageia:5 |
before 1.8.10-1.mga5 | 1.8.10-1.mga5 |
Show 20 moreShow less
| Package | Affected | Fixed |
|---|---|---|
djangoPyPI |
before 1.8.10, 1.9 up to 1.9.3, plus listed versions 1.0.11.0.21.0.31.0.41.1 Show 45 moreShow less1.1.11.1.21.1.31.1.41.21.2.11.2.21.2.31.2.41.2.51.2.61.2.71.31.3.11.3.21.3.31.3.41.3.51.3.61.3.71.41.4.11.4.101.4.111.4.121.4.131.4.141.4.151.4.161.4.171.4.181.4.191.4.21.4.201.4.211.4.221.4.31.4.41.4.51.4.61.4.71.4.81.4.91.51.5.1 |
1.8.101.9.3 |
python-djangoRed Hat:openstack:5::el6 |
before 0:1.6.11-5.el6ost | 0:1.6.11-5.el6ost |
python-django-bash-completionRed Hat:openstack:5::el6 |
before 0:1.6.11-5.el6ost | 0:1.6.11-5.el6ost |
python-django-docRed Hat:openstack:5::el6 |
before 0:1.6.11-5.el6ost | 0:1.6.11-5.el6ost |
python-djangoRed Hat:openstack-optools:7::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-django-bash-completionRed Hat:openstack-optools:7::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-djangoRed Hat:openstack:7::el7 |
before 0:1.8.11-1.el7ost | 0:1.8.11-1.el7ost |
python-django-bash-completionRed Hat:openstack:7::el7 |
before 0:1.8.11-1.el7ost | 0:1.8.11-1.el7ost |
python-django-docRed Hat:openstack:7::el7 |
before 0:1.8.11-1.el7ost | 0:1.8.11-1.el7ost |
python-djangoRed Hat:openstack:6::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-django-bash-completionRed Hat:openstack:6::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-django-docRed Hat:openstack:6::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-djangoRed Hat:openstack:5::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-django-bash-completionRed Hat:openstack:5::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-django-docRed Hat:openstack:5::el7 |
before 0:1.6.11-5.el7ost | 0:1.6.11-5.el7ost |
python-DjangoSUSE:OpenStack Cloud 6 |
before 1.8.19-3.6.1 | 1.8.19-3.6.1 |
python-DjangoSUSE:Enterprise Storage 4 |
before 1.6.11-5.5.1 | 1.6.11-5.5.1 |
python-DjangoSUSE:Enterprise Storage 5 |
before 1.6.11-6.5.1 | 1.6.11-6.5.1 |
python-djangoUbuntu:14.04:LTS |
before 1.6.1-2ubuntu0.12, plus listed versions 1.5.4-1ubuntu11.6-11.6.1-11.6.1-21.6.1-2ubuntu0.1 Show 9 moreShow less1.6.1-2ubuntu0.21.6.1-2ubuntu0.31.6.1-2ubuntu0.41.6.1-2ubuntu0.51.6.1-2ubuntu0.61.6.1-2ubuntu0.81.6.1-2ubuntu0.91.6.1-2ubuntu0.101.6.1-2ubuntu0.11 |
1.6.1-2ubuntu0.12 |
python-DjangoopenSUSE:Tumbleweed |
before 1.10.4-1.1 | 1.10.4-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-2512 is a high vulnerability (CVSS 7.4) in Djangoproject Django, published March 1, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.05%, the 90th percentile. Fixed in django 1.8.10.
References
rhn.redhat.com/errata/RHSA-2016-0506.html
securitytracker.com/id/1035152
securityfocus.com/bid/83879
rhn.redhat.com/errata/RHSA-2016-0504.html
debian.org/security/2016/dsa-3544
rhn.redhat.com/errata/RHSA-2016-0502.html
Show 62 moreShow less
ubuntu.com/usn/USN-2915-3
oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html
ubuntu.com/usn/USN-2915-2
rhn.redhat.com/errata/RHSA-2016-0505.html
ubuntu.com/usn/USN-2915-1
djangoproject.com/weblog/2016/mar/01/security-releases
github.com/django/django/commit/c5544d289233f501917e25970c03ed444abbd4f0
nvd.nist.gov/vuln/detail/CVE-2016-2512
web.archive.org/web/20210123090815/http://www.securityfocus.com/bid/83879
web.archive.org/web/20210413200202/http://www.securitytracker.com/id/1035152
github.com/django/django/commit/382ab137312961ad62feb8109d70a5a581fe8350
github.com/django/django/commit/fc6d147a63f89795dbcdecb0559256470fff4380
github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2016-15.yaml
github.com/advisories/GHSA-pw27-w7w4-9qc7
security-tracker.debian.org/tracker/CVE-2016-2512
github.com/django/django
advisories.mageia.org/MGASA-2016-0096.html
bugs.mageia.org/show_bug.cgi?id=17860
ubuntu.com/usn/usn-2915-1
access.redhat.com/errata/RHSA-2016:0502
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1311431
bugzilla.redhat.com/show_bug.cgi?id=1311438
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0502.json
access.redhat.com/security/cve/CVE-2016-2512
cve.org/CVERecord?id=CVE-2016-2512
access.redhat.com/security/cve/CVE-2016-2513
cve.org/CVERecord?id=CVE-2016-2513
nvd.nist.gov/vuln/detail/CVE-2016-2513
access.redhat.com/errata/RHSA-2016:0503
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0503.json
access.redhat.com/errata/RHSA-2016:0504
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0504.json
access.redhat.com/errata/RHSA-2016:0505
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0505.json
access.redhat.com/errata/RHSA-2016:0506
security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0506.json
suse.com/support/update/announcement/2018/suse-su-20181102-1
bugzilla.suse.com/1001374
bugzilla.suse.com/1008047
bugzilla.suse.com/1008050
bugzilla.suse.com/1031450
bugzilla.suse.com/1031451
bugzilla.suse.com/1056284
bugzilla.suse.com/1083304
bugzilla.suse.com/1083305
bugzilla.suse.com/967999
suse.com/security/cve/CVE-2016-2512
suse.com/security/cve/CVE-2016-7401
suse.com/security/cve/CVE-2016-9013
suse.com/security/cve/CVE-2016-9014
suse.com/security/cve/CVE-2017-12794
suse.com/security/cve/CVE-2017-7233
suse.com/security/cve/CVE-2017-7234
suse.com/security/cve/CVE-2018-7536
suse.com/security/cve/CVE-2018-7537
suse.com/support/update/announcement/2018/suse-su-20181828-1
suse.com/support/update/announcement/2018/suse-su-20181830-1
ubuntu.com/security/CVE-2016-2512
ubuntu.com/security/notices/USN-2915-1
ubuntu.com/security/CVE-2016-2513
suse.com/security/cve/CVE-2016-2513
Left out here: 102 versions. The JSON record has them.