Miggo Logo

CVE-2021-32701:
Incorrect Authorization in ORY Oathkeeper

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.53478%
Published
6/24/2021
Updated
2/1/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 introspection results being reused without re-validating scopes. The tokenFromCache function (lines 97-110 in original code) only checked expiration time, not scope validity. The Authenticate method (line 152+) used this cache without proper scope re-validation when processing subsequent requests. The patch added scope strategy checks in both cache retrieval (tokenFromCache) and cache storage (tokenToCache), confirming these were the vulnerable points.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

ORY O*t*k**p*r is *n I**ntity & ****ss Proxy (I*P) *n* ****ss *ontrol ***ision *PI t**t *ut*oriz*s *TTP r*qu*sts **s** on s*ts o* ****ss Rul*s. 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*

Reasoning

T** vuln*r**ility st*ms *rom ****** O*ut** introsp**tion r*sults **in* r*us** wit*out r*-v*li**tin* s*op*s. T** `tok*n*rom*****` *un*tion (lin*s **-*** in ori*in*l *o**) only ****k** *xpir*tion tim*, not s*op* v*li*ity. T** `*ut**nti**t*` m*t*o* (lin