CVE-2024-23647: Authentik vulnerable to PKCE downgrade attack
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.22698%
CWE
Published
1/29/2024
Updated
11/18/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| goauthentik.io | go | >= 2023.10.0, <= 2023.10.6 | 2023.10.7 |
| goauthentik.io | go | <= 2023.8.6 | 2023.8.7 |
Vulnerability Intelligence
Miggo AI
Root 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.