Skip to content

Django Open redirect and possible XSS attack via user-supplied numeric redirect URLs

Moderate severity GitHub Reviewed Published Jan 4, 2019 to the GitHub Advisory Database • Updated Mar 7, 2024

Package

pip django (pip)

Affected versions

>= 1.10, < 1.10.7
>= 1.9, < 1.9.13
>= 1.8, < 1.8.18

Patched versions

1.10.7
1.9.13
1.8.18

Description

Django 1.10 before 1.10.7, 1.9 before 1.9.13, and 1.8 before 1.8.18 relies on user input in some cases to redirect the user to an "on success" URL. The security check for these redirects (namely django.utils.http.is_safe_url()) considered some numeric URLs "safe" when they shouldn't be, aka an open redirect vulnerability. Also, if a developer relies on is_safe_url() to provide safe redirect targets and puts such a URL into a link, they could suffer from an XSS attack.

References

Published to the GitHub Advisory Database Jan 4, 2019
Reviewed Jun 16, 2020
Last updated Mar 7, 2024

Severity

Moderate
6.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weaknesses

CVE ID

CVE-2017-7233

GHSA ID

GHSA-37hp-765x-j95x

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.