CVE-2021-32701
Possible bypass of token claim validation when OAuth2 Introspection caching is enabled
Also known as GHSA-qvp4-rpmr-xwrr, GHSA-vfvf-6gx5-mqv6, GO-2022-0406, GO-2022-0920
Mitigation
- Upgrade github.com/ory/oathkeeper to 0.38.12-beta.1 or later.
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
Vulnerability facts
- Affected
- github.com/ory/oathkeeper >= 0.38.0-beta.2, < 0.38.12-beta.1
- Fixed in
- 0.38.12-beta.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 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
- EPSS
- 1.63% chance of exploitation in 30 days (percentile 77, 2026-11-26)
- CWE
- CWE-863
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/ory/oathkeeper | >= 0.38.0-beta.2, < 0.38.12-beta.1 | 0.38.12-beta.1 | osv |
| ory oathkeeper | >=v0.38.0-beta.2, < v0.38.12-beta.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
Vendor advisories
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.