CVE-2026-41248
Official Clerk JavaScript SDKs: Middleware-based route protection bypass
Clerk JavaScript is the official JavaScript repository for Clerk authentication. 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. This vulnerability is fixed in @clerk/astro 1.5.7, 2.17.10, and 3.0.15; @clerk/nextjs 5.7.6, 6.39.2, and 7.2.1; @clerk/nuxt 1.13.28 and 2.2.2; and @clerk/shared 2.22.1, 3.47.4, anc 4.8.1
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
9.1
Official Clerk JavaScript SDKs: Middleware-based route protection bypass
Clerk JavaScript is the official JavaScript repository for Clerk authentication. 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. This vulnerability is fixed in @clerk/astro 1.5.7, 2.17.10, and 3.0.15; @clerk/nextjs 5.7.6, 6.39.2, and 7.2.1; @clerk/nuxt 1.13.28 and 2.2.2; and @clerk/shared 2.22.1, 3.47.4, anc 4.8.1
- Record
CVE-2026-41248- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-436, CWE-863
- Updated
- 2026-11-02
EUVDEUVD-2026-25632
9.1
Clerk JavaScript is the official JavaScript repository for Clerk authentication. 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. This vulnerability is fixed in @clerk/astro 1.5.7, 2.17.10, and 3.0.15; @clerk/nextjs 5.7.6, 6.39.2, and 7.2.1; @clerk/nuxt 1.13.28 and 2.2.2; and @clerk/shared 2.22.1, 3.47.4, anc 4.8.1
- Record
EUVD-2026-25632- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vqx2-fgx2-5wq9
9.1
Official Clerk JavaScript SDKs: Middleware-based route protection bypass
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:
// 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:
// Next.js example, equivalent patterns exist in Nuxt and Astro
const isPublicRoute = createRouteMatcher(['/docs(.*)']);
export default clerkMiddleware(async (auth, req) => {
if (!isPublicRoute(req)) {
await auth.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.
- Record
GHSA-vqx2-fgx2-5wq9- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-436, CWE-863
- Updated
- 2026-11-02
NVD
9.1
Clerk JavaScript is the official JavaScript repository for Clerk authentication. 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. This vulnerability is fixed in @clerk/astro 1.5.7, 2.17.10, and 3.0.15; @clerk/nextjs 5.7.6, 6.39.2, and 7.2.1; @clerk/nuxt 1.13.28 and 2.2.2; and @clerk/shared 2.22.1, 3.47.4, anc 4.8.1
- Record
CVE-2026-41248- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-436, CWE-863
- Updated
- 2026-11-02
OSV
9.1
Official Clerk JavaScript SDKs: Middleware-based route protection bypass
Clerk JavaScript is the official JavaScript repository for Clerk authentication. 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. This vulnerability is fixed in @clerk/astro 1.5.7, 2.17.10, and 3.0.15; @clerk/nextjs 5.7.6, 6.39.2, and 7.2.1; @clerk/nuxt 1.13.28 and 2.2.2; and @clerk/shared 2.22.1, 3.47.4, anc 4.8.1
- Record
CVE-2026-41248- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-436, CWE-863
- Updated
- 2026-11-02
OSVGHSA-vqx2-fgx2-5wq9
9.1
Official Clerk JavaScript SDKs: Middleware-based route protection bypass
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:
// 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:
// Next.js example, equivalent patterns exist in Nuxt and Astro
const isPublicRoute = createRouteMatcher(['/docs(.*)']);
export default clerkMiddleware(async (auth, req) => {
if (!isPublicRoute(req)) {
await auth.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.
- Record
GHSA-vqx2-fgx2-5wq9- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-436, CWE-863
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@clerk/nextjsnpm |
5.0.0 up to 5.7.6 | 5.7.6 |
@clerk/nuxtnpm |
1.1.0 up to 1.13.28 | 1.13.28 |
@clerk/astronpm |
0.0.1 up to 1.5.7 | 1.5.7 |
@clerk/sharednpm |
2.20.17 up to 2.22.1 | 2.22.1 |
@clerk/nextjsnpm |
6.0.0-snapshot.vb87a27f up to 6.39.2 | 6.39.2 |
@clerk/nextjsnpm |
7.0.0 up to 7.2.1 | 7.2.1 |
@clerk/nuxtnpm |
2.0.0 up to 2.2.2 | 2.2.2 |
@clerk/astronpm |
2.0.0-snapshot.v20241206174604 to 2.17.9 | 2.17.10 |
@clerk/astronpm |
3.0.0 up to 3.0.15 | 3.0.15 |
@clerk/sharednpm |
3.0.0-canary.v20250225091530 up to 3.47.4 | 3.47.4 |
@clerk/sharednpm |
4.0.0 up to 4.8.1 | 4.8.1 |
@clerk/astronpm |
2.0.0-snapshot.v20241206174604 up to 2.17.10 | 2.17.10 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-41248 is a critical vulnerability (CVSS 9.1) in @clerk Nextjs, published April 16, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.32%, the 25th percentile. Fixed in @clerk/nextjs 5.7.6.