@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 new4 internal
Security
2 advisories affect 6.39.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
Release note
Minor Changes
Added support for JWT token format when creating and verifying machine-to-machine (M2M) tokens. This enables fully networkless verification when using the public JWT key.
Creating a JWT-format M2M token
const clerkClient = createClerkClient({ machineSecretKey: process.env.CLERK_MACHINE_SECRET_KEY, }); const m2mToken = await clerkClient.m2m.createToken({ tokenFormat: 'jwt', }); console.log('M2M token created:', m2mToken.token);Verifying a token
const clerkClient = createClerkClient({ machineSecretKey: process.env.CLERK_MACHINE_SECRET_KEY, }); const authHeader = req.headers.get('Authorization'); const token = authHeader.slice(7); const verified = await clerkClient.m2m.verify(token); console.log('Verified M2M token:', verified);Networkless verification
const clerkClient = createClerkClient({ jwtKey: process.env.CLERK_JWT_KEY, }); const authHeader = req.headers.get('Authorization'); const token = authHeader.slice(7); const verified = await clerkClient.m2m.verify(token); console.log('Verified M2M token:', verified);
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.