7.5
HIGH
CVE-2021-32701
ORY Oathkeeper OAuth2 Introspection Cache Scope Bypass Vulnerability
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.

INFO

Published Date :

June 22, 2021, 8:15 p.m.

Last Modified :

June 30, 2021, 1:10 a.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2021-32701 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Ory oathkeeper
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-32701.

URL Resource
https://github.com/ory/oathkeeper/commit/1f9f625c1a49e134ae2299ee95b8cf158feec932 Patch Third Party Advisory
https://github.com/ory/oathkeeper/pull/424 Patch Third Party Advisory
https://github.com/ory/oathkeeper/security/advisories/GHSA-qvp4-rpmr-xwrr Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-32701 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-32701 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Jun. 30, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:P/I:N/A:N)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    Changed Reference Type https://github.com/ory/oathkeeper/commit/1f9f625c1a49e134ae2299ee95b8cf158feec932 No Types Assigned https://github.com/ory/oathkeeper/commit/1f9f625c1a49e134ae2299ee95b8cf158feec932 Patch, Third Party Advisory
    Changed Reference Type https://github.com/ory/oathkeeper/pull/424 No Types Assigned https://github.com/ory/oathkeeper/pull/424 Patch, Third Party Advisory
    Changed Reference Type https://github.com/ory/oathkeeper/security/advisories/GHSA-qvp4-rpmr-xwrr No Types Assigned https://github.com/ory/oathkeeper/security/advisories/GHSA-qvp4-rpmr-xwrr Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:ory:oathkeeper:0.38.0:beta2:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.1:beta2:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.2:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.3:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.4:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.5:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.6:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.7:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.8:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.9:beta1:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.10:beta2:*:*:*:*:*:* *cpe:2.3:a:ory:oathkeeper:0.38.11:beta1:*:*:*:*:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-32701 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-32701 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.13 }} 0.01%

score

0.46967

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability