Django Cross-site scripting (XSS) vulnerability via is_safe_url function
Moderate severity
GitHub Reviewed
Published
May 17, 2022
to the GitHub Advisory Database
•
Updated Sep 3, 2023
Package
Affected versions
>= 1.4.0, < 1.4.6
>= 1.5.0, < 1.5.2
Patched versions
1.4.6
1.5.2
Description
Published by the National Vulnerability Database
Oct 4, 2013
Published to the GitHub Advisory Database
May 17, 2022
Reviewed
Aug 17, 2023
Last updated
Sep 3, 2023
The is_safe_url function in utils/http.py in Django 1.4.x before 1.4.6, 1.5.x before 1.5.2, and 1.6 before beta 2 treats a URL's scheme as safe even if it is not HTTP or HTTPS, which might introduce cross-site scripting (XSS) or other vulnerabilities into Django applications that use this function, as demonstrated by "the login view in django.contrib.auth.views" and the javascript: scheme.
References