Executive brief
Clerk's @clerk/nextjs authentication library contains a logic flaw in its auth() and getAuth() methods that allows attackers to bypass access controls and gain unauthorized access to other users' data. Applications using affected versions (4.7.0–4.29.2) for Next.js backend authentication are vulnerable to privilege escalation and account takeover if attackers can manipulate authentication tokens or user identifiers.
Technical details
The vulnerability is an insecure direct object reference (IDOR) flaw in the @clerk/nextjs SDK versions 4.7.0 through 4.29.2, affecting the auth() method in the Next.js App Router and getAuth() in the Pages Router. The root cause is a logic flaw in the authentication and authorization validation that fails to properly verify user identity when processing API requests, allowing attackers to access resources belonging to other users by manipulating request parameters. The attack requires network access to affected API endpoints but does not require user interaction or prior authentication. An attacker can gain unauthorized access to sensitive data, perform actions on behalf of other users, or escalate privileges. The fix is available in @clerk/nextjs version 4.29.3 and later; applications must upgrade immediately.
Affected products
- Clerk @clerk/nextjs >=4.7.0, <4.29.3
Timeline
- 2024-01-12: disclosed