GHSA-9cwg-mhxf-hh59

Suggest an improvement
Source
https://github.com/advisories/GHSA-9cwg-mhxf-hh59
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-9cwg-mhxf-hh59/GHSA-9cwg-mhxf-hh59.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-9cwg-mhxf-hh59
Aliases
Published
2022-05-17T00:23:23Z
Modified
2024-09-18T16:25:00.204847Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
  • 5.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
Django cross-site scripting (XSS) vulnerability via is_safe_url function
Details

The issafeurl 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.

Database specific
{
    "nvd_published_at": "2013-10-04T17:55:00Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2023-08-17T23:09:26Z"
}
References

Affected packages

PyPI / django

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.4
Fixed
1.4.6

Affected versions

1.*

1.4
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5

Ecosystem specific

{
    "affected_functions": [
        "django.utils.http.is_safe_url"
    ]
}

PyPI / django

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.5
Fixed
1.5.2

Affected versions

1.*

1.5
1.5.1

Ecosystem specific

{
    "affected_functions": [
        "django.utils.http.is_safe_url"
    ]
}