Description
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.
Recommendation
Update the @clerk/shared package to the latest compatible version. Followings are version details:
Affected version(s): **>= 4.0.0, < 4.8.1 >= 3.0.0-canary.v20250225091530, < 3.47.4 >= 2.20.17, < 2.22.1** Patched version(s): **4.8.1 3.47.4 2.22.1**
References
Could your website be exposed too?
SmartScanner can check your website for Official Clerk JavaScript SDKs: Middleware-based route protection bypass - @clerk/shared and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Official Clerk JavaScript SDKs: Middleware-based route protection bypass - @clerk/nextjs - CVE-2026-41248
- Official Clerk JavaScript SDKs: Middleware-based route protection bypass - @clerk/astro - CVE-2026-41248
- Official Clerk JavaScript SDKs: Middleware-based route protection bypass - CVE-2026-41248
- Clerk has an authorization bypass when combining organization, billing, or reverification checks - @clerk/shared - CVE-2026-42349


