@clerk/nextjs
7.10.2 · 17 Nov 2026MIT4.2M / weekRepositoryHomepagenpmAtom feed
Your version
6.39.9 is the newest release of 6.x.
In short
1 new1 fixed4 internal
Security
3 advisories affect 6.15.0; 6.39.3 fixes them
- CriticalOfficial Clerk JavaScript SDKs: Middleware-based route protection bypassGHSA-vqx2-fgx2-5wq9 · 16 Apr 2026Fixed in 6.39.2
- HighClerk has an authorization bypass when combining organization, billing, or reverification checksGHSA-w24r-5266-9c3c · 30 Apr 2026Fixed in 6.39.3
- High@clerk/backend Performs Insufficient Verification of Data AuthenticityGHSA-9mp4-77wg-rwx9 · 9 Jul 2025Fixed in 6.23.3
Release note
Minor Changes
Add support for feature or plan based authorization
await auth()
Plan
- `(await auth()).has({ plan: "my-plan" })`Feature
- `(await auth()).has({ feature: "my-feature" })`Scoped per user or per org
- `(await auth()).has({ feature: "org:my-feature" })`
- `(await auth()).has({ feature: "user:my-feature" })`
- `(await auth()).has({ plan: "user:my-plan" })`
- `(await auth()).has({ plan: "org:my-plan" })`auth.protect()
Plan
- `auth.protect({ plan: "my-plan" })`Feature
- `auth.protect({ feature: "my-feature" })`Scoped per user or per org
- `auth.protect({ feature: "org:my-feature" })`
- `auth.protect({ feature: "user:my-feature" })`
- `auth.protect({ plan: "user:my-plan" })`
- `auth.protect({ plan: "org:my-plan" })`Plan
- `<Protect plan="my-plan" />`
Feature
- `<Protect feature="my-feature" />`
Scoped per user or per org
- `<Protect feature="org:my-feature" />` - `<Protect feature="user:my-feature" />` - `<Protect plan="org:my-plan" />` - `<Protect plan="user:my-plan" />`
useAuth()
Plan
- `useAuth().has({ plan: "my-plan" })`Feature
- `useAuth().has({ feature: "my-feature" })`Scoped per user or per org
- `useAuth().has({ feature: "org:my-feature" })`
- `useAuth().has({ feature: "user:my-feature" })`
- `useAuth().has({ plan: "user:my-plan" })`
- `useAuth().has({ plan: "org:my-plan" })`Patch Changes
Improve JSDoc comments
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.