# CVE-2020-15223: Ignored storage errors on token revokation in ORY Fosite

> Attackers may retain valid tokens after revocation attempts if storage errors occur, bypassing security controls in ORY Fosite.

- **Severity:** High 8.0 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/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:** 24 Sep 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-7mqr-2v3q-v2wm, GO-2021-0109

## What is CVE-2020-15223?

CVE-2020-15223 is a high-severity vulnerability in ory fosite, published on 24 Sep 2020. 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

In ORY Fosite (the security first OAuth2 & OpenID Connect framework for Go) before version 0.34.0, the `TokenRevocationHandler` ignores errors coming from the storage. This can lead to unexpected 200 status codes indicating successful revocation while the token is still valid. Whether an attacker can use this for her advantage depends on the ability to trigger errors in the store. This is fixed in version 0.34.0

Weakness: CWE-754 (Improper Check for Unusual or Exceptional Conditions), CWE-755 (Improper Handling of Exceptional Conditions)

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

3 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.0 |
| `github.com/ory/fosite` | Go | All versions | 0.34.0 |
| `github.com/ory/fosite` | Go | All versions | 0.34.0 |

Products: Ory Fosite.

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

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

## Is CVE-2020-15223 being exploited?

There is no known exploitation of CVE-2020-15223 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-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)
- [CVE-2020-15234](https://insights.sbomify.com/CVE-2020-15234/): Redirect URL matching ignores character casing (medium 6.1)

## Fix prompt for AI coding agents

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

What it is: CVE-2020-15223 is a high-severity vulnerability in ory fosite, published on 24 Sep 2020. 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-2020-15223 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.0
- github.com/ory/fosite (Go): affected all versions; fixed in 0.34.0
- github.com/ory/fosite (Go): affected all versions; fixed in 0.34.0

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

## Sources

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

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