chore(deps): update dependency @clerk/nextjs to v6.39.3 [security]#1434
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency @clerk/nextjs to v6.39.3 [security]#1434renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
fd8501e to
4e3a927
Compare
4e3a927 to
06a8371
Compare
06a8371 to
b379050
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
6.36.5→6.39.3Official Clerk JavaScript SDKs: Middleware-based route protection bypass
CVE-2026-41248 / GHSA-vqx2-fgx2-5wq9
More information
Details
Summary
createRouteMatcherin@clerk/nextjs,@clerk/nuxt, and@clerk/astrocan be bypassed by certain crafted requests, allowing them to skip middleware gating and reach downstream handlers.Sessions are not compromised and no existing user can be impersonated - the bypass only affects the middleware-level gating decision.
Who is affected
All apps using
createRouteMatchershould upgrade to the patched versions. Patches are drop-in with no API changes. The information below describes the scope of the bypass and helps you understand whether you are potentially affected, but is not a reason to delay the upgrade.Apps relying only on middleware gating via
createRouteMatcherare affected, because a crafted request can skip middleware checks and reach downstream handlers (API routes, server components, etc.). This middleware pattern permits the bypass:That said, the bypass is limited to the middleware-level route-matching gate.
clerkMiddlewarestill authenticates the request andauth()reflects the real authentication state of the caller. Auth checks performed inside your route handlers, server components, or server actions continue to work correctly and are not affected. Whether your app is affected in practice depends on whether you have those downstream checks.External APIs that authenticate each request with a token are also unaffected on those endpoints, since token verification runs independently.
Additionally, this common middleware pattern correctly blocks the bypass at the middleware layer:
@clerk/sharedis usually not imported directly in application code, but if you importcreatePathMatcherfrom an affected@clerk/sharedversion, you are also affected. Runnpm why @​clerk/shared(or your package manager's equivalent) to check your installed version.Recommended actions
Install the patched version for your framework (pick the one matching your current major):
@clerk/nextjs7.2.16.39.25.7.6@clerk/nuxt2.2.21.13.28@clerk/astro3.0.152.17.101.5.7@clerk/shared4.8.13.47.42.22.1Workaround
If you cannot upgrade immediately, adding server-side auth checks (
auth()) inside your route handlers, server components, or server actions provides defense-in-depth against this bypass.Timeline
This issue was reported on 13 APR 2026, patched on 15 APR 2026, and publicly disclosed on 15 APR 2026.
Thanks to Christiaan Swiers for the responsible disclosure of this vulnerability.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Clerk has an authorization bypass when combining organization, billing, or reverification checks
CVE-2026-42349 / GHSA-w24r-5266-9c3c
More information
Details
Summary
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.Sessions are not compromised and no existing user can be impersonated. The bypass is limited to the authorization decision returned by the predicate.
clerkMiddlewarecontinues to authenticate requests correctly,auth()reflects the real authentication state, and token verification is unaffected.Who is affected
All apps that combine more than one authorization dimension in a single
has()orauth.protect()call should upgrade to the patched versions. Patches are drop-in with no API changes. The information below describes the scope of the bypass and helps developers understand whether their apps are potentially affected, but is not a reason to delay the upgrade.This call shape can be bypassed if certain conditions are met: a
has()orauth.protect()call that combines areverificationcheck with any ofrole,permission,feature, orplan, or that combines a billing check (featureorplan) with a role or permission check.Single-condition checks are not affected and continue to fail closed as expected:
The callback form of
auth.protectis not affected unless the callback itself invokes one of the affected shapes:App patterns that rely only on single-condition checks, or that combine them via the callback form, are unaffected. Authentication, session state, and token verification continue to work correctly regardless of this bypass.
@clerk/sharedis usually not imported directly in application code, but the fix lives there and reaches an app through its framework package. If developers importcreateCheckAuthorizationfrom@clerk/shareddirectly, their apps are also affected. Runnpm why @​clerk/shared(or the app's package manager's equivalent) to check the installed version.Additional
auth.protect()bypassA second, related bypass lives in
@clerk/nextjs:auth.protect()silently discarded authorization params (role,permission,feature,plan,reverification) whenever the same argument object also containedunauthenticatedUrl,unauthorizedUrl, ortoken.Recommended actions
Upgrade to the latest patch release of the consuming app's framework package on its current major. Both Core 2 and Core 3 release lines have patches. See the "Affected packages" section above for the exact vulnerable ranges and patched versions per package.
If a consuming app pins
@clerk/clerk-jsdirectly, upgrade it to the patched version. Most apps load@clerk/clerk-jsfrom Clerk's CDN through their framework package and will receive the fix automatically, with no upgrade step required.Workaround
If developers cannot upgrade immediately, split combined
has()orauth.protect()calls into sequential single-condition checks:Each single-condition check fails closed as expected, so evaluating them independently and denying if either fails produces the correct result.
Timeline
This issue was reported on 18 APR 2026, patched on 22 APR 2026, and publicly disclosed on 22 APR 2026.
Thanks to AISafe for the responsible disclosure of this vulnerability.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
clerk/javascript (@clerk/nextjs)
v6.39.2Compare Source
Patch Changes
Normalize URL paths in
createPathMatcherto prevent route protection bypass (#8310) by @nikosdouvlisUpdated dependencies [
2c14f0e]:v6.39.1Compare Source
Patch Changes
e5f213f]:v6.39.0Compare Source
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. (#7883) by @wobsoriano
Creating a JWT-format M2M token
Verifying a token
Networkless verification
Patch Changes
76a5a1b,7955e9d,51bc9a9]:v6.38.3Compare Source
Patch Changes
8a0c404]:v6.38.2Compare Source
Patch Changes
c15c8a2]:v6.38.1Compare Source
Patch Changes
c00c524,9c935ad]:v6.38.0Compare Source
Minor Changes
Patch Changes
Fix infinite handshake redirect loop when deploying Next.js apps with Clerk development instances to Netlify (#7876) by @mauricioabreu
Updated dependencies [
71bd53c,935f780,2471e31]:v6.37.5Compare Source
Patch Changes
b17e4bb]:v6.37.4Compare Source
Patch Changes
35bcbd1,5740640,03c61c1]:v6.37.3Compare Source
Patch Changes
a726252]:v6.37.2Compare Source
Patch Changes
Fixed an issue where JWT OAuth access tokens where not treated as a machine token (#7756) by @wobsoriano
Updated dependencies [
7917ff4,b0d28c1]:v6.37.1Compare Source
Patch Changes
559cd84]:v6.37.0Compare Source
Minor Changes
useOrganizationCreationDefaultshook to fetch suggested organization name and logo from default naming rules (#7690) by @LauraBeatrisPatch Changes
Updates middleware location check to account for proxy.ts in next 16+ applications. (#7269) by @alexcarpenter
Updated dependencies [
64a35f7]:v6.36.10Compare Source
Patch Changes
b7a4e1e]:v6.36.9Compare Source
Patch Changes
e995cc3]:v6.36.8Compare Source
Patch Changes
Add image CDNs to the
connect-srcContent Security Policy directive (#7611) by @LauraBeatrisUpdated dependencies [
c3ff1f8,271ddeb,57ff2fb]:v6.36.7Compare Source
Patch Changes
6b26afc]:v6.36.6Compare Source
Patch Changes
9320c4f,a4e6932]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.