GHSA-vqx2-fgx2-5wq9
## Summary `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: ```ts // Next.js example, equivalent patterns exist in Nuxt and Astro const isProtectedRoute = createRouteMatcher(['/admin(.*)']); export default clerkMiddleware(async (auth, req) => { if (isProtectedRoute(req)) { await auth.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: ```ts // Next.js example, equivalent patterns exist in Nuxt and Astro const isPublicRoute = createRouteMatcher(['/docs(.*)']); export default clerkMiddleware(async (auth, req) => { if (!isP
Properties
- ghsa_id
- GHSA-vqx2-fgx2-5wq9
- severity
- critical
- summary
- Official Clerk JavaScript SDKs: Middleware-based route protection bypass
- cvss_score
- 9.1
- cve_id
- GHSA-vqx2-fgx2-5wq9
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- is_ghsa_only
- true
- ghsa_published
- 2026-04-16T21:28:26Z
- source_url
- https://github.com/advisories/GHSA-vqx2-fgx2-5wq9
- ghsa_updated
- 2026-04-20T10:42:47Z
Related Entities (11)
HAS_WEAKNESS (2)
REPORTED_BY (1)
VULNERABLE_TO (4)
AFFECTS (4)
Explore deeper with Ninja Signal's threat intelligence graph