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.
Impact
The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.
CVE-2026-41248 has a CVSS score of 9.1 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.7.6, 1.13.28, 1.5.7, 2.22.1, 6.39.2, 7.2.1, 2.2.2, 2.17.10, 3.0.15, 3.47.4, 4.8.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
@clerk/nextjs to 5.7.6 or later; @clerk/nuxt to 1.13.28 or later; @clerk/astro to 1.5.7 or later; @clerk/shared to 2.22.1 or later; @clerk/nextjs to 6.39.2 or later; @clerk/nextjs to 7.2.1 or later; @clerk/nuxt to 2.2.2 or later; @clerk/astro to 2.17.10 or later; @clerk/astro to 3.0.15 or later; @clerk/shared to 3.47.4 or later; @clerk/shared to 4.8.1 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-41248? CVE-2026-41248 is a critical-severity incorrect authorization vulnerability in @clerk/nextjs (npm), affecting versions >= 5.0.0, < 5.7.6. It is fixed in 5.7.6, 1.13.28, 1.5.7, 2.22.1, 6.39.2, 7.2.1, 2.2.2, 2.17.10, 3.0.15, 3.47.4, 4.8.1. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
- How severe is CVE-2026-41248? CVE-2026-41248 has a CVSS score of 9.1 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2026-41248?
@clerk/nextjs(npm) (versions >= 5.0.0, < 5.7.6)@clerk/nuxt(npm) (versions >= 1.1.0, < 1.13.28)@clerk/astro(npm) (versions >= 0.0.1, < 1.5.7)@clerk/shared(npm) (versions >= 2.20.17, < 2.22.1)
- Is there a fix for CVE-2026-41248? Yes. CVE-2026-41248 is fixed in 5.7.6, 1.13.28, 1.5.7, 2.22.1, 6.39.2, 7.2.1, 2.2.2, 2.17.10, 3.0.15, 3.47.4, 4.8.1. Upgrade to this version or later.
- Is CVE-2026-41248 exploitable, and should I be worried? Whether CVE-2026-41248 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-41248 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-41248?
- Upgrade
@clerk/nextjsto 5.7.6 or later - Upgrade
@clerk/nuxtto 1.13.28 or later - Upgrade
@clerk/astroto 1.5.7 or later - Upgrade
@clerk/sharedto 2.22.1 or later - Upgrade
@clerk/nextjsto 6.39.2 or later - Upgrade
@clerk/nextjsto 7.2.1 or later - Upgrade
@clerk/nuxtto 2.2.2 or later - Upgrade
@clerk/astroto 2.17.10 or later - Upgrade
@clerk/astroto 3.0.15 or later - Upgrade
@clerk/sharedto 3.47.4 or later - Upgrade
@clerk/sharedto 4.8.1 or later
- Upgrade