# CVE-2021-32701: Possible bypass of token claim validation when OAuth2 Introspection caching is enabled

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.63% (percentile 77, 2026-11-26)
- **CWE:** CWE-863
- **Aliases:** GHSA-qvp4-rpmr-xwrr, GHSA-vfvf-6gx5-mqv6, GO-2022-0406, GO-2022-0920
- **Published:** 2021-06-22T19:45:12.000Z
- **Modified:** 2026-09-10T03:49:26.937Z

## Who should check

- Projects that depend on Go package github.com/ory/oathkeeper (\>= 0.38.0-beta.2, \< 0.38.12-beta.1)
- Anyone running ory oathkeeper \>=v0.38.0-beta.2, \< v0.38.12-beta.1

## Description

ORY Oathkeeper is an Identity & Access Proxy (IAP) and Access Control Decision API that authorizes HTTP requests based on sets of Access Rules. When you make a request to an endpoint that requires the scope \`foo\` using an access token granted with that \`foo\` scope, introspection will be valid and that token will be cached. The problem comes when a second requests to an endpoint that requires the scope \`bar\` is made before the cache has expired. Whether the token is granted or not to the \`bar\` scope, introspection will be valid. A patch will be released with \`v0.38.12-beta.1\`. Per default, caching is disabled for the \`oauth2\_introspection\` authenticator. When caching is disabled, this vulnerability does not exist. The cache is checked in \[\`func (a \*AuthenticatorOAuth2Introspection) Authenticate(...)\`\](https://github.com/ory/oathkeeper/blob/6a31df1c3779425e05db1c2a381166b087cb29a4/pipeline/authn/authenticator\_oauth2\_introspection.go\#L152). From \[\`tokenFromCache()\`\](https://github.com/ory/oathkeeper/blob/6a31df1c3779425e05db1c2a381166b087cb29a4/pipeline/authn/authenticator\_oauth2\_introspection.go\#L97) it seems that it only validates the token expiration date, but ignores whether the token has or not the proper scopes. The vulnerability was introduced in PR \#424. During review, we failed to require appropriate test coverage by the submitter which is the primary reason that the vulnerability passed the review process.

## Affected and fixed versions

- Go `github.com/ory/oathkeeper`: affected \>= 0.38.0-beta.2, \< 0.38.12-beta.1; fixed 0.38.12-beta.1 (osv)
- ory oathkeeper: \>=v0.38.0-beta.2, \< v0.38.12-beta.1 (cvelist)

## Mitigation

- Upgrade github.com/ory/oathkeeper to 0.38.12-beta.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-32701. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-32701.md
Affected: github.com/ory/oathkeeper >= 0.38.0-beta.2, < 0.38.12-beta.1
Fixed in: 0.38.12-beta.1

Steps:
1. Search this machine and project for github.com/ory/oathkeeper (Go), ory oathkeeper: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-32701 being exploited?

There is no confirmed exploitation: CVE-2021-32701 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.63% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-32701?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

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

github.com/ory/oathkeeper \>= 0.38.0-beta.2, \< 0.38.12-beta.1.

### Is there a fix for CVE-2021-32701?

Yes. Fixed in 0.38.12-beta.1. Upgrade github.com/ory/oathkeeper to 0.38.12-beta.1 or later.

### How do I check if I'm affected by CVE-2021-32701?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/ory/oathkeeper/security/advisories/GHSA-qvp4-rpmr-xwrr>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-32701>
- patch: <https://github.com/ory/oathkeeper/pull/424>
- patch: <https://github.com/ory/oathkeeper/commit/1f9f625c1a49e134ae2299ee95b8cf158feec932>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-32701>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-qvp4-rpmr-xwrr> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-vfvf-6gx5-mqv6> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-32701> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-32701>
