# CVE-2017-7233: Django open redirect and XSS via numeric redirect URLs

Source: https://junglewise.ai/threats/cve-2017-7233-django-open-redirect-and-xss-via-numeric-redirect-urls  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-04-04. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2017-7233 · Severity: low · CVSS 3 · Published 2017-04-04

Django is a popular web framework used to build dynamic websites and applications. The framework includes a security function to prevent attackers from redirecting users to malicious sites, but a flaw in this function failed to block certain numeric URLs, allowing attackers to redirect users to external sites or inject malicious scripts. This could lead to phishing attacks, credential theft, or defacement of web pages.

Technologies: [Django (PyPI)](https://junglewise.ai/threats/technologies/django). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2017-7233 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-7233 being exploited in the wild.

**How severe is CVE-2017-7233?** Low severity, with a CVSS score of 3, published 4 April 2017.

**Which products and versions are affected?** Django (PyPI) ECOSYSTEM:introduced=1.10,fixed=1.10.7,introduced=1.9,fixed=1.9.13,introduced=1.8,fixed=1.8.18, ECOSYSTEM:introduced=1.10a1,fixed=1.10.7.

**Is there a fix for CVE-2017-7233?** Yes. Django (PyPI): upgrade to 1.10.7, 1.8.18 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2017-7233 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2017-7233?** Check whether you run Django (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Django (PyPI): upgrade to 1.10.7, 1.8.18 or later

  ```sh
  pip install "Django>=1.10.7"
  ```


## Technical details

The vulnerability exists in Django's is_safe_url() validation function, which is used to check whether redirect URLs are safe before sending users to them. The function incorrectly classified certain numeric URLs as safe, violating the CWE-601 (Open Redirect) vulnerability class. An attacker can craft a numeric redirect URL to bypass the validation, enabling open redirect attacks. Additionally, if developers embed these URLs directly in HTML links without additional sanitization, reflected XSS is possible. No authentication is required; the attack leverages user interaction (clicking a malicious link). Patches were released in Django 1.8.18, 1.9.13, and 1.10.7.

## Affected products

- Django Django 1.8 before 1.8.18, 1.9 before 1.9.13, 1.10 before 1.10.7

## Identifiers

- CVE-2017-7233
- GHSA-37hp-765x-j95x
- PYSEC-2017-9

## Timeline

- 2017-04-04: disclosed
- 2017-04-04: patched

## References

- [https://github.com/django/django/commit/254326cb3682389f55f886804d2c43f7b9f23e4f](https://github.com/django/django/commit/254326cb3682389f55f886804d2c43f7b9f23e4f)

## Related threats

- [Django GeoDjango unbounded recursion denial of service](https://junglewise.ai/threats/cve-2026-15830-django-geodjango-unbounded-recursion-denial-of-service)
- [Django GeoDjango spatial lookups file write and request forgery](https://junglewise.ai/threats/cve-2026-15307-django-geodjango-spatial-lookups-file-write-and-request-forgery)
- [PYSEC-2026-2449 - Django has a Race Condition vulnerability](https://junglewise.ai/threats/cve-2026-25674-django-has-a-race-condition-vulnerability)
- [PYSEC-2026-1296 - Django vulnerable to partial directory traversal via archives](https://junglewise.ai/threats/cve-2025-59682-django-vulnerable-to-partial-directory-traversal-via-archives)
- [Django DomainNameValidator header injection via newline characters](https://junglewise.ai/threats/cve-2026-53878-django-domainnamevalidator-header-injection-via-newline)
