CVE-2018-14574: Open Redirect in Django

django Updated 02 Oct 2025

Summary

03/08/2018
Yes i
Moderate
6.1

CVE-2018-14574: django.middleware.common.CommonMiddleware in Django 1.11.x before 1.11.15 and 2.0.x before 2.0.8 has an Open Redirect. Affects django across 2 version ranges.

>= 1.11, < 1.11.15 >= 2.0, < 2.0.8

Fixed in 1.11.15 or 2.0.8, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2018-14574 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Django is a popular Python web framework used for building web applications. It provides a set of tools and libraries for handling common web development tasks. The CommonMiddleware module in Django versions 1.11.x before 1.11.15 and 2.0.x before 2.0.8 is vulnerable to an Open Redirect attack.

Vulnerability Detail

The vulnerability in Django's CommonMiddleware module allows an attacker to redirect users to malicious websites by manipulating the URL. This can lead to phishing attacks or the disclosure of sensitive information. The issue originates from improper validation of user-supplied input in the middleware, allowing an attacker to craft a specially crafted URL that redirects the user to a different domain.

How To Fix

Latest published version: 6.1.2 as of 22 Oct 2026

pip install --upgrade "django==6.1.2"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.11, < 1.11.15 1.11.15
    pip install --upgrade "django==1.11.15"
  • >= 2.0, < 2.0.8 2.0.8
    pip install --upgrade "django==2.0.8"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading Django is not immediately possible, a temporary workaround is to manually validate and sanitize user-supplied input in the affected middleware. This can be done by implementing custom URL validation logic or using a trusted URL validation library.

Conclusion

The Open Redirect vulnerability in Django's CommonMiddleware module can be mitigated by upgrading to the fixed versions or implementing custom URL validation logic. It is important to promptly address this vulnerability to prevent potential attacks. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for django →

Share this vulnerability

FAQ

An Open Redirect vulnerability allows an attacker to redirect users to a different website, potentially leading to phishing attacks or the disclosure of sensitive information.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

There are no known public exploits for this vulnerability at the time of writing. However, it is important to patch your Django installation to prevent potential attacks.

While upgrading Django to the fixed versions is the recommended solution, you can implement custom URL validation logic in the affected middleware as a temporary mitigation. However, upgrading is strongly advised to ensure comprehensive security.

Related vulnerabilities

Recent vulnerabilities recorded for django.

How To Fix

Latest published version: 6.1.2 as of 22 Oct 2026

pip install --upgrade "django==6.1.2"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.11, < 1.11.15 1.11.15
    pip install --upgrade "django==1.11.15"
  • >= 2.0, < 2.0.8 2.0.8
    pip install --upgrade "django==2.0.8"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback