# CVE-2021-3639: Open redirect in mod auth mellon

> Attackers can exploit unsanitized logout URLs to redirect users to malicious sites, facilitating phishing attacks against users of the mod_auth_mellon module.

- **Severity:** Medium 6.1 (`CVSS:3.1/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:** 22 Aug 2022
- **Updated:** 3 Aug 2024
- **Also known as:** ALSA-2022:1934, AZL-10651, AZL-36962, DEBIAN-CVE-2021-3639, GHSA-mhcv-7w89-jjj5, RHSA-2022:1934, RLSA-2022:1934, SUSE-SU-2021:2912-1, SUSE-SU-2022:1524-1, UBUNTU-CVE-2021-3639, USN-5069-1, openSUSE-SU-2024:13848-1

## What is CVE-2021-3639?

CVE-2021-3639 is a medium-severity vulnerability in mod_auth_mellon, published on 22 Aug 2022. 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

A flaw was found in mod_auth_mellon where it does not sanitize logout URLs properly. This issue could be used by an attacker to facilitate phishing attacks by tricking users into visiting a trusted web application URL that redirects to an external and potentially malicious server. The highest threat from this liability is to confidentiality and integrity.

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

## Which versions are affected by CVE-2021-3639?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mod_auth_mellon` | AlmaLinux:8 | All versions | 0.14.0-12.el8.1 |
| `mod_auth_mellon-diagnostics` | AlmaLinux:8 | All versions | 0.14.0-12.el8.1 |
| `mod_auth_mellon` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14.0-12.el8.1 |
| `mod_auth_mellon-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14.0-12.el8.1 |
| `mod_auth_mellon-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14.0-12.el8.1 |
| `mod_auth_mellon-diagnostics` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14.0-12.el8.1 |
| `mod_auth_mellon-diagnostics-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.14.0-12.el8.1 |
| `mod_auth_mellon` | Rocky Linux:8 | All versions | 0:0.14.0-12.el8.1 |
| `apache2-mod_auth_mellon` | SUSE:Enterprise Storage 7 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Module for Server Applications 15 SP3 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Real Time 15 SP2 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 0.16.0-8.6.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Server 15 SP2-BCL | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 0.16.0-8.6.1 |
| `apache2-mod_auth_mellon` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Manager Proxy 4.1 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Manager Retail Branch Server 4.1 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | SUSE:Manager Server 4.1 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | openSUSE:Leap 15.3 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | openSUSE:Leap 15.4 | All versions | 0.17.0-150200.5.7.1 |
| `apache2-mod_auth_mellon` | openSUSE:Tumbleweed | All versions | 0.19.0-1.1 |

Products: Uninett Mod Auth Mellon.

## How do I fix CVE-2021-3639?

Apply the vendor's patch.

## Is CVE-2021-3639 being exploited?

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

## Other vulnerabilities in mod_auth_mellon

- [CVE-2017-6807](https://insights.sbomify.com/CVE-2017-6807/): Auth bypass in n/a (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-3639 and fix it if it is affected.

What it is: CVE-2021-3639 is a medium-severity vulnerability in mod_auth_mellon, published on 22 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-3639 in the wild and no public exploit code.

Affected product: mod_auth_mellon. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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