# CVE-2018-14574: Django open redirect

> An open redirect vulnerability in Django's CommonMiddleware allows attackers to redirect users to malicious sites, requiring an upgrade to patched versions.

- **Severity:** Medium 6.1 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 3 Aug 2018
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2018-14574, DEBIAN-CVE-2018-14574, DSA-4264-1, GHSA-5hg3-6c2f-f3wr, PYSEC-2018-2, SUSE-SU-2018:3549-1, UBUNTU-CVE-2018-14574, USN-3726-1, openSUSE-SU-2018:2327-1, openSUSE-SU-2018:2809-1

## What is CVE-2018-14574?

CVE-2018-14574 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 3 Aug 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-601 (URL Redirection to Untrusted Site)

## Which versions are affected by CVE-2018-14574?

5 open source packages ship an affected version, including django and Django. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `django` | PyPI | From 1.11 | 1.11.15 |
| `django` | PyPI | From 2.0 | 2.0.8, 1.11.15 |
| `django` | PyPI | From 2.0 | 2.0.8 |
| `Django` | PyPI | From 1.11 | 1.11.15 |
| `Django` | PyPI | From 2.0 | 2.0.8 |
| `python-Django` | SUSE:HPE Helion OpenStack 8 | All versions | 1.11.11-3.3.1 |
| `python-Django` | SUSE:OpenStack Cloud 8 | All versions | 1.11.11-3.3.1 |
| `python-Django` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 1.11.11-3.3.1 |
| `python-Django` | SUSE:Package Hub 12 | All versions | 1.11.15-11.1 |
| `python-Django1` | SUSE:Package Hub 15 | All versions | 1.11.15-bp150.3.3.1 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Djangoproject Django.

## How do I fix CVE-2018-14574?

Upgrade django to a fixed version for your release line: 1.11.15 or 2.0.8.

## Is CVE-2018-14574 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-14574 exists.

Public exploit code:

- Django - Open Redirect (nuclei): http/cves/2018/CVE-2018-14574.yaml

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-14574 and fix it if it is affected.

What it is: CVE-2018-14574 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 3 Aug 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-14574 exists.

Affected packages and fixed versions:
- django (PyPI): affected from 1.11; fixed in 1.11.15
- django (PyPI): affected from 2.0; fixed in 2.0.8, 1.11.15
- django (PyPI): affected from 2.0; fixed in 2.0.8
- Django (PyPI): affected from 1.11; fixed in 1.11.15
- Django (PyPI): affected from 2.0; fixed in 2.0.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-14574/ (Markdown: https://insights.sbomify.com/CVE-2018-14574/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-14574
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-14574
- OSV: https://osv.dev/vulnerability/CVE-2018-14574

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-14574/
Summaries are generated and may contain mistakes; the official description above is the record.
