Miggo Logo

CVE-2019-14832: Keycloak Unauthenticated Access

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.58851%
Published
5/24/2022
Updated
8/1/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.keycloak:keycloak-model-infinispanmaven< 7.0.17.0.1
org.keycloak:keycloak-model-jpamaven< 7.0.17.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from missing realm validation in two critical user retrieval paths: 1) The cache implementation (UserCacheSession) didn't check if the cached user's realm matched the request context. 2) The JPA provider (JpaUserProvider) didn't include realm ID in its database query constraints. The commit 0b73685 added realm checks in both locations, confirming these were the vulnerable points. The accompanying test (UserTest.testAccessUserFromOtherRealm) demonstrates the exploit scenario prevented by these fixes.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

* *l*w w*s *oun* in t** K*y*lo*k R*ST *PI ***or* v*rsion *.*.*, impl*m*nt** in K*y*lo*k ***or* *.*.* w**r* it woul* p*rmit us*r ****ss *rom * r**lm t** us*r w*s not *on*i*ur**. *n *ut**nti**t** *tt**k*r wit* knowl**** o* * us*r i* *oul* us* t*is *l*w

Reasoning

T** vuln*r**ility st*mm** *rom missin* r**lm v*li**tion in two *riti**l us*r r*tri*v*l p*t*s: *) T** ***** impl*m*nt*tion (`Us*r*****S*ssion`) *i*n't ****k i* t** ****** us*r's r**lm m*t**** t** r*qu*st *ont*xt. *) T** JP* provi**r (`Jp*Us*rProvi**r`