# CVE-2020-15234: Redirect URL matching ignores character casing

> An attacker can bypass redirect URL validation by exploiting case-insensitive matching, potentially redirecting users to malicious sites during OAuth2 flows.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 2 Oct 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-grfp-q2mm-hfp6

## What is CVE-2020-15234?

CVE-2020-15234 is a medium-severity vulnerability in ory fosite, published on 2 Oct 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

ORY Fosite is a security first OAuth2 & OpenID Connect framework for Go. In Fosite before version 0.34.1, the OAuth 2.0 Client's registered redirect URLs and the redirect URL provided at the OAuth2 Authorization Endpoint where compared using strings.ToLower while they should have been compared with a simple string match. This allows an attacker to register a client with allowed redirect URL https://example.com/callback. Then perform an OAuth2 flow and requesting redirect URL https://example.com/CALLBACK. Instead of an error (invalid redirect URL), the browser is redirected to https://example.com/CALLBACK with a potentially successful OAuth2 response, depending on the state of the overall OAuth2 flow (the user might still deny the request for example). This vulnerability has been patched in ORY Fosite v0.34.1.

Weakness: CWE-178 (Improper Handling of Case Sensitivity), CWE-601 (URL Redirection to Untrusted Site), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2020-15234?

2 open source packages ship an affected version, including github.com/ory/fosite. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/ory/fosite` | Go | All versions | 0.34.1 |
| `github.com/ory/fosite` | Go | All versions | 0.34.1 |

Products: Ory Fosite.

## How do I fix CVE-2020-15234?

Upgrade github.com/ory/fosite to 0.34.1 or later.

## Is CVE-2020-15234 being exploited?

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

## Other vulnerabilities in ory fosite

- [CVE-2020-15222](https://insights.sbomify.com/CVE-2020-15222/): Replay of private_key_jwt possible in ORY Fosite (high 8.1)
- [CVE-2020-15223](https://insights.sbomify.com/CVE-2020-15223/): Ignored storage errors on token revokation in ORY Fosite (high 8.0)
- [CVE-2020-15233](https://insights.sbomify.com/CVE-2020-15233/): OAuth2 Redirect URL validity does not respect query parameters and character casing for loopback addresses (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-15234 and fix it if it is affected.

What it is: CVE-2020-15234 is a medium-severity vulnerability in ory fosite, published on 2 Oct 2020. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-15234 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/ory/fosite (Go): affected all versions; fixed in 0.34.1
- github.com/ory/fosite (Go): affected all versions; fixed in 0.34.1

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

## Sources

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

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