Clerk: Authorization bypass when combining organization, billing, or reverification checks
clerk javascript · @clerk shared · @clerk backend · @clerk nextjs
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @clerk/shared npm |
|
|
| @clerk/backend npm |
|
clerk javascript · @clerk shared · @clerk backend · @clerk nextjs
| Product | Affected | Fixed in |
|---|---|---|
| @clerk/shared npm |
|
|
| @clerk/backend npm |
|
2.33.33.2.14| @clerk/nextjs npm |
|
|
| @clerk/clerk-js npm |
|
|
| @clerk/clerk-react npm |
|
|
| @clerk/react npm |
|
|
| @clerk/vue npm |
|
|
| @clerk/astro npm |
|
|
| @clerk/nuxt npm |
|
|
| @clerk/clerk-expo npm |
|
|
| @clerk/expo npm |
|
|
| @clerk/react-router npm |
|
|
| @clerk/tanstack-react-start npm |
|
|
| @clerk/chrome-extension npm |
|
|
| @clerk/fastify npm |
|
|
| @clerk/express npm |
|
|
| @clerk/hono npm |
|
|
Clerk JavaScript is the official JavaScript repository for Clerk authentication. has(), auth.protect(), and related authorization predicates in @clerk/shared, @clerk/nextjs, @clerk/backend, and other framework SDKs can return true for certain combined authorization checks when the result should be false, allowing a gated action to proceed for a user who does not satisfy the full set of requested conditions. This call shape can be bypassed if certain conditions are met: a has() or auth.protect() call that combines a reverification check with any of role, permission, feature, or plan, or that combines a billing check (feature or plan) with a role or permission check. This vulnerability is fixed in @clerk/clerk-js 5.125.10 and 6.7.5.
From the CVE record · GitHub_M
Clerk’s has(), auth.protect(), and related predicates can incorrectly return true for combined authorization checks. A user who does not meet all required conditions may be allowed to perform a gated action when a reverification check is combined with a role, permission, feature, or plan check, or when a billing check is combined with a role or permission check. The input does not specify whether exploitation requires authentication or user interaction.
Engineers using affected npm versions of @clerk/shared (3.x before 3.47.5; 4.x before 4.8.3), @clerk/backend (2.x before 2.33.3; 3.x before 3.2.14), @clerk/nextjs (6.x before 6.39.3; 7.x before 7.2.4), @clerk/clerk-js (5.22.0–5.125.9; 6.x before 6.7.5), @clerk/clerk-react (5.9.0–5.61.5), @clerk/react (6.x before 6.4.3), @clerk/vue (1.x before 1.17.21; 2.x before 2.0.16), @clerk/astro (2.x before 2.17.11; 3.x before 3.0.18), @clerk/nuxt (1.x before 1.13.29; 2.x before 2.2.5), @clerk/clerk-expo (2.2.11–2.19.35), @clerk/expo (3.x before 3.2.2), or @clerk/react-router (0.0.1–2.4.12; 3.x before 3.1.4) should check their dependencies.