You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createRouteMatcher in @clerk/nextjs, @clerk/nuxt, and @clerk/astro can 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 createRouteMatcher 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 you understand whether you are potentially affected, but is not a reason to delay the upgrade.
Apps relying only on middleware gating via createRouteMatcher are affected, because a crafted request can skip middleware checks and reach downstream handlers (API routes, server components, etc.). This middleware pattern permits the bypass:
// Next.js example, equivalent patterns exist in Nuxt and AstroconstisProtectedRoute=createRouteMatcher(['/admin(.*)']);exportdefaultclerkMiddleware(async(auth,req)=>{if(isProtectedRoute(req)){awaitauth.protect();}});
That said, the bypass is limited to the middleware-level route-matching gate. clerkMiddleware still authenticates the request and auth() 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:
// Next.js example, equivalent patterns exist in Nuxt and AstroconstisPublicRoute=createRouteMatcher(['/docs(.*)']);exportdefaultclerkMiddleware(async(auth,req)=>{if(!isPublicRoute(req)){awaitauth.protect();}});
@clerk/shared is usually not imported directly in application code, but if you import createPathMatcher from an affected @clerk/shared version, you are also affected. Run npm 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/nextjs
v7.x: fixed in 7.2.1
v6.x: fixed in 6.39.2
v5.x: fixed in 5.7.6
@clerk/nuxt
v2.x: fixed in 2.2.2
v1.x: fixed in 1.13.28
@clerk/astro
v3.x: fixed in 3.0.15
v2.x: fixed in 2.17.10
v1.x: fixed in 1.5.7
@clerk/shared
v4.x: fixed in 4.8.1
v3.x: fixed in 3.47.4
v2.x: fixed in 2.22.1
Workaround
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.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.
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
apps/cockpitAnything related to Northware CockpitdependenciesPull requests that update a dependency filepackages/uiAnything related to the @northware/ui packagesecurityTracking einer Security Vulnerability
0 participants
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.39.0→6.39.2GitHub Vulnerability Alerts
GHSA-vqx2-fgx2-5wq9
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:NRelease 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]:Configuration
📅 Schedule: (in timezone Europe/Amsterdam)
* 0-3 * * 1)🚦 Automerge: Enabled.
♻ 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.