# CVE-2022-4589: cyface Terms and Conditions Module views.py returnTo redirect

> Attackers can redirect users to malicious sites via the returnTo parameter in the cyface Terms and Conditions Module.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 17 Dec 2022
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-6rmf-cv6p-4h27, PYSEC-2026-805

## What is CVE-2022-4589?

CVE-2022-4589 is a medium-severity vulnerability in cyface Terms and Conditions Module, published on 17 Dec 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

A vulnerability has been found in cyface Terms and Conditions Module up to 2.0.9 and classified as problematic. Affected by this vulnerability is the function returnTo of the file termsandconditions/views.py. The manipulation leads to open redirect. The attack can be launched remotely. Upgrading to version 2.0.10 is able to address this issue. The name of the patch is 03396a1c2e0af95e12a45c5faef7e47a4b513e1a. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216175.

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

## Which versions are affected by CVE-2022-4589?

3 open source packages ship an affected version, including django-termsandconditions. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `django-termsandconditions` | PyPI | All versions | 2.0.11 |
| `django-termsandconditions` | PyPI | All versions | 2.0.11 |
| `django-termsandconditions` | PyPI | All versions | 2.0.11 |

Products: Django Terms and Conditions Project Django Terms and Conditions.

## How do I fix CVE-2022-4589?

Upgrade django-termsandconditions to 2.0.11 or later.

## Is CVE-2022-4589 being exploited?

There is no known exploitation of CVE-2022-4589 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-4589 and fix it if it is affected.

What it is: CVE-2022-4589 is a medium-severity vulnerability in cyface Terms and Conditions Module, published on 17 Dec 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-4589 in the wild and no public exploit code.

Affected packages and fixed versions:
- django-termsandconditions (PyPI): affected all versions; fixed in 2.0.11
- django-termsandconditions (PyPI): affected all versions; fixed in 2.0.11
- django-termsandconditions (PyPI): affected all versions; fixed in 2.0.11

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-2022-4589/ (Markdown: https://insights.sbomify.com/CVE-2022-4589/index.md)
```

## Sources

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

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