Miggo Logo

GHSA-qvp4-rpmr-xwrr: Possible bypass of token claim validation when OAuth2 Introspection caching is enabled

7.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
6/23/2021
Updated
1/9/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/ory/oathkeepergo>= 0.38.0-beta.2, <= 0.38.11-beta.10.38.12-beta.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from cached OAuth2 tokens being reused without revalidating scopes. The key functions are:

  1. tokenFromCache: Originally returned cached tokens based only on expiration time
  2. Authenticate: Main authentication flow that used the vulnerable cache check Patch changes show added scope strategy checks in both functions and cache management logic. The pre-patch versions of these functions would appear in profilers when handling cached token validation without proper scope checks.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t W**n you m*k* * r*qu*st to *n *n*point t**t r*quir*s t** s*op* `*oo` usin* *n ****ss tok*n *r*nt** wit* t**t `*oo` s*op*, introsp**tion will ** v*li* *n* t**t tok*n will ** ******. T** pro*l*m *om*s w**n * s**on* r*qu*sts to *n *n*point t

Reasoning

T** vuln*r**ility st*ms *rom ****** O*ut** tok*ns **in* r*us** wit*out r*v*li**tin* s*op*s. T** k*y *un*tions *r*: *. tok*n*rom*****: Ori*in*lly r*turn** ****** tok*ns **s** only on *xpir*tion tim* *. *ut**nti**t*: M*in *ut**nti**tion *low t**t us**