Clerk accepted OIDC ID tokens as session tokens: am I affected?
Clerk published an advisory on November 12, 2026 for @clerk/backend: authenticateRequest() and verifyToken() could accept an OIDC ID token as a session token. A third-party OAuth client a user approved could send that user's ID token to another application on the same Clerk instance and be signed in as that user. Only instances that issue ID tokens are affected. Clerk rates it medium (CVSS 3.1 5.4) and the advisory's prose names the fixes as @clerk/backend 3.28.0 and 2.33.9. The advisory's version data lists no patched version. There is no CVE id, and the advisory was not in the GitHub Advisory Database global feed when this page was written.
What was reported
Am I affected: your app verifies Clerk session tokens with @clerk/backend, directly or through a framework SDK such as @clerk/nextjs, @clerk/express or @clerk/hono, and your Clerk instance issues ID tokens. That means it has an OAuth application allowed the openid scope, dynamic client registration enabled, or Client ID Metadata Document (CIMD) clients enabled. Instances with none of these are not affected, Clerk says.
Do now: upgrade @clerk/backend to 3.28.0 or later (Core 3) or 2.33.9 or later (Core 2), then check the installed version with npm why @clerk/backend.
What Clerk says
In GHSA-wpqf-h9rq-rg73, published November 12, 2026, Clerk says authenticateRequest() and verifyToken() in @clerk/backend could accept an OIDC ID token as a session token. Clerk issues ID tokens to OAuth clients granted the openid scope and signs them with the same instance key as session tokens. A third-party OAuth client that a user approved could send that user's ID token to any other application on the same Clerk instance and be authenticated as that user, with access beyond the scopes the user granted.
Clerk rates it medium, CVSS 3.1 5.4 (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N). The advisory has no CVE id. It was not in the GitHub Advisory Database global feed when this page was written.
The advisory's version data lists @clerk/backend >= 3.0.0, <= 3.27.0, >= 1.0.0, <= 2.33.8, and < 1.0.0 as affected, and it names no patched version. The prose names the fixes as 3.28.0 on Core 3 and 2.33.9 on Core 2 (1.x and 2.x). Both of those versions are published on npm. The prose also describes 0.x, which is the < 1.0.0 range, as affected.
Limits on what an attacker gets
Clerk says an ID token carries the user's identity (sub, sid, and org_id when the organization scope was granted) but no organization role, organization permissions or factor verification age. Checks that need any of those still fail for a replayed ID token: has() and auth.protect() with role, permission or reverification return false. The attacker is limited to what the application allows a signed-in user with no organization role, and only for users who approved the attacker's OAuth client.
Clerk's server-side change, and why you still need the update
On November 7, 2026, Clerk started tagging every ID token with its own token category. ID tokens live 24 hours, so every ID token issued before the change has expired. What that covers depends on your version, per the advisory:
@clerk/backend3.17.0 and later:authenticateRequest()rejects these ID tokens with no upgrade.- 3.16.9 to 3.16.11: rejected on the default session path, but not when
acceptsTokenis'any'or an array. - Every version before 3.16.9, including all 2.x, 1.x and 0.x releases, does not check the category and still accepts ID tokens.
- Code that calls
verifyToken()directly is not covered on any released version.
Clerk says all of these need the patched release.
What to do
Clerk's advice:
- Core 3 (
@clerk/backend3.x): upgrade to 3.28.0 or later. - Core 2 (
@clerk/backend1.x and 2.x): upgrade to 2.33.9 or later. - Current framework SDK releases pull
@clerk/backendthrough a caret range, so updating the lockfile entry is enough, for examplenpm update @clerk/backend. - Older Core 2 framework releases pin an exact 1.x
@clerk/backend, sonpm update @clerk/backenddoes nothing for them:@clerk/nextjsbefore 5.7.7,@clerk/remixbefore 4.4.0,@clerk/astrobefore 1.6.0 and@clerk/fastifybefore 2.1.0. Upgrade the framework package to its latest Core 2 release. - Core 1 (
@clerk/backend0.x) will not get a patch. Move to Core 2 or Core 3.
If you can't upgrade right away, Clerk gives two workarounds. On @clerk/backend 3.11.1 or later, set authorizedParties in authenticateRequest() or clerkMiddleware(): ID tokens carry no azp claim, and these versions reject a token without azp once authorizedParties is set. That does not work on 2.x, 1.x or 3.0.0 to 3.11.0. On 1.x, 2.x and 3.x you can instead decode the token header with decodeJwt from @clerk/backend/jwt and reject any token whose cat is cl_B7d4PD444AAA, the category Clerk stamps on ID tokens, treating a decode error as a rejection too.
Our advice: if you never meant to run an OAuth provider, check your Clerk dashboard for OAuth applications, dynamic client registration and CIMD settings you don't use and turn them off.
How to prevent it
If your Clerk instance has an OAuth app with the openid scope, dynamic client registration or CIMD clients turned on, update @clerk/backend to 3.28.0 or later (Core 3) or 2.33.9 or later (Core 2) and confirm the installed version with npm why @clerk/backend. If you cannot upgrade immediately and are on 3.11.1 or later, set authorizedParties in authenticateRequest() or clerkMiddleware() as a workaround so a token with no azp claim is rejected. That check does not work on 2.x, 1.x, or 3.0.0 to 3.11.0.
Sources
Related
The weekly fix
The weekly fix: 3 real security mistakes in vibe-coded apps and how to fix them, every Tuesday.