Miggo Logo

CVE-2024-23647: Authentik vulnerable to PKCE downgrade attack

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.22698%
Published
1/29/2024
Updated
11/18/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
goauthentik.iogo>= 2023.10.0, <= 2023.10.62023.10.7
goauthentik.iogo<= 2023.8.62023.8.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from incomplete PKCE validation in the token handling flow. The __post_init_code function in token.py was missing a critical check to ensure code_verifier in token requests must correspond to a code_challenge from the authorization request. The patch adds this bidirectional validation: 1) Changes error type when code_verifier is missing for existing code_challenge, and 2) Adds new check to reject code_verifier when no code_challenge exists. This matches the described attack vector where removing code_challenge in authorization requests bypassed PKCE protection.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

## Summ*ry PK** is * v*ry import*nt *ount*rm**sur* in O*ut** , *ot* *or pu*li* *n* *on*i**nti*l *li*nts. It prot**ts ***inst *SR* *tt**ks *n* *o** inj**tion *tt**ks. ****us* o* t*is *u*, *n *tt**k*r **n *ir*umv*nt t** prot**tion PK** o***rs. ## P*t

Reasoning

T** vuln*r**ility st*ms *rom in*ompl*t* PK** v*li**tion in t** tok*n **n*lin* *low. T** __post_init_*o** *un*tion in tok*n.py w*s missin* * *riti**l ****k to *nsur* *o**_v*ri*i*r in tok*n r*qu*sts must *orr*spon* to * *o**_***ll*n** *rom t** *ut*oriz