CVE-2026-41248: Official Clerk JavaScript SDKs Middleware-based Route Protection Bypass Vulnerability
CRITICALCVE-2026-41248 is a CRITICAL (CVSS 9.1) middleware-based route protection bypass vulnerability (CWE-436: Interpretation Conflict) affecting Official Clerk JavaScript SDKs libraries in the npm ecosystem. The issue involves middleware-based route protection bypass. Remediation is available by upgrading affected packages to version 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.
CVE-2026-41248 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-41248
To remediate this vulnerability, upgrade all affected Official Clerk JavaScript SDKs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @clerk/nextjs@5.7.6
npm install @clerk/nuxt@1.13.28
npm install @clerk/astro@1.5.7
npm install @clerk/shared@2.22.1
npm install @clerk/nextjs@6.39.2
npm install @clerk/nextjs@7.2.1
npm install @clerk/nuxt@2.2.2
npm install @clerk/astro@2.17.10
npm install @clerk/astro@3.0.15
npm install @clerk/shared@3.47.4
npm install @clerk/shared@4.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @clerk/nextjs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-41248, inspect your project dependencies using npm:
npm ls @clerk/nextjs
Analyze the terminal output to locate any version of Official Clerk JavaScript SDKs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.7.6), your application is affected.
Note: The npm ls @clerk/nextjs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In Official Clerk JavaScript SDKs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-41248 Affected Official Clerk JavaScript SDKs Versions
11 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@clerk/nextjs
|
npm |
≥ 5.0.0
< 5.7.6
|
5.7.6
|
|
@clerk/nuxt
|
npm |
≥ 1.1.0
< 1.13.28
|
1.13.28
|
|
@clerk/astro
|
npm |
≥ 0.0.1
< 1.5.7
|
1.5.7
|
|
@clerk/shared
|
npm |
≥ 2.20.17
< 2.22.1
|
2.22.1
|
|
@clerk/nextjs
|
npm |
≥ 6.0.0-snapshot.vb87a27f
< 6.39.2
|
6.39.2
|
|
@clerk/nextjs
|
npm |
≥ 7.0.0
< 7.2.1
|
7.2.1
|
|
@clerk/nuxt
|
npm |
≥ 2.0.0
< 2.2.2
|
2.2.2
|
|
@clerk/astro
|
npm |
≥ 2.0.0-snapshot.v20241206174604
< 2.17.10
|
2.17.10
|
|
@clerk/astro
|
npm |
≥ 3.0.0
< 3.0.15
|
3.0.15
|
|
@clerk/shared
|
npm |
≥ 3.0.0-canary.v20250225091530
< 3.47.4
|
3.47.4
|
|
@clerk/shared
|
npm |
≥ 4.0.0
< 4.8.1
|
4.8.1
|
References
Frequently Asked Questions
What is CVE-2026-41248?
Which Official Clerk JavaScript SDKs versions are affected?
What version fixes CVE-2026-41248?
Is @clerk/nextjs affected?
Is @clerk/nuxt affected?
What is the CVSS score of CVE-2026-41248?
What CWE is associated with CVE-2026-41248?
How can I check npm dependencies for CVE-2026-41248?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vqx2-fgx2-5wq9",
"modified" : "2026-04-27T16:08:38Z",
"published" : "2026-04-16T21:28:26Z",
"aliases" : [ "CVE-2026-41248" ],
"summary" : "Official Clerk JavaScript SDKs: Middleware-based route protection bypass",
"details" : "## Summary\n\n`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.\n\nSessions are not compromised and no existing user can be impersonated - the bypass only affects the middleware-level gating decision.\n\n## Who is affected\n\nAll 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.\n\nApps 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:\n\n```ts\n// Next.js example, equivalent patterns exist in Nuxt and Astro\nconst isProtectedRoute = createRouteMatcher(['/admin(.*)']);\n\nexport default clerkMiddleware(async (auth, req) => {\n if (isProtectedRoute(req)) {\n await auth.protect();\n }\n});\n```\n\nThat 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.\n\nExternal APIs that authenticate each request with a token are also unaffected on those endpoints, since token verification runs independently.\n\nAdditionally, this common middleware pattern correctly blocks the bypass at the middleware layer:\n\n```ts\n// Next.js example, equivalent patterns exist in Nuxt and Astro\nconst isPublicRoute = createRouteMatcher(['/docs(.*)']);\n\nexport default clerkMiddleware(async (auth, req) => {\n if (!isPublicRoute(req)) {\n await auth.protect();\n }\n});\n```\n\n`@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.\n\n## Recommended actions\n\nInstall the patched version for your framework (pick the one matching your current major):\n\n**`@clerk/nextjs`**\n- v7.x: fixed in `7.2.1`\n- v6.x: fixed in `6.39.2`\n- v5.x: fixed in `5.7.6`\n\n**`@clerk/nuxt`**\n- v2.x: fixed in `2.2.2`\n- v1.x: fixed in `1.13.28`\n\n**`@clerk/astro`**\n- v3.x: fixed in `3.0.15`\n- v2.x: fixed in `2.17.10`\n- v1.x: fixed in `1.5.7`\n\n**`@clerk/shared`**\n- v4.x: fixed in `4.8.1`\n- v3.x: fixed in `3.47.4`\n- v2.x: fixed in `2.22.1`\n\n## Workaround\n\nIf 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.\n\n## Timeline\n\nThis issue was reported on 13 APR 2026, patched on 15 APR 2026, and publicly disclosed on 15 APR 2026.\n\nThanks to [Christiaan Swiers](https://github.com/YouGina) for the responsible disclosure of this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/nextjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.7.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/nuxt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.1.0"
}, {
"fixed" : "1.13.28"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/astro"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1"
}, {
"fixed" : "1.5.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/shared"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.20.17"
}, {
"fixed" : "2.22.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/nextjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0-snapshot.vb87a27f"
}, {
"fixed" : "6.39.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/nextjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/nuxt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/astro"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0-snapshot.v20241206174604"
}, {
"fixed" : "2.17.10"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.17.9"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/astro"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/shared"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0-canary.v20250225091530"
}, {
"fixed" : "3.47.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@clerk/shared"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/clerk/javascript/security/advisories/GHSA-vqx2-fgx2-5wq9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41248"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/clerk/javascript"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-436", "CWE-863" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T21:28:26Z",
"nvd_published_at" : "2026-04-24T21:16:18Z"
}
}